@types/express-bunyan-logger
TypeScript icon, indicating that this package has built-in type declarations

1.3.6 • Public • Published

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

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.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/express-bunyan-logger

Weekly Downloads

2,722

Version

1.3.6

License

MIT

Unpacked Size

5.19 kB

Total Files

5

Last publish

Collaborators

  • types