Socket
Socket
Sign inDemoInstall

log4js-logstash-tcp

Package Overview
Dependencies
0
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.4 to 1.0.5

classes/TcpConnectionPool.js

18

index.js
'use strict';
const net = require('net');
const util = require('util');
const TcpConnectionPool = require("./classes/TcpConnectionPool");
const tcpConnectionPool = new TcpConnectionPool();
function sendLog(host, port, logObject) {
const msg = JSON.stringify(logObject) + "\n";
const tcp = net.connect({host: host, port: port}, function () {
tcp.write(msg, 'utf8', () => {
tcp.end();
tcp.destroy();
});
});
tcp.on('error', function (evt) {
console.error('An error happened while sending log line to logstash', evt);
});
tcpConnectionPool.send(host, port, logObject);
}
function logstashTCP(config, layout) {

@@ -22,0 +14,0 @@ const type = config.logType ? config.logType : config.category;

{
"name": "log4js-logstash-tcp",
"version": "1.0.4",
"version": "1.0.5",
"author": "Aigent B.V.",

@@ -5,0 +5,0 @@ "description": "This is a copy of the logstashUDP appender but instead sending via UDP send via TCP to avoid the maximum 64k bytes message size with the logstashUDP appender.",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc