Comparing version 1.0.5 to 1.0.6
@@ -54,3 +54,3 @@ // Copyright Teleportd | ||
log = function(str, debug) { | ||
log = function(str, debug, error) { | ||
if(!my.LOGGING) return; | ||
@@ -61,3 +61,8 @@ var pre = '[' + new Date().toISOString() + '] '; | ||
str.split('\n').forEach(function(line) { | ||
console.log(pre + line); | ||
if(error) | ||
util.error(pre + line) | ||
else if(debug) | ||
util.debug(pre + line); | ||
else | ||
console.log(pre + line); | ||
}); | ||
@@ -71,7 +76,7 @@ }; | ||
error: function(err) { | ||
log('*********************************************'); | ||
log('*********************************************', false, true); | ||
log('ERROR: ' + err.message); | ||
log('*********************************************'); | ||
log('*********************************************', false, true); | ||
log(err.stack); | ||
log('---------------------------------------------'); | ||
log('---------------------------------------------', false, true); | ||
}, | ||
@@ -78,0 +83,0 @@ debug: function(str) { |
{ | ||
"name": "fwk", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"description": "Simple JS framework for node.js", | ||
@@ -5,0 +5,0 @@ "keywords": ["fwk", "node"], |
49140
1466