相关代码位置
./drivers/staging/android/logger.h
./drivers/staging/android/logger.c
./system/core/liblog/logd_write.c
./system/core/.include/cutils/logger.h
./system/core/include/cutils/log.h
./system/core/logcat/logcat.cpp
./system/core/liblog/logprint.h
./system/core/liblog/logprint.c
./frameworks/base/core/jni/android_util_Log.cpp
./frameworks/base/core/jni/android_util_EventLog.cpp
./frameworks/base/core/java/android/util/EventLog.java
./frameworks/base/core/java/android/util/EventLogTags.java
./frameworks/base/core/java/android/util/Log.java
./frameworks/base/core/java/android/util/Slog.java
Usage: %s [options] [filterspecs]
options include:
-s Set default filter to silent.
Like specifying filterspec '*:s'
-f Log to file. Default to stdout
-r [] Rotate log every kbytes. (16 if unspecified). Requires -f
-n Sets max number of rotated logs to , default 4
-v Sets the log print format, where is one of:
brief process tag thread raw time threadtime long
-c clear (flush) the entire log and exit
-d dump the log and then exit (don't block)
-t print only the most recent lines (implies -d)
-g get the size of the log's ring buffer and exit
-b Request alternate ring buffer, 'main', 'system', 'radio'
or 'events'. Multiple -b parameters are allowed and the
results are interleaved. The default is -b main -b system.
-B output the log in binary);
filterspecs are a series of
[:priority]
where is a log component tag (or * for all) and priority is:
V Verbose
D Debug
I Info
W Warn
E Error
F Fatal
S Silent (supress all output)
'*' means '*:d' and by itself means :v
If not specified on the commandline, filterspec is set from ANDROID_LOG_TAGS.
If no filterspec is found, filter defaults to '*:I'
If not specified with -v, format is set from ANDROID_PRINTF_LOG or defaults to brief);