winston-transport-udp-logstash
v1.0.3
Published
Winston LogStash UDP transport
Downloads
11
Maintainers
Readme
winston-transport-logstash-udp
Transport for winston
logger to write logs via UDP to logStash
Usage
import { logStashTransport } from 'winston-transport-logstash-udp';
...
const logger = winston.createLogger({
level: 'info',
transports: [
new logStashTransport({
host: <host>,
port: <port>,
udpType: "udp4" | "udp5" (default "udp4"),
application: <your_app_name>
}))
]
})
logger.info('My First Log');
#LogEntry Object Structure
{
level: level,
message: msg,
meta: {
application: this.application,
serverName: this.serverName,
},
timestamp: new Date()
};