mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-04 04:01:52 +00:00
[pino] add levelKey option, deprecate changeLevelName option (#42887)
This commit is contained in:
Vendored
+5
-1
@@ -1,4 +1,4 @@
|
||||
// Type definitions for pino 5.15
|
||||
// Type definitions for pino 5.17
|
||||
// Project: https://github.com/pinojs/pino.git, http://getpino.io
|
||||
// Definitions by: Peter Snider <https://github.com/psnider>
|
||||
// BendingBender <https://github.com/BendingBender>
|
||||
@@ -227,6 +227,10 @@ declare namespace P {
|
||||
/**
|
||||
* Changes the property `level` to any string value you pass in. Default: 'level'
|
||||
*/
|
||||
levelKey?: string;
|
||||
/**
|
||||
* (DEPRECATED, use `levelKey`) Changes the property `level` to any string value you pass in. Default: 'level'
|
||||
*/
|
||||
changeLevelName?: string;
|
||||
/**
|
||||
* Use this option to define additional logging levels.
|
||||
|
||||
@@ -77,6 +77,7 @@ pino({
|
||||
|
||||
pino({ base: null });
|
||||
pino({ base: { foo: 'bar' }, changeLevelName: 'severity' });
|
||||
pino({ base: { foo: 'bar' }, levelKey: 'severity' });
|
||||
if ('pino' in log) console.log(`pino version: ${log.pino}`);
|
||||
|
||||
log.child({ a: 'property' }).info('hello child!');
|
||||
|
||||
Reference in New Issue
Block a user