The Android logging system provides a mechanism for collecting and viewing system debug
output. Logs from various applications and portions of the system are collected in a series of
circular buffers, which then can be viewed and filtered by the
logcat command. You can use
logcat from an ADB shell to view the log messages.
This document is a reference to the available command line options. For more information on
Reading and Writing Logs.
information on accessing
logcat from DDMS, instead of the command line, see the documentation for the
Dalvik Debug Monitor Server.
[adb] logcat [<option>] ... [<filter-spec>] ...
You can run
logcat as an adb command or directly in a shell prompt
of your emulator or connected device. To view log output using adb, navigate to your SDK
platform-tools/ directory and execute:
$ adb logcat
You can create a shell connection to a device and execute:
$ adb shell # logcat
The following table describes the command line options of
||Loads an alternate log buffer for viewing, such as
||Clears (flushes) the entire log and exits.|
||Dumps the log to the screen and exits.|
||Writes log message output to
||Prints the size of the specified log buffer and exits.|
||Sets the maximum number of rotated logs to
||Rotates the log file every
||Sets the default filter spec to silent.|
||Sets the output format for log messages. The default is