日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

adb logcat 基本用法

發布時間:2023/12/20 编程问答 23 豆豆
生活随笔 收集整理的這篇文章主要介紹了 adb logcat 基本用法 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

入門android ,至少需要了解 adb 吧,那么打 log 也是必不可少的了。

下面簡單介紹一下 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"

?

實例:adb logcat -v time -s videocamera

意思是說,會打印出 log 信息中時間,以及包含關鍵字 "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

轉載于:https://www.cnblogs.com/maksim3000/p/3316745.html

總結

以上是生活随笔為你收集整理的adb logcat 基本用法的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。