console-stamp
Advanced tools
Comparing version 0.1.4 to 0.1.5
13
main.js
@@ -25,12 +25,17 @@ /*globals module:false, require:false, process:false*/ | ||
[ 'log', 'info', 'warn', 'error', 'dir', 'assert' ].forEach( function ( f ) { | ||
['log', 'info', 'warn', 'error', 'dir', 'assert'].forEach( function ( f ) { | ||
var org = con[ f ]; | ||
var org = con[f]; | ||
con[f] = function () { | ||
var date = "["+dateFormat( pattern ) + "] [" + f.toUpperCase() + "] ", | ||
var date = "[" + dateFormat( pattern ) + "] [" + f.toUpperCase() + "] ", | ||
args = slice.call( arguments ); | ||
process.stdout.write( date ); | ||
if ( f === "error" || f === "warn" || ( f === "assert" && !args[0] ) ) { | ||
process.stderr.write( date ); | ||
}else if(f !== "assert"){ | ||
process.stdout.write( date ); | ||
} | ||
return org.apply( con, args ); | ||
@@ -37,0 +42,0 @@ |
{ | ||
"name": "console-stamp", | ||
"main": "main", | ||
"version": "0.1.4", | ||
"author": { | ||
"name": "Ståle Raknes", | ||
"email": "stale@raknes.net", | ||
"url": "http://github.net/starak" | ||
}, | ||
"description": "Patch NodeJS console methods in order to add timestamp information by pattern", | ||
"keywords": [ | ||
"console", | ||
"timestamp", | ||
"log", | ||
"debug" | ||
], | ||
"repository" : { | ||
"type" : "git", | ||
"url" : "http://github.com/starak/node-console-stamp.git" | ||
}, | ||
"license": "MIT", | ||
"dependencies" : { | ||
"dateformat" : "1.0.7-1.2.3" | ||
} | ||
"name": "console-stamp", | ||
"main": "main", | ||
"version": "0.1.5", | ||
"author": { | ||
"name": "Ståle Raknes", | ||
"email": "stale@raknes.net", | ||
"url": "http://github.net/starak" | ||
}, | ||
"description": "Patch NodeJS console methods in order to add timestamp information by pattern", | ||
"keywords": [ | ||
"console", | ||
"timestamp", | ||
"log", | ||
"debug" | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "http://github.com/starak/node-console-stamp.git" | ||
}, | ||
"license": "MIT", | ||
"dependencies": { | ||
"dateformat": "1.0.7-1.2.3" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4387
46