winston-datadog-udp-transport
v1.0.1
Published
Winston transport for logging to DataDog using UDP to send logging to the DD agent
Downloads
8
Readme
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.