Skip to content

Commit

Permalink
Update transports.md (#2041)
Browse files Browse the repository at this point in the history
* Update transports.md

add transport for yandex cloud logging

* Update transports.md

fix description
  • Loading branch information
Jhon-Mosk authored Sep 11, 2024
1 parent de5a697 commit 0ab1bdd
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions docs/transports.md
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,7 @@ PRs to this document are welcome for any new transports!
+ [pino-discord-webhook](#pino-discord-webhook)
+ [pino-logfmt](#pino-logfmt)
+ [pino-telegram-webhook](#pino-telegram-webhook)
+ [pino-yc-transport](#pino-yc-transport)
### Legacy
Expand Down Expand Up @@ -1091,6 +1092,33 @@ logger.error('<b>test log!</b>');
The `extra` parameter is optional. Parameters that the method [`sendMessage`](https://core.telegram.org/bots/api#sendmessage) supports can be passed to it.
<a id="pino-yc-transport"></a>
### pino-yc-transport
[pino-yc-transport](https://github.com/Jhon-Mosk/pino-yc-transport) is a Pino v7+ transport for writing to [Yandex Cloud Logging](https://yandex.cloud/ru/services/logging) from serveless functions or containers.
```js
const pino = require("pino");

const config = {
level: "debug",
transport: {
target: "pino-yc-transport",
},
};

const logger = pino(config);

logger.debug("some message")
logger.debug({ foo: "bar" });
logger.debug("some message %o, %s", { foo: "bar" }, "baz");
logger.info("info");
logger.warn("warn");
logger.error("error");
logger.error(new Error("error"));
logger.fatal("fatal");
```
<a id="communication-between-pino-and-transport"></a>
## Communication between Pino and Transports
Here we discuss some technical details of how Pino communicates with its [worker threads](https://nodejs.org/api/worker_threads.html).
Expand Down

0 comments on commit 0ab1bdd

Please sign in to comment.