datadog-winston
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/datadog-winston package

1.6.0 • Public • Published

Build Status

datadog-winston

Ship winston logs to datadog without breaking a sweat

Install

$ npm install --save datadog-winston

or

$ yarn add datadog-winston

Options

  • apiKey: Your datadog api key [required]
  • hostname: The machine/server hostname
  • service: The name of the application or service generating the logs
  • ddsource: The technology from which the logs originated
  • ddtags: Metadata assoicated with the logs
  • intakeRegion: The datadog intake to use. set to eu to force logs to be sent to the EU specific intake

Usage

var winston = require('winston')
var DatadogWinston = require('datadog-winston')

var logger = winston.createLogger({
  // Whatever options you need
  // Refer https://github.com/winstonjs/winston#creating-your-own-logger
})

logger.add(
  new DatadogWinston({
    apiKey: 'super_secret_datadog_api_key',
    hostname: 'my_machine',
    service: 'super_service',
    ddsource: 'nodejs',
    ddtags: 'foo:bar,boo:baz'
  })
)

Readme

Keywords

none

Package Sidebar

Install

npm i datadog-winston

Weekly Downloads

25,599

Version

1.6.0

License

MIT

Unpacked Size

8.62 kB

Total Files

5

Last publish

Collaborators

  • itsfadnis