Winston Datadog Logger
A winston logger with datadog support.
How to install
$ npm i winston-datadog-logger
Transport
The library exposes the transport itself.
You can initialize a transport with the following options:
Logger
The library provides a Logger
instance.
The LoggerOptions
(The options for initializing the logger)
The WinstonEvent
enum that exposes
the available event levels for your logs.
; // Initializing the options. ; // Initializing the Logger using the optionsLogger.initializeoptions; // Use the logger like this// Logger.log({ level }, { message }, { meta }); // e.gLogger.logWinstonEvent.Debug, 'example message', ;
Additionally, the library provides a Transport
instance if composing your own logger.
This is consumed similarly to the logger, albeit with fewer options
;; ; ; logger.log'debug', 'example message', ;
The second argument is optional, merely an escape hatch for any overrides from the larger logger options above.