Skip to content

Commit

Permalink
docs: add 'best performance for basic stdout logging' to help.md (#1584)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
janeklb and mcollina authored May 8, 2023
1 parent 962bc2b commit b473f36
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/help.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
* [Unicode and Windows terminal](#windows)
* [Mapping Pino Log Levels to Google Cloud Logging (Stackdriver) Severity Levels](#stackdriver)
* [Avoid Message Conflict](#avoid-message-conflict)
* [Best performance for logging to `stdout`](#best-performance-for-stdout)

<a id="rotate"></a>
## Log rotation
Expand Down Expand Up @@ -288,3 +289,16 @@ log.info({ msg: 'mapped to originalMsg' }, 'a message')
// {"level":30,"time":1596313323106,"pid":63739,"hostname":"foo","msg":"no original message"}
// {"level":30,"time":1596313323107,"pid":63739,"hostname":"foo","msg":"a message","originalMsg":"mapped to originalMsg"}
```

<a id="best-performance-for-stdout"></a>
## Best performance for logging to `stdout`

The best performance for logging directly to stdout is _usually_ achieved by using the
default configuration:

```js
const log = require('pino')();
```

You should only have to configure custom transports or other settings
if you have broader logging requirements.

0 comments on commit b473f36

Please sign in to comment.