KodioLogging
Central configuration and dispatch for Kodio's multiplatform logging facade.
Silent by default. No log output is produced until you configure a minimum level and at least one KodioLogWriter.
Enable logging
KodioLogging.configure {
minLevel = LogLevel.Debug
addWriter(platformLogWriter())
}Or from the library entry point:
Kodio.configureLogging {
minLevel = LogLevel.Info
addWriter(platformLogWriter())
}Disable logging
KodioLogging.minLevel = LogLevel.None
// or
KodioLogging.clearWriters()Custom writers
Add any number of KodioLogWriter instances; each log event is forwarded to every writer. Replace the full set with setWriters, append with addWriter, or reset with clearWriters.
Properties
Minimum level to emit. Defaults to LogLevel.None (fully silent).
Functions
Appends a writer to the current set.
Removes all writers. Combined with minLevel = LogLevel.None, logging stays silent.
Configures logging in a single block.
Returns whether level would be emitted given current configuration.
Replaces all writers with the given set.
Returns a snapshot of the currently registered writers.