adb logcat 基本用法
入門(mén)android ,至少需要了解 adb 吧,那么打 log 也是必不可少的了。
下面簡(jiǎn)單介紹一下 adb logcat 基本用法:
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
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"
?
實(shí)例:adb logcat -v time -s videocamera
意思是說(shuō),會(huì)打印出 log 信息中時(shí)間,以及包含關(guān)鍵字 "videocamera" 的所有 log
C:\Users\Administrator>adb logcat -v time -s videocamera fulin
--------- beginning of /dev/log/system
--------- beginning of /dev/log/main
07-01 08:43:57.037 V/videocamera( 2329): VideoCamera onCreate!
07-01 08:43:57.039 I/videocamera( 2329): getExternalSdState() : removed
07-01 08:43:57.040 I/videocamera( 2329): getExternalState() : mounted
07-01 08:43:57.040 I/videocamera( 2329): Sdcard is exists ? false
07-01 08:43:57.157 V/videocamera( 2329): fulin onCreate Storage.getAvailableSpace() 1335459840
07-01 08:43:57.159 V/videocamera( 2329): fulin initThumbnailButton
07-01 08:43:57.170 D/videocamera( 2329): Thumbnail.getLastThumbnail >>>
07-01 08:43:57.204 E/videocamera( 2329): --------------readVideoPreferences---------------minutes = 600
07-01 08:43:57.205 E/videocamera( 2329): --------------readVideoPreferences----------quality6=10
07-01 08:43:57.207 E/videocamera( 2329): -----------------readVideoPreferences---------mCameraId=0
07-01 08:43:57.208 E/videocamera( 2329): -----------------readVideoPreferences---------quality7=10
07-01 08:43:57.209 V/videocamera( 2329): mDesiredPreviewWidth=640. mDesiredPreviewHeight=480
07-01 08:43:57.234 V/videocamera( 2329): startPreview
07-01 08:43:57.240 V/videocamera( 2329): videocamera--mParameters.setFocusMode(mFocusManager.getFocusMode())
07-01 08:43:57.265 D/videocamera( 2329): Thumbnail.getLastThumbnail <<< is null:false
07-01 08:43:57.269 V/videocamera( 2329): Video snapshot size is 3264x2448
07-01 08:43:57.376 D/videocamera( 2329): SupportedPreviewSizes : 176x144
07-01 08:43:57.376 D/videocamera( 2329): SupportedPreviewSizes : 320x240
07-01 08:43:57.376 D/videocamera( 2329): SupportedPreviewSizes : 352x288
07-01 08:43:57.376 D/videocamera( 2329): SupportedPreviewSizes : 480x368
07-01 08:43:57.376 D/videocamera( 2329): SupportedPreviewSizes : 640x480
07-01 08:43:57.376 D/videocamera( 2329): SupportedPreviewSizes : 720x480
07-01 08:43:57.376 D/videocamera( 2329): SupportedPreviewSizes : 800x600
07-01 08:43:57.376 D/videocamera( 2329): SupportedPreviewSizes : 864x480
07-01 08:43:57.376 D/videocamera( 2329): SupportedPreviewSizes : 1280x720
07-01 08:43:57.422 V/videocamera( 2329): updateSceneOnScreenIndicator isVisible falsemSceneIndicatorandroid.widget.ImageView@41acd0e0
轉(zhuǎn)載于:https://www.cnblogs.com/maksim3000/p/3316745.html
總結(jié)
以上是生活随笔為你收集整理的adb logcat 基本用法的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: Ubuntu16.04 pip下载安装t
- 下一篇: 疑问集锦