Docs (4.0.0)
class LogWriter type

type LogMessageData

The data structure contained by each LogMessageEvent.

static

type LogMessageData = Readonly<{
    message: string;
    error?: Error;
    data: any[];
    level: number;
}>

Description

Each log message written by LogWriter is emitted as an event on LogWriter.emitter. The data contained by the event contains the following properties:

  • message — A string representation of the log message.
  • error — The original error that was logged, if any.
  • data — Additional data, such as error details or format placeholder values.
  • level — A number indicating the severity level (0–5).

Related

  • class LogWriterA class that handles log messages, part of the global application context.