Basic usage of ADB logcat

Source: Internet
Author: User
Tags print format

To get started with Android, at least you need to know the ADB, so playing log is also essential.

The following is a brief introduction to the ADB logcat basic usage:

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. (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 is allowed and the
Results is interleaved. The default Is-b main-b system.
-B Output the log in binary
Filterspecs is a series of
<tag>[:p Riority]

Where <tag> is a log component tag (or * for all) and the 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 are set from Android_log_tags.
If no filterspec is found, filter defaults to ' *:i '

If not specified WITH-V, format was set from Android_printf_log
or defaults to "brief"

Example: adb logcat-v time-s videocamera

This means that the time in the log message will be printed, along with all logs containing the keyword "Videocamera"

C:\USERS\ADMINISTRATOR&GT;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 Falsemsceneindicator[email protected]

Transferred from: http://blog.csdn.net/fulinwsuafcie/article/details/8028572

Basic usage of ADB logcat

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.