Skip to content

Commit

Permalink
in order to modify the message
Browse files Browse the repository at this point in the history
  • Loading branch information
kobayashi0253 committed Jul 5, 2012
1 parent 6ed4997 commit 384ff78
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/console.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -19,10 +19,9 @@ module.exports = (function() {


// main log method // main log method
var _log = function(level, title, format, filters, needstack, args) { var _log = function(level, title, format, filters, needstack, args) {
var msg = utils.format.apply(this, args);
var data = { var data = {
timestamp : dateFormat(new Date(), _config.dateformat), timestamp : dateFormat(new Date(), _config.dateformat),
message : msg, message : "",
title : title, title : title,
level : level, level : level,
args : args args : args
Expand Down Expand Up @@ -50,6 +49,8 @@ module.exports = (function() {
} }


_config.preprocess(data); _config.preprocess(data);
var msg = utils.format.apply(this, data.args);
data.message = msg;


// call micro-template to ouput // call micro-template to ouput
data.output = tinytim.tim(format, data); data.output = tinytim.tim(format, data);
Expand Down Expand Up @@ -116,4 +117,4 @@ module.exports = (function() {
} }


return _self; return _self;
}); });

0 comments on commit 384ff78

Please sign in to comment.