public static void saveLogcatToFile(Context context) {
String fileName = "logcat_"+System.currentTimeMillis()+".txt";
File outputFile = new File(context.getExternalCacheDir(),fileName);
@SuppressWarnings("unused")
Process process = Runtime.getRuntime().exec("logcat -f "+outputFile.getAbsolutePath()); }
Please check the above code and help me to save the logcat details to file (permanently), it should append after everytime debugging in eclpise.
0 comments:
Post a Comment