Class ZLogWriterAbstract

Log message writer.

The log fields format and write log message contents using this writer.

The instance of this class can be reused by different messages and fields.

Hierarchy

  • ZLogWriter

Constructors

Properties

message: ZLogMessage

The log message to format and write.

Methods

  • Changes the message to write.

    A field may decide to modify the message e.g. to exclude some of its properties from further formatting.

    Parameters

    Returns void

  • Formats a log message by the given field.

    Parameters

    Returns undefined | string

    Either a formatted field string, or undefined if nothing to format.

  • Writes elements of arbitrary iterable.

    Writes each element by writeValue, and separates them with comma.

    Parameters

    • value: Iterable<any>

      An iterable of elements to write.

    Returns void

  • Writes arbitrary key/value pair.

    Ignores properties with undefined values.

    Writes value by writeValue method. Separates key and value by colon.

    Parameters

    • key: PropertyKey

      Property key to write.

    • value: unknown

      Property value to write.

    Returns void

  • Writes arbitrary object value.

    For array, writes its elements by writeElements, and encloses them into square brackets.

    For anything else, writes object properties by writeProperties, and encloses them into curly brackets.

    Parameters

    • value: object

      Object value to write.

    Returns void

Generated using TypeDoc