whats the significance of /dev/log/main and /dev/log/system in android logcat?
Asked Answered
K

2

7

I usually get these two lines when i type adb lolcat in command line

--------- beginning of /dev/log/main
D/dalvikvm( 2586): GC_CONCURRENT freed 651K, 7% free 12236K/13063K, paused 7ms+4ms
D/dalvikvm( 2586): GREF has increased to 201
W/AudioHardwareALSA( 2071): badstate and do recovery.....
--------- beginning of /dev/log/system
I/ActivityManager( 2159): START {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.android.mms/.ui.ConversationList bnds=[909,207][1011,300]} from pid 2586

What is the significance of these two things in logcat output, anything important it signifies ?Thank You

Kremer answered 31/12, 2012 at 12:5 Comment(0)
Z
11

http://elinux.org/Android_Logging_System says:

The system log was created to keep system messages in a separate buffer (outside of '/dev/log/main') so that a single verbose application couldn't overrun system messages and cause them to be lost.

Zincate answered 31/12, 2012 at 12:8 Comment(0)
R
0

you can write a log directly by write to /dev/log/main as below:

 $ printf "\5TagName\0Your Text Log\n" > /dev/log/main

the \5 means ANDROID_LOG_WARN for other log level use these:

typedef enum android_LogPriority {
ANDROID_LOG_UNKNOWN = 0,
ANDROID_LOG_DEFAULT,    /* only for SetMinPriority() */
ANDROID_LOG_VERBOSE,
ANDROID_LOG_DEBUG,
ANDROID_LOG_INFO,
ANDROID_LOG_WARN,
ANDROID_LOG_ERROR,
ANDROID_LOG_FATAL,
ANDROID_LOG_SILENT,     /* only for SetMinPriority(); must be last */
} android_LogPriority;

for more information see below source files log, logd_write, writev, logprint and android.googlesource.com

Recognition answered 9/1, 2023 at 23:49 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.