magiclogger - v0.1.0
    Preparing search index...

    Interface BatchingTransportOptions

    Combined options for batching transports.

    interface BatchingTransportOptions {
        compress?: boolean;
        enabled?: boolean;
        excludeTags?: string[];
        filter?: (entry: LogEntry) => boolean;
        format?: "json" | "plain" | "custom";
        formatter?: (entry: LogEntry) => string | Buffer<ArrayBufferLike>;
        immediate?: boolean;
        level?: string;
        levels?: string[];
        maxBatchBytes?: number;
        maxBatchSize?: number;
        maxBatchTime?: number;
        maxQueueSize?: number;
        maxRetries?: number;
        name?: string;
        retryDelay?: number;
        retryOnFailure?: boolean;
        silent?: boolean;
        tags?: string[];
        timeout?: number;
    }

    Hierarchy (View Summary)

    Index

    Properties

    compress?: boolean

    Compress batches before sending (gzip).

    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'.

    immediate?: boolean

    Whether to send logs immediately without batching. Overrides other batch settings when true.

    false
    
    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.

    maxBatchBytes?: number

    Maximum size in bytes before sending a batch.

    1048576 (1MB)
    
    maxBatchSize?: number

    Maximum number of logs to batch before sending.

    100
    
    maxBatchTime?: number

    Maximum time to wait before sending a batch (milliseconds).

    5000 (5 seconds)
    
    maxQueueSize?: number

    Maximum queue size.

    10000
    
    maxRetries?: number

    Maximum retry attempts for failed batches.

    3
    
    name?: string

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

    retryDelay?: number

    Initial retry delay in milliseconds.

    1000
    
    retryOnFailure?: boolean

    Whether to retry on failure.

    true
    
    silent?: boolean

    Whether to handle errors silently or propagate them.

    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)