Skip to content

Commit b473f36

Browse files
janeklbmcollina
andauthored
docs: add 'best performance for basic stdout logging' to help.md (#1584)
* docs: add 'best performance for basic stdout logging' to help.md My attempt to capture @mcollina's reply: #1491 (comment) in some doc form * change help section * Update docs/help.md Co-authored-by: Matteo Collina <[email protected]> * Update docs/help.md Co-authored-by: Matteo Collina <[email protected]> --------- Co-authored-by: Matteo Collina <[email protected]>
1 parent 962bc2b commit b473f36

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

docs/help.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
* [Unicode and Windows terminal](#windows)
1313
* [Mapping Pino Log Levels to Google Cloud Logging (Stackdriver) Severity Levels](#stackdriver)
1414
* [Avoid Message Conflict](#avoid-message-conflict)
15+
* [Best performance for logging to `stdout`](#best-performance-for-stdout)
1516

1617
<a id="rotate"></a>
1718
## Log rotation
@@ -288,3 +289,16 @@ log.info({ msg: 'mapped to originalMsg' }, 'a message')
288289
// {"level":30,"time":1596313323106,"pid":63739,"hostname":"foo","msg":"no original message"}
289290
// {"level":30,"time":1596313323107,"pid":63739,"hostname":"foo","msg":"a message","originalMsg":"mapped to originalMsg"}
290291
```
292+
293+
<a id="best-performance-for-stdout"></a>
294+
## Best performance for logging to `stdout`
295+
296+
The best performance for logging directly to stdout is _usually_ achieved by using the
297+
default configuration:
298+
299+
```js
300+
const log = require('pino')();
301+
```
302+
303+
You should only have to configure custom transports or other settings
304+
if you have broader logging requirements.

0 commit comments

Comments
 (0)