Comparing version 0.1.0-rc1 to 0.1.0-rc2
@@ -170,9 +170,9 @@ "use strict"; | ||
if (log.type === 'ERROR') { | ||
console.error(log); | ||
exec_console(console.error, log); | ||
} else if (log.type === 'INFO') { | ||
console.info(log); | ||
exec_console(console.info, log); | ||
} else if (log.type === 'WARNING') { | ||
console.warn(log); | ||
exec_console(console.warn, log); | ||
} else { | ||
console.log(log); | ||
exec_console(console.log, log); | ||
} | ||
@@ -199,3 +199,16 @@ } | ||
} | ||
/** | ||
* Exec console output | ||
* @param func | ||
* @param log | ||
*/ | ||
function exec_console(func, log) { | ||
func( | ||
' ' + log.type + '\n', | ||
'CREATED: ' + log.created + '\t ' + '\n', | ||
'MESSAGE: ' + log.message + '\t ' + log.trace + '\n', | ||
!!log.data ? 'DATA:' + log.data + '\n' : '', | ||
'\n' | ||
); | ||
} | ||
}, | ||
@@ -202,0 +215,0 @@ /** |
@@ -5,3 +5,3 @@ { | ||
"description": "Powerful lightweight mvc framework for nodejs", | ||
"version": "0.1.0-rc1", | ||
"version": "0.1.0-rc2", | ||
"dependencies": { | ||
@@ -8,0 +8,0 @@ "mongoose": "3.8.x", |
155042
4991