Let the SDK manage the file log cleanup, and keep one week of log.

This commit is contained in:
Benoit Marty 2024-04-26 12:28:24 +02:00
parent 76cedafeb7
commit 9f2e8d44ce
7 changed files with 23 additions and 47 deletions

View file

@ -56,11 +56,13 @@ class TracingInitializer : Initializer<Unit> {
writesToLogcat = false,
writesToFilesConfiguration = WriteToFilesConfiguration.Enabled(
directory = bugReporter.logDirectory().absolutePath,
filenamePrefix = "logs"
filenamePrefix = "logs",
filenameSuffix = null,
// Keep a minimum of 1 week of log files.
numberOfFiles = 7 * 24,
)
)
}
bugReporter.cleanLogDirectoryIfNeeded()
bugReporter.setCurrentTracingFilter(tracingConfiguration.filterConfiguration.filter)
tracingService.setupTracing(tracingConfiguration)
// Also set env variable for rust back trace