Use the right filename for log files so they're sorted in rageshakes (#3219)

* Use the right filename for log files so they're sorted in rageshakes

* Hide the suffix part so it's not changed by accident
This commit is contained in:
Jorge Martin Espinosa
2024-07-19 12:33:33 +02:00
committed by GitHub
parent 812ffef29e
commit 30154783e8
2 changed files with 5 additions and 4 deletions

View File

@@ -71,8 +71,7 @@ class TracingInitializer : Initializer<Unit> {
return WriteToFilesConfiguration.Enabled(
directory = bugReporter.logDirectory().absolutePath,
filenamePrefix = "logs",
filenameSuffix = null,
// Keep a minimum of 1 week of log files.
// Keep a maximum of 1 week of log files.
numberOfFiles = 7 * 24,
)
}

View File

@@ -21,7 +21,9 @@ sealed interface WriteToFilesConfiguration {
data class Enabled(
val directory: String,
val filenamePrefix: String,
val filenameSuffix: String?,
val numberOfFiles: Int?,
) : WriteToFilesConfiguration
) : WriteToFilesConfiguration {
// DO NOT CHANGE: suffix *MUST* be "log" for the rageshake server to not rename the file to something generic
val filenameSuffix = "log"
}
}