log5424
    Preparing search index...

    Interface Options

    Options for message generation.

    All properties are optional. When omitted, RFC 5424-friendly defaults or values from the current runtime environment are used.

    interface Options {
        appName?: string;
        defaultSdId?: string;
        facility?: string | number;
        hostname?: string;
        msgId?: string;
        procId?: string | number;
        severity?: string | number;
        structuredData?: string | StructuredDataElement | StructuredDataElement[];
        timestamp?: string | Date;
    }
    Index

    Properties

    appName?: string

    Application name token placed in the message header.

    "-"
    
    defaultSdId?: string

    Default SD-ID used when structured data objects omit sdId. When omitted, the effective default falls back to appName.

    facility?: string | number

    Syslog facility. Accepts an integer in the range 0 through 23 or a facility name such as "local4".

    16
    
    hostname?: string

    Hostname token placed in the message header. Defaults to os.hostname().

    msgId?: string

    Message identifier token placed in the message header.

    "-"
    
    procId?: string | number

    Process identifier token placed in the message header. Defaults to process.pid.

    severity?: string | number

    Severity where 0 is emergency, 1 is alert, and so on. Accepts either numeric severity codes (0 through 7) or severity names such as "error" and "warning".

    7
    
    structuredData?: string | StructuredDataElement | StructuredDataElement[]

    Structured data as a raw string, a single structured data object, or an array of structured data objects.

    "-"
    
    timestamp?: string | Date

    Message timestamp. Accepts an RFC 3339 date-time string (e.g., 2026-04-01T00:00:00.000Z) or a JavaScript Date instance. When omitted, the current time is used.