This package has been deprecated

Author message:

Package no longer supported

@marfle/winston-transport-datadog

0.2.0 • Public • Published

winston-transport-datadog

npm (scoped) node (scoped)

winston transport for Datadog logging.

There are couple of winston transports for datadog. This one does buffering, error handling and uses tls-tcp instead of https.

Install

npm install @marfle/winston-transport-datadog

Usage

Use:

const { createLogger } = require('winston');
const { DatadogTransport } = require('@marfle/winston-transport-datadog');

logger = createLogger({
  transports: [
    new DatadogTransport({
      apiKey: '<YOUR API KEY',
      // optional metadata which will be merged with log message
      metadata: {
        environment: process.env.NODE_ENV,
        service: 'myService'
      }
    })
  ]
});

Options

Name Default Description
apiKey undefined api key from datadog
host 'intake.logs.datadoghq.com' intake hostname
port 10516 intake port
bufferSize 10000 how many messages to buffer before discarding
reconnectInterval 10000
socketOptions { timeout: 10000 } options passed to tls.socket
metadata { ddsource: 'winston' } optional metadata which will be merged with log message

DatadogTransport extends Transport from winston-transport, so it's options also apply.

License

MIT See LICENSE file.

About us

Marfle makes software for workboat fleets

Package Sidebar

Install

npm i @marfle/winston-transport-datadog

Weekly Downloads

57

Version

0.2.0

License

MIT

Unpacked Size

6.7 kB

Total Files

4

Last publish

Collaborators

  • anajavi
  • joose
  • leikotu