Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

log4js

Package Overview
Dependencies
Maintainers
1
Versions
152
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

log4js - npm Package Compare versions

Comparing version 6.1.2 to 6.2.0

5

CHANGELOG.md
# log4js-node changelog
## 6.2.0
- [Add custom message end token to TCP appender](https://github.com/log4js-node/log4js-node/pull/994) - thanks [@rnd-debug](https://github.com/rnd-debug)
- [Update acorn (dev dep of a dep)](https://github.com/log4js-node/log4js-node/pull/992) - thanks Github Robots.
## 6.1.2

@@ -4,0 +9,0 @@

16

lib/appenders/tcp.js

@@ -6,3 +6,3 @@

function appender(config) {
function appender(config, layout) {
let canWrite = false;

@@ -12,6 +12,7 @@ const buffer = [];

let shutdownAttempts = 3;
let endMsg = '__LOG4JS__';
function write(loggingEvent) {
debug('Writing log event to socket');
canWrite = socket.write(`${loggingEvent.serialise()}__LOG4JS__`, 'utf8');
canWrite = socket.write(`${layout(loggingEvent)}${endMsg}`, 'utf8');
}

@@ -30,2 +31,3 @@

debug(`appender creating socket to ${config.host || 'localhost'}:${config.port || 5000}`);
endMsg = `${config.endMsg || '__LOG4JS__'}`;
socket = net.createConnection(config.port || 5000, config.host || 'localhost');

@@ -74,7 +76,13 @@ socket.on('connect', () => {

function configure(config) {
function configure(config, layouts) {
debug(`configure with config = ${config}`);
return appender(config);
let layout = function (loggingEvent) {
return loggingEvent.serialise();
};
if (config.layout) {
layout = layouts.layout(config.layout.type, config.layout);
}
return appender(config, layout);
}
module.exports.configure = configure;
{
"name": "log4js",
"version": "6.1.2",
"version": "6.2.0",
"description": "Port of Log4js to work with node.",

@@ -63,3 +63,3 @@ "homepage": "https://log4js-node.github.io/log4js-node/",

"proxyquire": "^2.1.3",
"tap": "^14.9.2",
"tap": "^14.10.7",
"typescript": "^3.7.2",

@@ -66,0 +66,0 @@ "validate-commit-msg": "^2.14.0"

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc