Skip to content
Browse files

Merge pull request #7 from yasuyk04/modifyMessage

in order to modify the message
  • Loading branch information...
2 parents 6ed4997 + 384ff78 commit 106f5f6f790f69add0db8a99fb6a5c6692c358a7 @baryon committed Jul 13, 2012
Showing with 4 additions and 3 deletions.
  1. +4 −3 lib/console.js
View
7 lib/console.js
@@ -19,10 +19,9 @@ module.exports = (function() {
// main log method
var _log = function(level, title, format, filters, needstack, args) {
- var msg = utils.format.apply(this, args);
var data = {
timestamp : dateFormat(new Date(), _config.dateformat),
- message : msg,
+ message : "",
title : title,
level : level,
args : args
@@ -50,6 +49,8 @@ module.exports = (function() {
}
_config.preprocess(data);
+ var msg = utils.format.apply(this, data.args);
+ data.message = msg;
// call micro-template to ouput
data.output = tinytim.tim(format, data);
@@ -116,4 +117,4 @@ module.exports = (function() {
}
return _self;
-});
+});

0 comments on commit 106f5f6

Please sign in to comment.
Something went wrong with that request. Please try again.