Skip to content

Commit

Permalink
Added docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mcollina committed Jul 7, 2021
1 parent 78485ff commit 7af5c7d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/api.md
Expand Up @@ -939,6 +939,10 @@ const transports = pino.transport({
pino(transports)
```

If `WeakRef`, `WeakMap` and `FinalizationRegistry` are available in the current runtime (v14.5.0+), then the thread
will be automatically terminated in case the stream or logger goes out of scope.
The `transport()` function adds a listener to `process.on('exit')` to ensure the worker is flushed and all data synced
before the process exits.

For more on transports, how they work, and how to create them see the [`Transports documentation`](/docs/transports.md).

Expand Down

0 comments on commit 7af5c7d

Please sign in to comment.