0.0.3 • Published 5 years ago
winston-log2node-transport v0.0.3
winston-log2node-transport
A winston transport for sending the log messages to a node server via websocket.
Installation
npm install winston-log2node-transport
Usage
const winston = require('winston')
const LogToNodeTransport = require('winston-log2node-transport');
const logger = winston.createLogger({
transports: [
new LogToNodeTransport({
level: 'debug',
url: 'http://localhost:5580/incoming'
})
]
})
Transport properties
Property | Type | Description |
---|---|---|
url | string | The url to the log2node-server (default: ws://localhost:5580/incoming ) |
retryInMillis | number | Number of milliseconds to wait until a new retry attempt (default: 5000 ). |