New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

logging

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

logging - npm Package Compare versions

Comparing version 2.0.16 to 2.0.18

26

lib/logging.js

@@ -5,8 +5,14 @@

NiceTime = require('./niceTime'),
history = [];
Cluster = require('cluster');
var clusterCPU = 'NODE_WORKER_ID' in process.env ? Style(Style.GREEN, process.env.NODE_WORKER_ID + '.')
: 'CLUSTER_WORKER' in process.env ? Style(Style.GREEN, process.env.CLUSTER_WORKER + '.')
var isWorker = Cluster.isWorker && Cluster.worker;
var clusterCPU = isWorker ? Cluster.worker.id
: 'CLUSTER_UNIQUE_ID' in process.env ? process.env.CLUSTER_UNIQUE_ID
: 'NODE_WORKER_ID' in process.env ? process.env.NODE_WORKER_ID
: 'CLUSTER_WORKER' in process.env ? process.env.CLUSTER_WORKER
: '';
clusterCPU = clusterCPU ? Style(Style.GREEN, clusterCPU + '.') : '';
var TIMEZONE_OFFSET = (240 - (new Date).getTimezoneOffset()) * 60000;

@@ -78,17 +84,5 @@

history.push({
date: date,
niceTime: niceTime,
file: file,
messages: messages
});
if (history.length > 100) {
history = [];
}
}
var Log = exports = module.exports = function Log() {
return record(arguments);

@@ -99,6 +93,4 @@ };

Log.from = function(path) {
var file = path.split('/').pop().split('.')[0];
var log_function = function() { record(arguments, file); };
log_function.history = function(){ return history;};
log_function.array = function(array) { record(array, file);};

@@ -105,0 +97,0 @@ return log_function;

{
"name": "logging",
"version": "2.0.16",
"version": "2.0.18",
"description": "Super sexy color console logging with cluster support.",

@@ -5,0 +5,0 @@ "homepage": "http://github.com/dylang/logging",

@@ -30,7 +30,7 @@

* Filename
* Function Name
* Cluster Worker id
* Inspects arrays, objects, functions - all in color.
* Stores history
* Fast
* Easy
* Used in production on Node Knockout winner [Doodle or Die](http://DoodleOrDie.com).

@@ -37,0 +37,0 @@ ## Todo

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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