mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-06 07:47:04 +00:00
Include types for pino 5.20. See https://github.com/pinojs/pino/pull/492
This commit is contained in:
Vendored
+10
-1
@@ -1,8 +1,9 @@
|
||||
// Type definitions for pino 4.16
|
||||
// Type definitions for pino 5.20
|
||||
// Project: https://github.com/pinojs/pino.git
|
||||
// Definitions by: Peter Snider <https://github.com/psnider>
|
||||
// BendingBender <https://github.com/BendingBender>
|
||||
// Christian Rackerseder <https://github.com/screendriver>
|
||||
// GP <https://github.com/paambaati>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
@@ -145,6 +146,10 @@ declare namespace P {
|
||||
* requires supplying a level value via `levelVal`. Default: 'info'.
|
||||
*/
|
||||
level?: LevelWithSilent | string;
|
||||
/**
|
||||
* Outputs the level as a string instead of integer. Default: `false`.
|
||||
*/
|
||||
useLevelLabels?: boolean;
|
||||
/**
|
||||
* When defining a custom log level via level, set to an integer value to define the new level. Default: `undefined`.
|
||||
*/
|
||||
@@ -268,6 +273,10 @@ declare namespace P {
|
||||
* You can pass `'silent'` to disable logging.
|
||||
*/
|
||||
level: LevelWithSilent | string;
|
||||
/**
|
||||
* Outputs the level as a string instead of integer.
|
||||
*/
|
||||
useLevelLabels: boolean;
|
||||
/**
|
||||
* Returns the integer value for the logger instance's logging level.
|
||||
*/
|
||||
|
||||
@@ -96,3 +96,7 @@ pino.levels.labels[50] === 'error';
|
||||
|
||||
const logstderr: pino.Logger = pino(process.stderr);
|
||||
logstderr.error('on stderr instead of stdout');
|
||||
|
||||
log.useLevelLabels = true;
|
||||
log.info('lol');
|
||||
log.level === 'info';
|
||||
|
||||
Reference in New Issue
Block a user