@grow-codes/graylog - v0.1.1
    Preparing search index...

    Class GelfMessage

    One GELF 1.1 message. Build it with the constructor and setField, or from a LogRecord with fromLogRecord; serialise with toJSON / encode.

    Index
    fullMessage?: string
    host: string
    level?: number

    Syslog level 0–7.

    shortMessage: string
    timestamp?: number

    Unix seconds (millisecond precision).

    version: "1.1" = GELF_VERSION

    Always "1.1".

    • UTF-8 JSON bytes.

      Returns Uint8Array

    • Sets an additional field (name or _name). The key is validated (validateGelfFieldKey); the value is mapped by gelfFieldValue and a null value removes the field. Returns this for chaining.

      Parameters

      • key: string
      • value: unknown

      Returns this

    • Compact JSON text.

      Returns string