1.0.1 • Published 5 years ago

winston-datadog-udp-transport v1.0.1

Weekly downloads
279
License
MIT
Repository
github
Last release
5 years ago

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.