logcat overflow?

Common bugs/problems with the Android SDK the Emulator and the ADT-Plugin.

logcat overflow?

Postby esses » Sun Apr 26, 2009 10:53 pm

Hi all,
maybe it is a stupid question... However when I see the logcat tab on the eclipse ddms perspective, when the logs are very verbose, happens that the logcat displays only one line each time. It refreshes the line but displays only one (So I can't read what happens in the line before because it disappears to show the next one).
It seems that there is a limit in the number of lines that logcat window can contain and after that number the logcat switch to a single line mode...

Bye,
Esses.
-----------I love programming and you?---------
esses
Freshman
Freshman
 
Posts: 3
Joined: Mon Feb 16, 2009 8:12 am

Top

Postby Oleg » Mon Nov 02, 2009 9:12 pm

Hi. It is not stupid question :)
You need to configure your logcat for showing unlimited number of lines:
I did it after configuring console. I really don't know why console configuration change logcat configuration.
Go in Eclipse to Window->Preferences->Run/Debug->Console-> uncheck Limit Console output.
Oleg
Experienced Developer
Experienced Developer
 
Posts: 57
Joined: Wed Nov 28, 2007 1:49 pm
Location: Ukraine

Postby Quelle » Fri Apr 23, 2010 1:51 pm

In my case your idea seems not to be functional. Is their anyone with a other idea? Because i need a longtime debug, my application going down after 5 or more hours. I don´t no really why, without a log i will have no chance to debug.

thanks and regard. quelle
Quelle
Developer
Developer
 
Posts: 34
Joined: Thu Mar 11, 2010 10:53 am

Postby Oleg » Fri Apr 23, 2010 2:04 pm

Quelle wrote:In my case your idea seems not to be functional. Is their anyone with a other idea? Because i need a longtime debug, my application going down after 5 or more hours. I don´t no really why, without a log i will have no chance to debug.

thanks and regard. quelle


I also use logcat in console. Just type in console
adb logcat
Oleg
Experienced Developer
Experienced Developer
 
Posts: 57
Joined: Wed Nov 28, 2007 1:49 pm
Location: Ukraine

Postby Quelle » Fri Apr 23, 2010 2:47 pm

Thanks. Does Eclipse not automatically start adb?? In Eclipse i don´t see a way to enter a new console command. Now the Logcat commands are 9000 lines big, maybe it works correctly. I don`t know.
If i start console with the adb command from outside eclipse, i don`t know how configure the console too save "endless" lines.

Is their any way too save the console commands realtime in a external file?

Regards florian.
Quelle
Developer
Developer
 
Posts: 34
Joined: Thu Mar 11, 2010 10:53 am

Postby Quelle » Fri Apr 23, 2010 3:01 pm

okay, now it works. i just typed adb logcat > log.txt in a extern console. To watching live i use eclipse, and in the txtfile i have the longtime logs.


Thanks and regards.
Quelle
Developer
Developer
 
Posts: 34
Joined: Thu Mar 11, 2010 10:53 am

Top

Postby Oleg » Fri Apr 23, 2010 3:13 pm

Quelle wrote:Thanks. Does Eclipse not automatically start adb?? In Eclipse i don´t see a way to enter a new console command. Now the Logcat commands are 9000 lines big, maybe it works correctly. I don`t know.
If i start console with the adb command from outside eclipse, i don`t know how configure the console too save "endless" lines.

Is their any way too save the console commands realtime in a external file?

Regards florian.

I mean run this command outside of Eclipse.
Yes, you can save output to the external file from your OS's system console.
For example I use linux and in terminal I wrote

adb logcat > /home/sheff/logcat_our.txt

For Windows OS visit their help

Note:
If you would like to see your full logcat output in system console you need to configure it, because console by default shows limited amount of lines
Oleg
Experienced Developer
Experienced Developer
 
Posts: 57
Joined: Wed Nov 28, 2007 1:49 pm
Location: Ukraine

Postby jsemler » Tue May 11, 2010 6:48 pm

Oleg wrote:
Quelle wrote:In my case your idea seems not to be functional. Is their anyone with a other idea? Because i need a longtime debug, my application going down after 5 or more hours. I don´t no really why, without a log i will have no chance to debug.

thanks and regard. quelle


I also use logcat in console. Just type in console
adb logcat


How does one get timestamps on the log entries using this method?
jsemler
Junior Developer
Junior Developer
 
Posts: 24
Joined: Sun Apr 18, 2010 3:53 pm

Postby jsemler » Tue May 11, 2010 8:51 pm

jsemler wrote:
Oleg wrote:
Quelle wrote:In my case your idea seems not to be functional. Is their anyone with a other idea? Because i need a longtime debug, my application going down after 5 or more hours. I don´t no really why, without a log i will have no chance to debug.

thanks and regard. quelle


I also use logcat in console. Just type in console
adb logcat


How does one get timestamps on the log entries using this method?


This UNIX command sequence works for new log entries in real-time (old log entries are stamped with the same time stamps until the tail end of the logcat file is reached):

Code: Select all
adb logcat | sed -u -e 's/.*/echo `date +%F" "%T` ": &"/' | sh


This is what the timestamped output looks like when the filter is applied:

Code: Select all
2010-05-11 15:53:54 : D/dalvikvm( 4925): GC freed 46491 objects / 2096464 bytes in 76ms
2010-05-11 15:53:55 : D/dalvikvm( 4925): GC freed 46663 objects / 2096816 bytes in 86ms
2010-05-11 15:53:57 : D/dalvikvm( 4925): GC freed 42689 objects / 2097120 bytes in 76ms
2010-05-11 15:53:58 : D/dalvikvm( 4925): GC freed 46684 objects / 2097416 bytes in 74ms


The command only looks complicated because I wanted a specific date format.
jsemler
Junior Developer
Junior Developer
 
Posts: 24
Joined: Sun Apr 18, 2010 3:53 pm

Top

Return to SDK/ADT/Emulator Problems

Who is online

Users browsing this forum: No registered users and 1 guest