Open thedpws opened 4 months ago
Hi all! I'd like to implement this. I haven't used logview yet. What roadblocks specific to logcat should I anticipate? Alternatively, is this better implemented by extension rather than directly in the package?
For my reference, this is an example of a solution by extension.
(use-package logview
:config
(add-to-list 'logview-additional-submodes
'("Android"
((format . "TIMESTAMP PID LEVEL: MESSAGE")
(timestamp . "AndroidTimestamp"))))
(add-to-list 'logview-additional-level-mappings
'("Android"
((error "E")
(warning "W")
(information "I")
(debug "D")
(trace "V"))))
(add-to-list 'logview-additional-timestamp-formats
'("AndroidTimestamp" (java-pattern . "MM-dd HH:mm:ss.SSS"))))
What roadblocks specific to logcat should I anticipate?
Probably none. Basically, you just need to add appropriate values to logview-std-*
variables instead of logview-additional-*
to make this standard.
PID
As Logview doesn't support that, I'd suggest using THREAD
. It also has a comparable meaning in this case, as each process' messages can be seen as a (mostly) independent stream, which are then all collected into one file.
About timestamp format: is it specified anywhere that timestamps are formatted exactly like this? Can it somehow be dependent on your machine's locale instead?
Also, e.g. this page shows substantially different examples. Can you point me to some specification?
Hey @doublep ,
It seems Android supports different formats for the logs. My example can be reproduced with the -v threadtime
modifier (which is default). What do you think about supporting the default as the standard?
My example can be reproduced with the -v threadtime modifier (which is default).
Sorry, I have no idea with what that modifier is used, I don't develop anything on Android. Can you provide any link?
What do you think about supporting the default as the standard?
That would be the best, but I haven't yet seen the standard. We could also add support for several common formats, not necessarily just one, but I need to see them somewhere first.
I propose support for Android's logcat format.
Scope
brief
,long
, etc.)Details
Android Logcat looks like this example.
Or more concisely,
date time PID TID log-level tag: message