Skip to content

Commit

Permalink
Update transports.md (#2027)
Browse files Browse the repository at this point in the history
In the below example, erros logs will be send to my-transport.mjs, all logs will be send to some-file-transport.

Moreover, the option to send those logs is level.
  • Loading branch information
Imgodmaoyouknow authored Aug 14, 2024
1 parent 4b325fd commit de81f5f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/transports.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ is serialized and injected into the transport worker thread, then passed to the
This means that the options object can only contain types that are supported by the
[Structured Clone Algorithm][sca] which is used to (de)serialize objects between threads.

What if we wanted to use both transports, but send only error logs to `some-file-transport` while
sending all logs to `my-transport.mjs`? We can use the `pino.transport` function's `destinations` option:
What if we wanted to use both transports, but send only error logs to `my-transport.mjs` while
sending all logs to `some-file-transport`? We can use the `pino.transport` function's `level` option:

```js
const pino = require('pino')
Expand Down

0 comments on commit de81f5f

Please sign in to comment.