Skip to content

Logger

1 min read

Import: import system.logging;

Read the usage guide for examples and common tasks. This reference lists the public declarations for this part of the library. See Reading API signatures for parameter and result notation.

Logger

A named logger with a minimum severity and configurable output handlers.

public class Logger

constructor

Creates a Logger with name.

public constructor(name: string)

get

Returns the named logger, creating it on first use.

public static fun get(name: string): Logger

level

Minimum severity emitted by this logger.

public get level(): LogLevel

level

Minimum severity emitted by this logger.

public set level(level: LogLevel)

add_handler

Registers an additional handler.

public fun add_handler(h: LogHandler): void

trace

Logs at Trace.

public fun trace(msg: string): void

debug

Logs at Debug.

public fun debug(msg: string): void

info

Logs at Info.

public fun info(msg: string): void

warn

Logs at Warn.

public fun warn(msg: string): void

error

Logs at Error.

public fun error(msg: string): void