0.0.4 • Published 5 years ago

@chitkosarvesh/winston-logstash v0.0.4

Weekly downloads
1
License
ISC
Repository
github
Last release
5 years ago

Modules

HTTPInput

~module.exports ⏏

Kind: inner class of HTTPInput

new module.exports(options)

ParamTypeDescription
optionsObjectThe options object returned from the LogstashTransport class

module.exports~HTTPInput

Kind: inner class of module.exports

new HTTPInput()

The class that does transmission of logs using the HTTP Requests

TCPInput

~module.exports ⏏

Kind: inner class of TCPInput

new module.exports(options)

ParamTypeDescription
optionsObjectThe options object returned from the LogstashTransport class

module.exports~TCPInput

Kind: inner class of module.exports

new TCPInput()

The class that does transmission of logs using the TCP input

Example

node examples/basic-tcp.js

UDPInput

~module.exports ⏏

Kind: inner class of UDPInput

new module.exports(options)

ParamTypeDescription
optionsObjectThe options object returned from the LogstashTransport class

module.exports~UDPInput

Kind: inner class of module.exports

new UDPInput()

The class that does transmission of logs using the UDP input

Example

node examples/basic-udp.js

WebSocketInput

WebSocketInput~WebSocketInput

Kind: inner class of WebSocketInput

new WebSocketInput()

The class that does transmission of logs using the WebSockets

LogstashTransport

Author: Sarvesh Chitko (chitkosarvesh@gmail.com)

module.exports ⏏

Kind: Exported class

new module.exports(options)

ParamTypeDescription
optionsObjectThe Configuration object
options.nameStringThe name of the transport
options.inputStringThe input that you want to use
options.hostStringThe Logstash server host
options.portStringThe port of the Logstash pipeline you've configured

module.exports~LogstashTransport ⇐ Transport

Kind: inner class of module.exports
Extends: Transport

new LogstashTransport()

The main class that adds the Logstash capabilities to Winston

Throws:

  • UnsupportedInputError
  • InvalidParametersError

module.exports~log(info, callback)

Kind: inner method of module.exports

ParamTypeDescription
infoObjectThe log object that needs to be sent to Logstash
callbackfunctionCallback function to call, once processing the log message is processed