LoggerFactory

The main entry point for configuring the logging pipeline and obtaining Logger instances.

Call install once during application initialization to configure sinks, level filtering, and per-tag overrides. If install is never called, a default configuration is used automatically (LogLevel.VERBOSE, DefaultLogSink).

Loggers read the installed configuration on every call, so a logger obtained before install (for example in a companion object) follows it too. Logger instances are cached by tag, so repeated calls to get with the same tag typically return the same object.

Functions

Link copied to clipboard
fun get(tag: String): Logger

Returns a Logger identified by tag.

Link copied to clipboard
fun install(config: LoggerConfig)

Installs a new configuration, replacing any previously installed one.