diff --git a/pino.d.ts b/pino.d.ts index 41ffdfb4c..b6709a59d 100644 --- a/pino.d.ts +++ b/pino.d.ts @@ -427,6 +427,17 @@ declare namespace pino { * pino.info('hi') // creates and logs {msg: 'hi', level: 30, time: } */ asObject?: boolean; + formatters?: { + /** + * Changes the shape of the log level. + * The default shape is { level: number }. + */ + level?: (label: string, number: number) => object; + /** + * Changes the shape of the log object. + */ + log?: (object: Record) => Record; + } /** * Instead of passing log messages to `console.log` they can be passed to a supplied function. If `write` is * set to a single function, all logging objects are passed to this function. If `write` is an object, it