1.3.6 • Published 6 months ago
@types/express-bunyan-logger v1.3.6
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
- Last updated: Thu, 08 Jul 2021 12:01:16 GMT
- Dependencies: @types/bunyan, @types/express
- Global values: none
Credits
These definitions were written by Shrey Jain, and Matt R. Wilson.