🤖 Merge PR #47054 [@types/pino-http] Add wrapSerializers option by @ikottman

This commit is contained in:
Ian Kottman 2020-08-26 15:25:15 -05:00 committed by GitHub
parent 06e6094959
commit f03d6da5b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -34,6 +34,7 @@ declare namespace PinoHttp {
customSuccessMessage?: (res: ServerResponse) => string;
customErrorMessage?: (error: Error, res: ServerResponse) => string;
customAttributeKeys?: CustomAttributeKeys;
wrapSerializers?: boolean;
reqCustomProps?: (req: IncomingMessage) => object;
}

View File

@ -31,4 +31,5 @@ pinoHttp({ customAttributeKeys: { responseTime: 'responseTime' } });
pinoHttp({ customAttributeKeys: { req: 'req', res: 'res', err: 'err', responseTime: 'responseTime' } });
pinoHttp({ customLogLevel: (req, res) => 'info' });
pinoHttp({ reqCustomProps: req => ({ key1: 'value1', 'x-key-2': 'value2' }) });
pinoHttp({ wrapSerializers: false });
pinoHttp(new Writable());