Here is some information on the Android logger:
General system-wide logging is supported by a kernel device driver call 'logger'. The code for the driver is in 'drivers/android/logger.c'.
The code supports 3 logging buffers, named "main", "events", and "radio", for different types of events.
The driver is activated when a user-space program opens a device node with the appropriate major and minor number.
These nodes are located in /dev/log, as shown below:
# ls -l /dev/log crw-rw--w- 1 0 1007 10, 50 Nov 5 02:00 events crw-rw--w- 1 0 1007 10, 51 Nov 5 02:00 main crw-rw--w- 1 0 1007 10, 49 Nov 5 02:00 radio
You can use the 'logcat' command to read the log. This command is located in /system/bin in the local filesystem, or you can access the functionality using the 'adb logcat' command.
Documentation on the use of this command is at: http://developer.android.com/guide/developing/tools/adb.html
Some quick notes:
- Log messages each have a tag and log level.
- You can filter the messages by tag and log level, with a different level per tag.
- You can specify (using a system property) that various programs emit their stdout or stderr to the log.