我已经搜索并发现了很多关于此主题的解决方案,但都是保存的详细级别。而不是调试或错误级别只有将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