Skip to content

Commit

Permalink
Update pino types for browser.formatters
Browse files Browse the repository at this point in the history
  • Loading branch information
KatelynKim committed Apr 22, 2024
1 parent d9911b0 commit edfd53c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions pino.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,17 @@ declare namespace pino {
* pino.info('hi') // creates and logs {msg: 'hi', level: 30, time: <ts>}
*/
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<string, unknown>) => Record<string, unknown>;
}
/**
* 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
Expand Down

0 comments on commit edfd53c

Please sign in to comment.