How to save LogCat contents to file?

前端 未结 10 1288
没有蜡笔的小新
没有蜡笔的小新 2020-12-05 06:57

I\'ve added debug strings (using Log.d()) and want to see them in context from the contents of logCat. The \"save\" icon for LogCat has a \"Save selected items\" hint, but t

10条回答
  •  甜味超标
    2020-12-05 07:28

    In addition to answer by Dinesh Prajapati, Use

     adb -d logcat :
    

    where -d is for device and you may also choose -e instead for emulator log and log level is a/d/i/v/e/w etc.

    Now your command goes like:

    adb -d logcat com.example.example:V > logfileName_WithPath.txt
    

提交回复
热议问题