LogManager
classin packageklyn.logging
public final class LogManager:
LogManager

Global registry and dispatch point for Klyn logging.

Logger lookup, level configuration and handler replacement are synchronized; normal event dispatch reads one stable handler reference and does not hold the manager lock during destination I/O.

Example
import klyn.logging

logger = LogManager.getLogger("myapp")
logger.info("Server started")
Properties
Modifier and Type Member Description
public static property level
level as LogLevel:
Root minimum logging level.
Methods
Modifier and Type Member Description
public static configure
configure(configuration as LogConfiguration) as Void throws LogConfigurationException:
Builds and atomically applies a TOML-derived configuration.
public static configure
configure(handler as LogHandler) as Void:
Replaces the complete handler graph.
public static flush
flush() as Void:
Flushes the active handler graph.
public static getLogger
getLogger(name as String) as Logger:
Gets the cached logger for a hierarchical name.
public static getLogger
getLogger<T>() as Logger:
Gets a logger named after a static type.
public static registerHandlerFactory
registerHandlerFactory(factory as LogHandlerFactory) as Void:
Registers or replaces a TOML handler factory.
public static shutdown
shutdown() as Void:
Flushes and closes the active handler graph.