-
-
Notifications
You must be signed in to change notification settings - Fork 565
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide built in logcat function #8331
Comments
+1 BTW; Not really sure what made the difference (I didn't change a thing, at least not intentionally) but after a few hours, MatLog suddenly shows cgeo's messages as if it never happened otherwise (and BTW mimicked geocachermgo's logcat). Hence it's still (i. e. with Android 10) possible to create a trace on the fly (after using adb once, of course). Nevertheless, I support the FR as a builtin logcat function (esp. with the mentioned extra features and w/o need of adb) would make (tester's) live a lot easier. |
That's the reasoning behind this feature wish: Make LogCat results for c:geo available to non-IT people. Because today, you have to
|
Thats a nice idea. I would have made this proposal earlier if I only knew this possibility existed. Some functional questions from my side:
|
I didn't know of it as well, just learned about while researching how to access LogCat using apps (and how limited this is today due to security restrictions).
This may happen, sometimes. But the most frequent use case IMHO is to catch the place (source line) where an exception happened to have an anchor for starting the search for the cause. You can still activate debug function in a second step, if needed (depending on the issue being investigated).
Which two options do you mean? One is activating "debug mode", the other?
I'm exporting the log message which already exist (Android logs a lot of things automatically), so exporting should be done after something unusual/unwanted has happened within c:geo. I'm still exploring the content and timeline part - how much is written to the log, when it gets recycled etc. Currently I'm exporting the full available log (in c:geo context), but filtered to lines/tags with "cgeo.geocachin" in there, meaning the message comes from the app itself, not from the system around.
exactly, it's the new "logcat" dir beneath our cgeo dir. Thus our typical dir structure would be:
Naming for "logcat" can be changed, if needed, maybe to "logfiles" instead of "logcat" (which probably is too technical) Another missing peace is how to reach logcat files using earlier Android versions: The program itself is available from the beginning, but for some reason calling it leads to a 255 result on older systems, instead of the expected 0 (= no error). |
Yep. In the very first minute after installing MatLog. It even gives a message that you have to do so (on non-rooted devices). But for any reason it took another few hours until it finally started to display logs of other apps, too (w/o adb it shows just it's own messages). Nevertheless, too complicated for Non-ITs and not deterministic enough to explain to an impatient user, who is not even sure of his business ... ;) As for the button: I would prefer two of them. One for toggling logging on and off (just one to flush a cyclic buffer would even be better, but I guess "always on" is most probably not an option, with regard to memory usage, performance and stability) and another for initiating the save&send dialogue (including the "do you really want to" and "remove personal data?" stuff). |
So you're thinking of grabbing / grepping the stuff from Android's logfiles? As far as I understood what MatLog did (resp. was able to do), an app has no access to these by default anyway, thus it has to write it's own log to somewhere else to be able to show (or store) it ... |
... at least w/o using adb to grant permission - what, as far as I understood the FR, should be avoided ... or am I wrong? |
I was refering to Settings - System - "Fehlersuche". There are two options "Debug-Log aktivieren" and "Erzeuge Speicherabbild". I think we should add the "generate logcat" over there instead of the about dialog. Edit: Maybe we should add the time to the file name additionally to the date to avoid overwrite of files in consecutive tries. BTW: Adding date to filename was also requested for the gpx export in some feature request here...now, that you just wrote this method.... ;) |
Each app is allowed to read its own logcat portion, without any special permissions - that's what I'm using here. Permission |
Thanks for clarifying - didn't have the "generate memory image" in my mind.
Added even without having seen this part of your comment ;-)
Date is already added to GPX export filename, at least if you export a list of caches. |
Even LogCat messages from previous instances? Cause these would be the relevant ones, in case you want to trace a crash (what I had in mind while thinking of the On/Off scenario):
|
At least with the Android 10 emulator this worked as expected. Android 4 seems to be a bit unreliable regarding logcat and logcat filtering, so I relieved the filtering on older Android versions.
No need to start & stop logging manually. Logging is done automatically by Android. After a crash you simply re-enter c:geo, write the logcat file and optionally send it to c:geo support. The only thing which would have to be done manually is to activate the special debug messages from c:geo. Then it's similar to the way you described. But that's a rare case, at least as long as you're hunting down crashes. |
Inspired by a discussion in #8319 (comment):
Feature request: Provide a built-in function in c:geo to save its own logcat to a user-readable file, maybe even make it sendable via e-mail.
The text was updated successfully, but these errors were encountered: