You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When `write` is set, `asObject` will always be `true`.
29
29
30
+
### `formatters` (Object)
31
+
32
+
An object containing functions for formatting the shape of the log lines. When provided, it enables the logger to produce a pino-like log object with customized formatting. Currently, it supports formatting for the `level` object only.
33
+
34
+
##### `level`
35
+
36
+
Changes the shape of the log level. The default shape is `{ level: number }`.
37
+
The function takes two arguments, the label of the level (e.g. `'info'`)
38
+
and the numeric value (e.g. `30`).
39
+
40
+
```js
41
+
constformatters= {
42
+
level (label, number) {
43
+
return { level: number }
44
+
}
45
+
}
46
+
```
47
+
48
+
30
49
### `write` (Function | Object)
31
50
32
51
Instead of passing log messages to `console.log` they can be passed to
0 commit comments