A11 TypeScript API - v0.7.0
    Preparing search index...

    Interface LogOptions

    Everything about a log other than the value being logged.

    interface LogOptions {
        channel?: string;
        file?: string;
        internal?: boolean;
        level?: string;
        lineno?: number;
        metadata?:
            | Readonly<Record<string, string | Uint8Array<ArrayBufferLike>>>
            | ReadonlyMap<string, string | Uint8Array<ArrayBufferLike>>;
        mimetype?: string;
    }
    Index
    channel?: string

    Logical channel; see LOG_CHANNEL_ATTRIBUTE.

    file?: string

    Source file the log came from.

    internal?: boolean

    Whether this is A11's own bookkeeping rather than a user-facing line.

    level?: string

    Level name; omitted is DEFAULT_LOG_LEVEL.

    lineno?: number

    Source line the log came from.

    metadata?:
        | Readonly<Record<string, string | Uint8Array<ArrayBufferLike>>>
        | ReadonlyMap<string, string | Uint8Array<ArrayBufferLike>>

    Extra attributes, merged before the fields above.

    mimetype?: string

    Media type hint for the serializer.

    Unlike C++, TypeScript distinguishes text from bytes already: a string is text/plain and a Uint8Array is application/octet-stream through the ordinary registry, so a log needs no special case here.