@@ -132,7 +132,7 @@ Then we simply pipe a log file through `pino`:
132132cat log | pino
133133```
134134
135- There's also a transformer flag that converts Epoch timestamps to ISO timestamps.
135+ There's also a transformer flag that converts Epoch timestamps to ISO timestamps.
136136
137137``` sh
138138cat log | pino -t
@@ -162,6 +162,9 @@ Into this:
162162 * <a href =" #info " ><code >logger.<b >info()</b ></code ></a >
163163 * <a href =" #debug " ><code >logger.<b >debug()</b ></code ></a >
164164 * <a href =" #trace " ><code >logger.<b >trace()</b ></code ></a >
165+ * <a href =" #levelVal " ><code >logger.<b >levelVal</b ></code ></a >
166+ * <a href =" #levelValues " ><code >pino.levels.<b >values</b ></code ></a >
167+ * <a href =" #levelLabels " ><code >pino.levels.<b >labels</b ></code ></a >
165168 * <a href =" #reqSerializer " ><code >pino.stdSerializers.<b >req</b ></code ></a >
166169 * <a href =" #resSerializer " ><code >pino.stdSerializers.<b >res</b ></code ></a >
167170 * <a href =" #errSerializer " ><code >pino.stdSerializers.<b >err</b ></code ></a >
@@ -216,7 +219,7 @@ Child loggers use the same output stream as the parent and inherit
216219the current log level of the parent at the time they are spawned.
217220
218221From v2.x.x the log level of a child is mutable (whereas in
219- v1.x.x it was immutable), and can be set independently of the parent.
222+ v1.x.x it was immutable), and can be set independently of the parent.
220223
221224For example
222225
@@ -331,10 +334,35 @@ object, all its properties will be included in the JSON line.
331334If more args follows ` msg ` , these will be used to format ` msg ` using
332335[ ` util.format ` ] ( https://nodejs.org/api/util.html#util_util_format_format )
333336
337+ <a name =" levelVal " ></a >
338+ ### logger.levelVal
339+
340+ Returns the integer value for the logger instance's logging level.
341+
342+ <a name =" levelValues " ></a >
343+ ### pino.levels.values
344+
345+ Returns the mappings of level names to their respective internal number
346+ representation. For example:
347+
348+ ``` js
349+ pino .levels .values .error === 50 // true
350+ ```
351+
352+ <a name =" levelLabels " ></a >
353+ ### pino.levels.labels
354+
355+ Returns the mappings of level internal level numbers to their string
356+ representations. For example:
357+
358+ ``` js
359+ pino .levels .labels [50 ] === ' error' // true
360+ ```
361+
334362<a name =" reqSerializer " ></a >
335363### pino.stdSerializers.req
336364
337- Generates a JSONifiable object from the HTTP ` request ` object passed to
365+ Generates a JSONifiable object from the HTTP ` request ` object passed to
338366the ` createServer ` callback of Node's HTTP server.
339367
340368It returns an object in the form:
@@ -363,7 +391,7 @@ It returns an object in the form:
363391<a name =" resSerializer " ></a >
364392### pino.stdSerializers.res
365393
366- Generates a JSONifiable object from the HTTP ` response ` object passed to
394+ Generates a JSONifiable object from the HTTP ` response ` object passed to
367395the ` createServer ` callback of Node's HTTP server.
368396
369397It returns an object in the form:
@@ -579,7 +607,7 @@ See the [koa-pino-logger v2 readme](https://github.com/davidmarkclements/koa-pin
579607<a name =" rotate " ></a >
580608## How do I rotate log files
581609
582- Use a separate tool for log rotation.
610+ Use a separate tool for log rotation.
583611
584612We recommend [ logrotate] ( https://github.com/logrotate/logrotate )
585613
@@ -678,8 +706,8 @@ $ cat my-log | pino -t
678706
679707This equates to the same log output that Bunyan supplies.
680708
681- One of Pino's performance tricks is to avoid building objects and stringifying
682- them, so we're building strings instead. This is why duplicate keys between
709+ One of Pino's performance tricks is to avoid building objects and stringifying
710+ them, so we're building strings instead. This is why duplicate keys between
683711parents and children will end up in log output.
684712
685713<a name="team"></a>
0 commit comments