New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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 2.0.7 to 3.0.7

test.js

18

log8js.js

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

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

@@ -21,3 +21,3 @@ log4jsConfig = {

};
if (debug == null) {
if (debug != null) {
log4jsConfig.appenders[1] = {

@@ -27,2 +27,16 @@ type: "console"

}
if (typeof(config) == 'object'){
if(config.facility){
log4jsConfig.appenders[0].facility = config.facility;
}
if(config.hostname){
log4jsConfig.appenders[0].hostname = config.hostname;
}
if(config.port){
log4jsConfig.appenders[0].port = config.port;
}
}
log4js = require('log4js');

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

2

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

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

@@ -41,2 +41,23 @@ # log8js helper

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

@@ -43,0 +64,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