magiclogger - v0.1.0
    Preparing search index...

    Interface ConsoleTransportOptions

    Console transport specific options.

    interface ConsoleTransportOptions {
        colorize?: boolean;
        consoleMethods?: Record<
            string,
            "log"
            | "info"
            | "error"
            | "debug"
            | "warn",
        >;
        debugStdout?: boolean;
        enabled?: boolean;
        excludeTags?: string[];
        filter?: (entry: LogEntry) => boolean;
        format?: "json" | "plain" | "custom";
        formatter?: (entry: LogEntry) => string | Buffer<ArrayBufferLike>;
        level?: string;
        levels?: string[];
        name?: string;
        silent?: boolean;
        stderrLevels?: boolean | string[];
        tags?: string[];
        timeout?: number;
    }

    Hierarchy (View Summary)

    Index

    Properties

    colorize?: boolean

    Whether to use colors in console output.

    true (when terminal supports it)
    
    consoleMethods?: Record<string, "log" | "info" | "error" | "debug" | "warn">

    Console method mapping for different log levels.

    debugStdout?: boolean

    Whether to inspect objects deeply.

    false
    
    enabled?: boolean

    Whether this transport is currently active. Allows runtime enabling/disabling of transports.

    true
    
    excludeTags?: string[]

    Tags that exclude logs from this transport. Logs with any of these tags are skipped.

    filter?: (entry: LogEntry) => boolean

    Custom filter function for advanced filtering logic. Return true to process the log, false to skip.

    format?: "json" | "plain" | "custom"

    Output format for this transport.

    'json'
    
    formatter?: (entry: LogEntry) => string | Buffer<ArrayBufferLike>

    Custom formatter function. Used when format is 'custom'.

    level?: string

    Minimum log level this transport will handle. Logs below this level are ignored by this transport.

    'info'
    
    levels?: string[]

    Custom levels this transport should handle. Allows fine-grained control over what gets logged where.

    name?: string

    Unique name identifier for this transport instance. Used for managing multiple transports.

    silent?: boolean

    Whether to handle errors silently or propagate them.

    true
    
    stderrLevels?: boolean | string[]

    Whether to use stderr for error/warn levels.

    true
    
    tags?: string[]

    Tags that must be present for this transport to handle a log. If specified, only logs with at least one matching tag are processed.

    timeout?: number

    Timeout for transport operations in milliseconds.

    30000 (30 seconds)