officescripts-logging-framework
    Preparing search index...

    Interface Layout

    Interface to handle formatting of log events sent to appenders. The format defines the core structure of the log message content before it is sent to appenders. It is not intended for adornment or presentation (such as color or Excel formatting), but strictly for the canonical, consistent string representation of the log event.

    • Implementations must provide consistent, stateless formatting for all log events.
    • Layout should be deterministic and MUST NOT mutate the event.
    • Typical implementations may provide static/shared instances for consistency.
    • Layouts are intended for core message structure, not for display/presentation logic.

    LogEvent for the structure of log events.

    interface Layout {
        format(event: LogEvent): string;
        toString(): string;
    }

    Implemented by

    Index

    Methods

    • Formats the given log event into its core string representation.

      Parameters

      • event: LogEvent

        The log event to format (must be a valid, immutable LogEvent).

      Returns string

      The formatted string representing the event's core content. The formatted event will be the output of the appender.

      ScriptError if the event is invalid or cannot be formatted.

    • Returns a string describing the layout, ideally including the formatter function name or configuration. Used for diagnostics or debugging.

      Returns string