From 0d15a17edfc22982cfe0d0020beabfec92d96751 Mon Sep 17 00:00:00 2001 From: Junior Date: Wed, 6 May 2026 15:50:29 +0000 Subject: [PATCH] docs: add Winston and Pino integration sections to common logs page The Winston (createSentryWinstonTransport) and Pino (pinoIntegration) logging integrations are available in all Node.js-based SDKs but were only documented on the Next.js-specific logs page. This adds them to the common logs page so they appear for Node.js and all other server-side JS guides. Wrapped in PlatformSection to only show for supported Node.js-based platforms. --- .../javascript/common/logs/index.mdx | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/docs/platforms/javascript/common/logs/index.mdx b/docs/platforms/javascript/common/logs/index.mdx index 10ff8ff4d5928..aa9b714dfd2f2 100644 --- a/docs/platforms/javascript/common/logs/index.mdx +++ b/docs/platforms/javascript/common/logs/index.mdx @@ -165,6 +165,73 @@ console.log("Executed Action for User:", 123, true); + + + + +## Logging Library Integrations + + + + + + +### Pino + +Send logs from the [Pino](https://github.com/pinojs/pino) logging library to Sentry. + +Requires SDK version `10.18.0` or higher. + + + + +```javascript +Sentry.init({ + dsn: "___PUBLIC_DSN___", + enableLogs: true, + integrations: [Sentry.pinoIntegration()], +}); +``` + +See Pino integration docs for configuration options. + + + + + + + +### Winston + +Send logs from the [Winston](https://github.com/winstonjs/winston) logging library to Sentry. + +Requires SDK version `9.13.0` or higher and `enableLogs: true` in your `Sentry.init` call. + + + + +```javascript +import winston from "winston"; +import Transport from "winston-transport"; + +const SentryTransport = Sentry.createSentryWinstonTransport(Transport, { + levels: ["error", "warn"], // optional filter +}); + +const logger = winston.createLogger({ + transports: [new SentryTransport()], +}); +``` + + + + + + + + + +