How to Parse this log?

Notes, tips, and other usefull things on how to use LogMX

Moderator: admin

Post Reply
jobemakar
Posts: 27
Joined: Thu Jun 11, 2015 9:49 pm

How to Parse this log?

Post by jobemakar »

Hi - when I connect my Android device to my PC via USB and use this command: adb logcat > logs.txt, it will send device logs directly to that file over time.

I want to use the LogMX file manager to watch this file and parse updates as they come (or on some short update like 1 second). No built in parser is parsing this. So I was wondering if the simple parser customizer will work for it.

I've attached a sample log. The format is essentially:
Date Thread1 Thread2 LogLevel Message

LogLevel looks to be F, I, D, W, E (and V?)

I don't care about the threads. I'm not sure if those even are threads.

While writing this I did a quick google and found this existing Java-based logcat parser / viewer.

https://github.com/wangfei1975/superlog
jobemakar
Posts: 27
Joined: Thu Jun 11, 2015 9:49 pm

Re: How to Parse this log?

Post by jobemakar »

I forgot to attach that log. This page is telling me that a *.txt is an invalid extension type. So I've pasted the contents into a Gist.

https://gist.githubusercontent.com/jobe ... tfile1.txt
admin
Site Admin
Posts: 556
Joined: Sun Dec 17, 2006 10:30 pm

Re: How to Parse this log?

Post by admin »

Hello,

If you don't need the threads, you can use the Parser I have created for you:
logmx.parser.export
(407 Bytes) Downloaded 864 times

You will also need to setup the log levels (I assumed "V" is Verbose and "F" is Fatal, even is Fatal doesn't seem to be an official level: https://developer.android.com/reference ... onstants_1). To do so you can import this file:
logmx.levels.export
(378 Bytes) Downloaded 814 times
To import these files, simply go to menu "Tools" > "Options" > tab "General", button "Import option" at the bottom left corner. If you want to tune the Parser or the Levels, check the tabs "Parsers" and "Levels" in the "Options" window, respectively (the Parser I put here is named "Android logs Parser")

Please let me know if it worked well.
Xavier
Attachments
logmx.levels.export
(378 Bytes) Downloaded 814 times
logmx.levels.export
(378 Bytes) Downloaded 798 times
logmx.levels.export
(378 Bytes) Downloaded 774 times
logmx.levels.export
(378 Bytes) Downloaded 763 times
jobemakar
Posts: 27
Joined: Thu Jun 11, 2015 9:49 pm

Re: How to Parse this log?

Post by jobemakar »

Thanks! I'll give these a try as soon as I can and report back here.
Post Reply