Comparing version 0.5.4 to 0.5.5
@@ -0,1 +1,5 @@ | ||
0.5.5 / 2011-12-14 | ||
================== | ||
* Slight tweak to verifier (could not handle null elements before this version) | ||
0.5.4 / 2011-12-13 | ||
@@ -2,0 +6,0 @@ ================== |
@@ -11,9 +11,9 @@ var c = require('colors') | ||
var levelMaps = { | ||
'error' : c.red | ||
, 'warn' : c.yellow | ||
, 'info' : c.green | ||
, 'debug' : c.cyan | ||
, 'trace' : c.grey | ||
, 'zalgo' : c.zalgo | ||
, 'line' : c.bold | ||
'error' : c.red | ||
, 'warn' : c.yellow | ||
, 'info' : c.green | ||
, 'debug' : c.cyan | ||
, 'trace' : c.grey | ||
, 'zalgo' : c.zalgo | ||
, 'line' : c.bold | ||
}; | ||
@@ -55,4 +55,4 @@ var levels = Object.keys(levelMaps); | ||
this.data = { | ||
version : version | ||
, namespaces: namespaces | ||
version : version | ||
, namespaces: namespaces | ||
}; | ||
@@ -81,6 +81,6 @@ | ||
console.log.apply(console, [ | ||
c.grey(new Date().toLocaleTimeString()) | ||
, delim | ||
, (lvl === 'error') ? c.bold(level) : level | ||
, delim | ||
c.grey(new Date().toLocaleTimeString()) | ||
, delim | ||
, (lvl === 'error') ? c.bold(level) : level | ||
, delim | ||
].concat(end, args)); | ||
@@ -184,3 +184,3 @@ | ||
Logger.prototype.verify = function (inst) { | ||
if (!inst.data || !inst.data.version) { | ||
if (!inst || !inst.data || !inst.data.version) { | ||
return false; | ||
@@ -187,0 +187,0 @@ } |
@@ -5,3 +5,3 @@ { | ||
"description": "An advanced logger for nodejs", | ||
"version": "0.5.4", | ||
"version": "0.5.5", | ||
"repository": { | ||
@@ -8,0 +8,0 @@ "type": "git", |
@@ -135,3 +135,3 @@ # Logule  | ||
if (logule.verify(logInput)) { | ||
// logInput is an instance of logule, and its version is ~logule.info.version | ||
// logInput is an instance of logule, and its version is ~logule.data.version | ||
} | ||
@@ -138,0 +138,0 @@ } |
@@ -74,3 +74,7 @@ var logule = require('../') | ||
assert.ok(l.sub('arst').verify(logule), "l.sub('arst').verify(logule)"); | ||
testCount += 8; | ||
assert.ok(!l.verify(), "!l.verify()"); | ||
assert.ok(!l.verify(null), "!l.verify(null)"); | ||
assert.ok(!l.verify({}), "!l.verify({})"); | ||
assert.ok(!l.verify({data:{version:null}}), "!l.verify(fakeObj)"); | ||
testCount += 10; | ||
levels.forEach(function (lvl) { | ||
@@ -77,0 +81,0 @@ assert.ok(l.get(lvl) instanceof Function, "l.get('" + lvl + "') returns a function"); |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
78950
401
0