Creates a new Sentry Winston transport that fowards logs to Sentry. Requires the enableLogs option to be enabled.
enableLogs
Supports Winston 3.x.x.
The Winston transport class to extend.
Optional
The extended transport class.
const winston = require('winston');const Transport = require('winston-transport');const SentryWinstonTransport = Sentry.createSentryWinstonTransport(Transport);const logger = winston.createLogger({ transports: [new SentryWinstonTransport()],}); Copy
const winston = require('winston');const Transport = require('winston-transport');const SentryWinstonTransport = Sentry.createSentryWinstonTransport(Transport);const logger = winston.createLogger({ transports: [new SentryWinstonTransport()],});
Creates a new Sentry Winston transport that fowards logs to Sentry. Requires the
enableLogsoption to be enabled.Supports Winston 3.x.x.