0.0.3 • Published 5 years ago

winston-log2node-transport v0.0.3

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

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

PropertyTypeDescription
urlstringThe url to the log2node-server (default: ws://localhost:5580/incoming)
retryInMillisnumberNumber of milliseconds to wait until a new retry attempt (default: 5000).

License

MIT License