log5424
    Preparing search index...

    Function warning

    • Builds a syslog message at warning severity.

      The message is normalized and validated before serialization. Invalid option values throw TypeErrors with field-specific messages.

      The return value is a string in RFC 5424 format: PRI VERSION TIMESTAMP HOSTNAME APP-NAME PROCID MSGID STRUCTURED-DATA [MSG]

      When msg is "", null, or undefined, the MSG trailing free-text message portion is omitted entirely.

      Parameters

      • Optionalmsg: string | null

        Optional free-text syslog message body.

      • Optionaloptions: Options = defaultOptions

        Header and structured data overrides.

      Returns string

      Serialized RFC 5424 syslog message.

      Thrown when any option is invalid.