我正在使用Linux平台开发我的应用程序我希望在终端中显示我的日志值,所以我搜索了很多如何做任何一个请指导我
答案 0 :(得分:5)
对于linux使用它,
android-sdk-linux_x86/platform-tools -> ./adb logcat
答案 1 :(得分:4)
//在您的终端类型 adb logcat
中adb logcat [ <filter-spec> ] - View device log
Usage: logcat [options] [filterspecs]
options include:
-s Set default filter to silent.
Like specifying filterspec '*:s'
-f <filename> Log to file. Default to stdout
-r [<kbytes>] Rotate log every kbytes. (16 if unspecified). Requires -f
-n <count> Sets max number of rotated logs to <count>, default 4
-v <format> Sets the log print format, where <format> 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 <count> print only the most recent <count> lines (implies -d)
-g get the size of the log's ring buffer and exit
-b <buffer> 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
<tag>[:priority]
where <tag> 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 <tag> by itself means <tag>:v
答案 2 :(得分:1)
使用带有以下标志的adb
adb logcat
答案 3 :(得分:1)
对于Ubuntu使用这些简单的命令
找到您的Sdk / Platform-tools目录
cd ~/Android/Sdk/platform-tools
然后运行以下命令
./adb logcat