我已經搜索並發現了很多關於此主題的解決方案,但都是保存的詳細級別。而不是調試或錯誤級別只有將Logcat輸出保存到文件
我想只保存調試級別。
//currently the command i am using is this:
String[] cmd = new String[]{"logcat", "-f", filepath, "-v", "time"};
//i think it should be something like this
String[] cmd = new String[]{"logcat", "-f", filepath, "-v", "time", "-v" ,"tag: D/"};
[將android的logcat數據寫入文件]可能的重複(http://stackoverflow.com/questions/6175002/write-android-logcat-data-to-a-file) – RajSharma