mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-11 12:40:15 +00:00
pino-http: add customLogLevel option
This commit is contained in:
1
types/pino-http/index.d.ts
vendored
1
types/pino-http/index.d.ts
vendored
@@ -20,6 +20,7 @@ declare namespace PinoHttp {
|
||||
genReqId?: GenReqId;
|
||||
useLevel?: Level;
|
||||
stream?: DestinationStream;
|
||||
customLogLevel?: (res: unknown, error: unknown) => 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