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

log8js

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

log8js - npm Package Compare versions

Comparing version 3.0.7 to 4.0.0

14

log8js.js

@@ -8,3 +8,3 @@ var log8js, os;

log8js.open = function(app, module, debug, config) {
log8js.open = function(app, module, debug, config, parallelsAppender) {
var log4js, log4jsConfig;

@@ -23,3 +23,4 @@ log4jsConfig = {

log4jsConfig.appenders[1] = {
type: "console"
type: "console",
tag: app
};

@@ -40,3 +41,12 @@ }

if (typeof(parallelsAppender) == 'object'){
parallelsAppender.type = 'log4js-syslog-appender';
parallelsAppender.tag = app;
if(typeof(log4jsConfig.appenders[1]) == 'object') {
log4jsConfig.appenders[2] = parallelsAppender;
}else
log4jsConfig.appenders[1] = parallelsAppender;
}
log4js = require('log4js');

@@ -43,0 +53,0 @@ log4jsConfig.appenders[0].tag = app;

2

package.json
{
"name": "log8js",
"version": "3.0.7",
"version": "4.0.0",
"description": "a syslog/rsyslog logger helper for node apps, work with pm2 log verbose",

@@ -5,0 +5,0 @@ "main": "log8js.js",

@@ -42,3 +42,3 @@ # log8js helper

## Overwrite Config
### Overwrite Config Samples

@@ -63,2 +63,28 @@ ```

### Parallels Log Config Samples
```
var log8js, logger, logConfig, parallelsLogConfig;
log8js = require('./log8js');
//overwrite config
logConfig = {
"facility": "local0",
"hostname": "chotot-demolog-service",
"port": 514
}
parallelsLogConfig = {
"facility": "local1",
"hostname": "graylog-chotot-demolog-service",
"port": 514
}
logger = log8js.open('appname', 'modulename', 'verbose', logConfig, parallelsLogConfig);
logger.debug('this is debug of app: appname module:modulename');
```
### Open Another log with verbose debug

@@ -65,0 +91,0 @@

@@ -1,2 +0,2 @@

var log8js, logger, logConfig;
var log8js, logger, logConfig, parallelsLogConfig;

@@ -7,9 +7,14 @@ log8js = require('./log8js');

logConfig = {
"facility": "local1",
"facility": "local0",
"hostname": "chotot-demolog-service",
"port": 514
}
parallelsLogConfig = {
"facility": "local1",
"hostname": "graylog-chotot-demolog-service",
"port": 514
}
logger = log8js.open('appname', 'modulename', 'verbose', logConfig);
logger = log8js.open('appname', 'modulename', 'verbose', logConfig, parallelsLogConfig);
logger.debug('this is debug of app: appname module:modulename');
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