mirror of https://github.com/M66B/FairEmail.git
Zip larger log files only
This commit is contained in:
parent
3d70d5aa22
commit
302d201d19
|
@ -174,6 +174,7 @@ public class Log {
|
|||
private static final long MAX_LOG_SIZE = 8 * 1024 * 1024L;
|
||||
private static final int MAX_CRASH_REPORTS = (BuildConfig.TEST_RELEASE ? 50 : 5);
|
||||
private static final long MIN_FILE_SIZE = 1024 * 1024L;
|
||||
private static final long MIN_ZIP_SIZE = 1024 * 1024L;
|
||||
private static final String TAG = "fairemail";
|
||||
|
||||
// https://docs.oracle.com/javase/8/docs/technotes/guides/net/proxies.html
|
||||
|
@ -2631,7 +2632,7 @@ public class Log {
|
|||
}
|
||||
|
||||
db.attachment().setDownloaded(attachment.id, size);
|
||||
if (!BuildConfig.DEBUG)
|
||||
if (!BuildConfig.DEBUG && size > MIN_ZIP_SIZE)
|
||||
attachment.zip(context);
|
||||
} catch (Throwable ex) {
|
||||
Log.e(ex);
|
||||
|
@ -2741,7 +2742,7 @@ public class Log {
|
|||
}
|
||||
|
||||
db.attachment().setDownloaded(attachment.id, size);
|
||||
if (!BuildConfig.DEBUG)
|
||||
if (!BuildConfig.DEBUG && size > MIN_ZIP_SIZE)
|
||||
attachment.zip(context);
|
||||
} finally {
|
||||
if (proc != null)
|
||||
|
|
Loading…
Reference in New Issue