diff --git a/types/pino/index.d.ts b/types/pino/index.d.ts index 71cb957643..75f045af01 100644 --- a/types/pino/index.d.ts +++ b/types/pino/index.d.ts @@ -150,6 +150,10 @@ declare namespace P { * Outputs the level as a string instead of integer. Default: `false`. */ useLevelLabels?: boolean; + /** + * Changes the property `level` to any string value you pass in. Default: 'level' + */ + changeLevelName?: string; /** * Use this option to define additional logging levels. * The keys of the object correspond the namespace of the log level, and the values should be the numerical value of the level. diff --git a/types/pino/pino-tests.ts b/types/pino/pino-tests.ts index 356f84da30..cec8f658fb 100644 --- a/types/pino/pino-tests.ts +++ b/types/pino/pino-tests.ts @@ -50,7 +50,7 @@ pino({ }); pino({ base: null }); -pino({ base: { foo: 'bar' } }); +pino({ base: { foo: 'bar' } , changeLevelName: 'severity' }); if ('pino' in log) console.log(`pino version: ${log.pino}`);