Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ class DefaultBugReporterTest {
assertThat((param as WriteToFilesConfiguration.Enabled).directory).endsWith("/cache/logs/server.org")
assertThat((param as WriteToFilesConfiguration.Enabled).filenamePrefix).isEqualTo("logs")
assertThat((param as WriteToFilesConfiguration.Enabled).numberOfFiles).isEqualTo(168)
assertThat((param as WriteToFilesConfiguration.Enabled).filenameSuffix).isEqualTo("log")
assertThat((param as WriteToFilesConfiguration.Enabled).filenameSuffix).isEqualTo(".log")
}

@OptIn(ExperimentalCoroutinesApi::class)
Expand Down Expand Up @@ -491,7 +491,7 @@ class DefaultBugReporterTest {
assertThat((param as WriteToFilesConfiguration.Enabled).directory).endsWith("/cache/logs")
assertThat((param as WriteToFilesConfiguration.Enabled).filenamePrefix).isEqualTo("logs")
assertThat((param as WriteToFilesConfiguration.Enabled).numberOfFiles).isEqualTo(168)
assertThat((param as WriteToFilesConfiguration.Enabled).filenameSuffix).isEqualTo("log")
assertThat((param as WriteToFilesConfiguration.Enabled).filenameSuffix).isEqualTo(".log")
}

@Test
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ test_detekt_test = { module = "io.gitlab.arturbosch.detekt:detekt-test", version
# https://github.com/matrix-org/matrix-rust-components-kotlin/commits/main/sdk/sdk-android/src/main/kotlin/org/matrix/rustcomponents/sdk/matrix_sdk_ffi.kt
# All new features should not be implemented in the pull request that upgrades the version, developers should
# only fix API breaks and may add some TODOs.
matrix_sdk = "org.matrix.rustcomponents:sdk-android:26.2.10"
matrix_sdk = "org.matrix.rustcomponents:sdk-android:26.2.16"

# Others
coil = { module = "io.coil-kt.coil3:coil", version.ref = "coil" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ sealed interface WriteToFilesConfiguration {
val filenamePrefix: String,
val numberOfFiles: Int?,
) : WriteToFilesConfiguration {
// DO NOT CHANGE: suffix *MUST* be "log" for the rageshake server to not rename the file to something generic
val filenameSuffix = "log"
// DO NOT CHANGE: suffix *MUST* be ".log" for the rageshake server to not rename the file to something generic
val filenameSuffix = ".log"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ package io.element.android.libraries.matrix.impl.tracing

import dev.zacsweers.metro.AppScope
import dev.zacsweers.metro.ContributesBinding
import io.element.android.libraries.core.data.ByteUnit
import io.element.android.libraries.core.data.megaBytes
import io.element.android.libraries.core.meta.BuildMeta
import io.element.android.libraries.matrix.api.tracing.LogLevel
import io.element.android.libraries.matrix.api.tracing.TracingConfiguration
Expand Down Expand Up @@ -49,7 +51,10 @@ private fun WriteToFilesConfiguration.toTracingFileConfiguration(): TracingFileC
path = directory,
filePrefix = filenamePrefix,
fileSuffix = filenameSuffix,
maxFiles = numberOfFiles?.toULong(),
// Have at max 100MB of logs in disk
maxTotalSizeBytes = 100.megaBytes.into(ByteUnit.BYTES).toULong(),
// Store up to 7 days of logs
maxAgeSeconds = (7 * 24 * 60 * 60).toULong(),
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ internal fun aRustRoomInfo(
successorRoom: SuccessorRoom? = null,
roomVersion: String? = "11",
privilegedCreatorsRole: Boolean = false,
serviceMembers: List<String> = emptyList(),
) = RoomInfo(
id = id,
displayName = displayName,
Expand Down Expand Up @@ -94,4 +95,5 @@ internal fun aRustRoomInfo(
successorRoom = successorRoom,
roomVersion = roomVersion,
privilegedCreatorsRole = privilegedCreatorsRole,
serviceMembers = serviceMembers,
)
Loading