From de81f5f7a0d035073c73f6af1416b6f086f5e8c5 Mon Sep 17 00:00:00 2001 From: Imgodmaoyouknow <55078436+Imgodmaoyouknow@users.noreply.github.com> Date: Wed, 14 Aug 2024 21:17:16 +0800 Subject: [PATCH] Update transports.md (#2027) 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. --- docs/transports.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/transports.md b/docs/transports.md index 597047c6a..fbf423e03 100644 --- a/docs/transports.md +++ b/docs/transports.md @@ -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')