Trying to output my LogCat to a file

后端 未结 3 1048
别跟我提以往
别跟我提以往 2021-02-14 13:31

I\'ve been told it\'s a command line option. But Eclipse\'s Run!Run Configurations...!Target!Additional Emulator Command Line Options field is already occupied with

<         


        
3条回答
  •  挽巷
    挽巷 (楼主)
    2021-02-14 14:14

    Another useful addition to the above answers is filtering. The application I am working on generates a massive amount of logging, so it is useful to log with filters.

    adb -s MyDevice logcat | find /V ": T#" > d:\temp\logcat.txt
    

    or for OSX/Linux

    adb -s MyDevice logcat | grep -v ": T#" > ~/logcat.txt
    

    This will write all logcat activity apart from any line that contains ": T#"

    find or grep can also be used to filter based on positive results. I then use the likes of BareTail display the growing log file.

提交回复
热议问题