LogItem is a class that holds the attributes of a log item.

It is used by LogFormatter to store the attributes of a log item and to add additional attributes to it.

Constructors

  • Constructor for LogItem.

    Attributes are added in the following order:

    • Standard keys provided by the logger (e.g. message, level, timestamp)
    • Persistent attributes provided by developer, not formatted (done later)
    • Ephemeral attributes provided as parameters for a single log item (done later)

    Parameters

    • params: { attributes: LogAttributes }

      The parameters for the LogItem.

    Returns LogItem

Methods