Logger Config
data class LoggerConfig(val name: String = "Lumina", val logsDirectory: Path = LoggerUtils.logsDir, val coroutineScope: CoroutineScope = CoroutineScope(SupervisorJob()), val format: (timestamp: String, coloredStrategyName: String, loggerName: String, content: Array<String>) -> String = { timestamp, coloredStrategyName, loggerName, content ->
val template = "[$timestamp] - $coloredStrategyName - $loggerName - "
content.joinToString("\n") { line -> "$template${line.replace("\n", "\n$template")}" }
}, val logChannelSize: Int = Channel.UNLIMITED, val logChannel: Channel<LogMessage> = Channel(logChannelSize), val logRotation: LoggerDSL.LogRotation.Config = LoggerDSL.LogRotation.Config(true, 30.days, 1.days))(source)
Deprecated
Use v4 instead
Replace with
mtctx.lumina.v4.LuminaConfigContent copied to clipboard
Constructors
Link copied to clipboard
constructor(name: String = "Lumina", logsDirectory: Path = LoggerUtils.logsDir, coroutineScope: CoroutineScope = CoroutineScope(SupervisorJob()), format: (timestamp: String, coloredStrategyName: String, loggerName: String, content: Array<String>) -> String = { timestamp, coloredStrategyName, loggerName, content ->
val template = "[$timestamp] - $coloredStrategyName - $loggerName - "
content.joinToString("\n") { line -> "$template${line.replace("\n", "\n$template")}" }
}, logChannelSize: Int = Channel.UNLIMITED, logChannel: Channel<LogMessage> = Channel(logChannelSize), logRotation: LoggerDSL.LogRotation.Config = LoggerDSL.LogRotation.Config(true, 30.days, 1.days))