Skip to content

Commit

Permalink
Update destination docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jsumners committed Nov 21, 2021
1 parent 91e488b commit db5ead2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions docs/api.md
Expand Up @@ -422,7 +422,7 @@ Default: `pino.destination(1)` (STDOUT)
The `destination` parameter, at a minimum must be an object with a `write` method.
An ordinary Node.js `stream` can be passed as the destination (such as the result
of `fs.createWriteStream`) but for peak log writing performance it is strongly
recommended to use `pino.destination` to create the destination stream.
recommended to use `pino.destination` to create the destination stream.
Note that the `destination` parameter can be the result of `pino.transport()`.
```js
Expand All @@ -449,6 +449,10 @@ However, there are some special instances where `pino.destination` is not used a
In these cases `process.stdout` is used instead.
Note: If the parameter is a string integer, e.g. `'1'`, it will be coerced to
a number and used as a file descriptor. If this is not desired, provide a full
path, e.g. `/tmp/1`.
* See [`pino.destination`](#pino-destination)
<a id="metadata"></a>
Expand Down Expand Up @@ -1010,7 +1014,7 @@ is flushed and all data synced before the process exits.
Note that calling `process.exit()` on the main thread will stop the event loop on the main thread from turning. As a result,
using `console.log` and `process.stdout` after the main thread called `process.exit()` will not produce any output.
If you are embedding/integrating pino within your framework, you will need to make pino aware of the script that is calling it,
If you are embedding/integrating pino within your framework, you will need to make pino aware of the script that is calling it,
like so:
```js
Expand Down

0 comments on commit db5ead2

Please sign in to comment.