@chitkosarvesh/winston-logstash
v0.0.4
Published
Adds Logstash support to Winston 3
Downloads
2
Maintainers
Readme
Modules
HTTPInput
~module.exports ⏏
Kind: inner class of HTTPInput
new module.exports(options)
| Param | Type | Description | | --- | --- | --- | | options | Object | The 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)
| Param | Type | Description | | --- | --- | --- | | options | Object | The 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)
| Param | Type | Description | | --- | --- | --- | | options | Object | The 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 ([email protected])
module.exports ⏏
Kind: Exported class
new module.exports(options)
| Param | Type | Description | | --- | --- | --- | | options | Object | The Configuration object | | options.name | String | The name of the transport | | options.input | String | The input that you want to use | | options.host | String | The Logstash server host | | options.port | String | The 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
| Param | Type | Description | | --- | --- | --- | | info | Object | The log object that needs to be sent to Logstash | | callback | function | Callback function to call, once processing the log message is processed |