In Android application I am writing logs to external file and sending this file if any issue raise by customer for reference to analyse the issue it was working fine, but recently it started stripping off debug or warning or verbose logs and keeping only error logs
code for writing logs to external file
File filePath = new File(getApplicationContext().getExternalFilesDir(null), fileName);
if (filePath.exists()) {
long logcatFileSize = filePath.length() / 1024;
if (renameFile || logcatFileSize >= AppConfiguration.MAX_ALLOWED_ATTACHMENT_SIZE_NEW) {
renameCurrentLogFileToBackup(filePath);
filePath = new File(getApplicationContext().getExternalFilesDir(null), fileName);
}
}
else
{
filePath.createNewFile();
}
Runtime.getRuntime().exec("logcat -v threadtime -f " + filePath.getAbsolutePath());
Analysed checking proguard and build file, could not find any clue.