mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-14 05:50:20 +00:00
Merge pull request #33472 from OliverJAsh/oja/pino-http/custom-log-level
pino-http: add `customLogLevel` option
This commit is contained in:
Vendored
+1
@@ -20,6 +20,7 @@ declare namespace PinoHttp {
|
||||
genReqId?: GenReqId;
|
||||
useLevel?: Level;
|
||||
stream?: DestinationStream;
|
||||
customLogLevel?: (res: ServerResponse, error: Error) => Level;
|
||||
}
|
||||
|
||||
interface GenReqId {
|
||||
|
||||
@@ -18,3 +18,4 @@ pinoHttp({ genReqId: (req) => Buffer.allocUnsafe(16) });
|
||||
pinoHttp({ useLevel: 'error' });
|
||||
pinoHttp({ prettyPrint: true });
|
||||
pinoHttp(new Writable());
|
||||
pinoHttp({ customLogLevel(req, res) { return 'info'; } });
|
||||
|
||||
Reference in New Issue
Block a user