首页 > 代码库 > logcat

logcat

logcat

  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.

   Logcat dumps a log of system messages, which include things such as stack traces when the emulator throws an error and messages that you have written from your application by using the Log class. 

The Log Class

  Log is a logging class that you can utilize in your code to print out messages to the LogCat. Common logging methods include:

  

  Log优先级:

    

logcat的使用

  

  

  If you‘re running LogCat from your development computer,可以设置默认的filter:

  

  

参考:

1、http://developer.android.com/tools/debugging/debugging-log.html

2、http://developer.android.com/tools/help/logcat.html

 

logcat