Verified Commit 9699c6ae authored by Sarath's avatar Sarath
Browse files

Remove external log file

parent b63accf0
......@@ -40,27 +40,8 @@ public class SamouraiApplication extends Application {
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);
// Write logcat output to a file
if (BuildConfig.DEBUG) {
Picasso.get().setIndicatorsEnabled(true);
try {
String logFile = Environment.getExternalStorageDirectory().getAbsolutePath().concat("/Samourai_debug_log.txt");
File file = new File(logFile);
if (file.exists()) {
// clear log file after accumulating more than 6mb
if (file.length() > 6000000) {
PrintWriter writer = new PrintWriter(file);
writer.flush();
writer.close();
}
}
Runtime.getRuntime().exec("logcat -f " + logFile);
} catch (Exception e) {
e.printStackTrace();
}
// enable debug logs for external libraries (extlibj, whirlpool-client...)
LogUtil.setLoggersDebug();
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment