Simple udp transport for logger Pino
This module provides a "transport" for pino that simply forwards messages to an arbitrary socket. The socket can be UDPv4.
You should install pino-udp
for ease of use:
$ npm install pino-udp
const pino = require('pino');
const udpTransport = require('pino-udp');
let options = {
level: 'info'
};
let logger = pino(options, new udpTransport({
address: '127.0.0.1',
port: 12201,
}));
logger.info('test to udp');