Comparing version
@@ -108,4 +108,6 @@ var winston = require('winston'); | ||
process.on('uncaughtException', function(err) { | ||
console.error('uncaughtException, app will exit.', 'stack:', err.stack); | ||
console.error('uncaughtException, app will exit.'); | ||
console.error('stack:', err.stack); | ||
console.error('all infomation:', JSON.stringify(exception.getAllInfo(err))); | ||
process.exit(1); | ||
}); | ||
@@ -112,0 +114,0 @@ |
@@ -56,4 +56,13 @@ var events = require('events'), | ||
if (meta && typeof meta === 'object' && Object.keys(meta).length > 0) { | ||
msg = msg + ' ' + util.format(meta); | ||
if (meta !== null && meta !== undefined) { | ||
if (meta && meta instanceof Error && meta.stack) { | ||
meta = meta.stack; | ||
} | ||
if (typeof meta !== 'object') { | ||
msg += ' ' + meta; | ||
} | ||
else if (Object.keys(meta).length > 0) { | ||
msg += ' ' + util.inspect(meta, false, null); | ||
} | ||
} | ||
@@ -60,0 +69,0 @@ |
@@ -110,4 +110,13 @@ var events = require('events'), | ||
if (meta && (typeof meta == 'object') && Object.keys(meta).length > 0) { | ||
msg = msg + ' ' + util.format(meta); | ||
if (meta !== null && meta !== undefined) { | ||
if (meta && meta instanceof Error && meta.stack) { | ||
meta = meta.stack; | ||
} | ||
if (typeof meta !== 'object') { | ||
msg += ' ' + meta; | ||
} | ||
else if (Object.keys(meta).length > 0) { | ||
msg += ' ' + util.inspect(meta, false, null); | ||
} | ||
} | ||
@@ -114,0 +123,0 @@ |
{ | ||
"name": "ace-log", | ||
"version": "0.9.4", | ||
"version": "0.9.5", | ||
"description": "nodejs log for ace", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
34824
1.2%761
2.42%