An node library for writing messages to a TCP socket. Made specifically for interfacing with a Logstash instance configured with the TCP input plugin.
npm install --save tcp-elk-logger
# Load the Logger package
Logger = require('tcp-elk-logger');
# Create a logger object
logger = new Logger({'remote-host': '10.0.1.125', 'remote-port': '9999'});
# Send a log message
logger.sendMessage('Testing from node!');
# Send a json message
logger.sendJSON({
"style": "cold brew",
"vendor": "gracenote",
});
- Run
npm run tdd
- Add a test to test/index.js
- Add your code changes to index.js
- Run
npm run babel