rddog23 / alogcat

Automatically exported from code.google.com/p/alogcat
0 stars 0 forks source link

increase log buffer #6

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
request from user is to increase log buffer size, to capture events that happen 
further in the past. 

alogcat has a static number of events it will display. i think this is 
necessary for performance. if it is set to display all log events in the 
buffer, this could be arbitrarily large and bring the app to a grinding halt.

therefore, i think the best solution is the following ... 

first, when alogcat sends or saves a log, it should capture all log events in 
the buffer, not just the ones being displayed. actually, allowing this for send 
might be questionable. will have to see how it performs.

second, allow the user to set the log file size. this can be done by invoking 
logcat with the -r, -n, and -f options. it should probably give some fixed 
values to keep the user from setting something arbitrarily large. perhaps 16, 
64, 256, and 1024k. 

with this, although the user won't be allows to view an arbitrarily large log, 
they can send it in email (maybe), or dump it to the SD card.

implementation wise this is pretty simple. we need to add a size option to the 
menu, and modify the implementation of send and save to exec logcat and capture 
the output instead of looking at the events being displayed.

Original issue reported on code.google.com by jeffrey.blattman@gmail.com on 14 Jun 2010 at 10:26

GoogleCodeExporter commented 8 years ago
on second look this isn't so clear. -r requires -f, and -f requires a file name 
where to log the file. i don't want to log to a new file. so maybe my 
understanding of logcat is wrong.

it looks like logcat is just a wrapper around /dev/log/*. so the "buffer" is 
completely managed by me. i could have something like "start  /stop buffering 
to file", but i'd have to be careful about storing the PID so it could be 
stopped again. 

Original comment by jeffrey.blattman@gmail.com on 14 Jun 2010 at 10:54

GoogleCodeExporter commented 8 years ago

Original comment by jeffrey.blattman@gmail.com on 24 Sep 2010 at 3:20

GoogleCodeExporter commented 8 years ago
marking this will not fix. there's no obvious way to do this. the /dev/log 
device has a fixed window size and i do not see where or how to increase that. 
logcat could keep a larger history that this (sacrificing performance), but 
that would last only as long as it was running in the foreground. the next time 
it started, it would only have the /dev/log window entries.

as a workaround, version 2.0 has "periodic save", so you can capture the 
/dev/log window at a configurable interval. 

Original comment by jeffrey.blattman@gmail.com on 17 Oct 2010 at 11:00