1.3.6 • Published 6 months ago

@types/express-bunyan-logger v1.3.6

Weekly downloads
3,033
License
MIT
Repository
github
Last release
6 months ago

Installation

npm install --save @types/express-bunyan-logger

Summary

This package contains type definitions for express-bunyan-logger (https://github.com/villadora/express-bunyan-logger).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/express-bunyan-logger.

index.d.ts

// Type definitions for express-bunyan-logger 1.3
// Project: https://github.com/villadora/express-bunyan-logger
// Definitions by: Shrey Jain <https://github.com/shreyjain1994>
//                 Matt R. Wilson <https://github.com/mastermatt>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3

import Bunyan = require('bunyan');
import express = require('express');

export = Factory;

declare function Factory(options?: Factory.Options): express.RequestHandler;

declare namespace Factory {
    type FormatFunction = (meta: any) => string;
    type IncludesFunction = (req: express.Request, res: express.Response) => any;
    type RequestIdGenFunction = (req: express.Request) => string;
    type LevelFunction = (status: number, err: Error | null, meta: any) => string;

    interface Options extends Partial<Bunyan.LoggerOptions> {
        logger?: Bunyan | undefined;
        format?: string | FormatFunction | undefined;
        parseUA?: boolean | undefined;
        levelFn?: LevelFunction | undefined;
        includesFn?: IncludesFunction | undefined;
        excludes?: string[] | undefined;
        obfuscate?: string[] | undefined;
        obfuscatePlaceholder?: string | undefined;
        immediate?: boolean | undefined;
        genReqId?: RequestIdGenFunction | undefined;
    }

    function errorLogger(options?: Options): express.ErrorRequestHandler;
}

Additional Details

Credits

These definitions were written by Shrey Jain, and Matt R. Wilson.

1.3.6

6 months ago

1.3.5

7 months ago

1.3.4

8 months ago

1.3.3

3 years ago

1.3.2

5 years ago

1.3.1

5 years ago

1.3.0

6 years ago