Browse Source

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
pull/3220/head
Jorge Martin Espinosa 2 months ago committed by GitHub
parent
commit
63df35e071
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 3
      app/src/main/kotlin/io/element/android/x/initializer/TracingInitializer.kt
  2. 6
      libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/tracing/WriteToFilesConfiguration.kt

3
app/src/main/kotlin/io/element/android/x/initializer/TracingInitializer.kt

@ -71,8 +71,7 @@ class TracingInitializer : Initializer<Unit> { @@ -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,
)
}

6
libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/tracing/WriteToFilesConfiguration.kt

@ -21,7 +21,9 @@ sealed interface WriteToFilesConfiguration { @@ -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"
}
}

Loading…
Cancel
Save