addHandler()
Adds a log sink handler for this log writer.
addHandler(
minLevel: number,
f: (message: LogWriter.LogMessageData) => void,
keepDefault?: boolean,
): void;
Parameters
- minLevel — The minimum log level for which messages are passed to the handler function
- f — A handler function, which should accept a single LogWriter.LogMessageData argument
- keepDefault — True if messages should still be written to the console by default (will be disabled if any handler is added without
keepDefault)
Related
class LogWriter
A class that handles log messages, part of the global application context.
