diff --git a/app-common/src/main/kotlin/net/thunderbird/app/common/core/logging/LoggerModule.kt b/app-common/src/main/kotlin/net/thunderbird/app/common/core/logging/LoggerModule.kt index e31b9f2c0b9..2dfe2abe1c8 100644 --- a/app-common/src/main/kotlin/net/thunderbird/app/common/core/logging/LoggerModule.kt +++ b/app-common/src/main/kotlin/net/thunderbird/app/common/core/logging/LoggerModule.kt @@ -46,10 +46,16 @@ val appCommonCoreLogger = module { ) } + // Setup for sync debug logger + // Define this list lazily to avoid eager initialization at app startup + single>(qualifier = named(SYNC_DEBUG_LOG), createdAtStart = false) { + listOf(get(named(SYNC_DEBUG_LOG))) + } + single(named(SYNC_DEBUG_LOG)) { CompositeLogSink( logLevelProvider = get(), - sinks = getList(), + sinks = get>(named(SYNC_DEBUG_LOG)), ) }