winston-datadog-udp-transport

1.0.1 • Public • Published

CircleCI codecov Maintainability npm

winston-datadog-udp-transport

Simple logging using UDP and the DataDog agent

The DataDog agent can be configured to accept logging via a UDP port, and then forward it to DataDog for ingestion. This Winston compatibe transport provides a very simple mechanism to make use of this feature. For more information on configuring the DataDog agent to accept UDP traffic, see this arcticle

Installation

npm install --save winston-datadog-udp-transport

Example

Basic setup

const winston = require('winston');
const udpTransport = require('');
const ddUdpTransport = new udpTransport({
    host: '127.0.0.1',
    port: 10518
});
const logger = new winston.Logger({
    transports: [
        ddUdpTransport
    ]
});

Note The transport uses localhost and 10518 as defaults, so for a standard configuration of the agent you don't need to supply any values in the constructor call.

Package Sidebar

Install

npm i winston-datadog-udp-transport

Weekly Downloads

2

Version

1.0.1

License

MIT

Unpacked Size

7.21 kB

Total Files

6

Last publish

Collaborators

  • themagoo