Libraries
    Preparing search index...

    Interface RequestLoggingOptions

    Request logging middleware configuration.

    interface RequestLoggingOptions {
        enrichRequest?: (ctx: any) => Record<string, unknown>;
        excludePaths?: (string | { path: string })[];
        getLevel?: (statusCode: number, elapsedMs: number) => LogLevelName;
        logRequestBody?: boolean;
        logRequestStart?: boolean;
        logResponseBody?: boolean;
    }
    Index

    Properties

    enrichRequest?: (ctx: any) => Record<string, unknown>

    Extract custom properties from the request context.

    excludePaths?: (string | { path: string })[]

    Paths to exclude from request logging. Accepts plain strings or objects with a path property (e.g. endpoint builders).

    getLevel?: (statusCode: number, elapsedMs: number) => LogLevelName

    Customize log level based on status code and elapsed time.

    logRequestBody?: boolean

    Whether to log request bodies.

    false
    
    logRequestStart?: boolean

    Whether to log when request starts (in addition to completion).

    false
    
    logResponseBody?: boolean

    Whether to log response bodies.

    false