MultiLogHandler
classin packageklyn.logging.handler
public final class MultiLogHandler implements LogHandler, AutoClosable
MultiLogHandler
All Implemented Interfaces: LogHandler, AutoClosable

Fan-out handler forwarding each event to every enabled child handler.

Example
import klyn.logging
import klyn.logging.handler

handler = MultiLogHandler([ConsoleLogHandler(), JsonLogHandler("app.jsonl")])
Logs.configure(handler)
Properties
Modifier and Type Member Description
public readonly property handlers
handlers as IList<LogHandler>
Snapshot of the direct child handlers.
Constructors
Modifier and Type Member Description
public MultiLogHandler Creates a stable snapshot of child handlers.
Methods
Modifier and Type Member Description
public accepts
accepts(logger as String, level as LogLevel) as Boolean
Returns true when at least one child accepts the event.
public close
close() as Void
Flushes and closes closable children.
public flush
flush() as Void
Flushes every child.
public handle
handle(event as LogEvent) as Void
Forwards the event only to accepting children.
Inherited Methods
methodInherited Methods from AutoClosable: close