Permalink
Browse files

Properly formatting arguments

  • Loading branch information...
1 parent 7a8c377 commit 1bea2c365e490adc1bfd1ca7bba8c4933eb62e9f @StevenLooman committed Sep 19, 2012
Showing with 3 additions and 2 deletions.
  1. +2 −2 lib/logger.js
  2. +1 −0 lib/logging_event.js
View
@@ -161,7 +161,7 @@ Logger.traceEntry = function(logger, obj, func_name) {
var obj_name = obj.constructor.toString().match(/function (\w+)/)[1];
utils.substitute(obj, func_name, subbed_func_name, function() {
- var message = '--> ' + obj_name + '.' + func_name + '()'; // XXX: TODO: scatter arguments
+ var message = '--> ' + obj_name + '.' + func_name + '(' + Array.prototype.slice.call(arguments).join(', ') + ')';
if (Logger.autoIndentTrace) {
message = indent(Logger.__autoIndentLevel) + message;
}
@@ -184,7 +184,7 @@ Logger.traceExit = function(logger, obj, func_name) {
this[subbed_func_name].apply(this, arguments);
Logger.__autoIndentLevel -= 1;
- var message = '<-- ' + obj_name + '.' + func_name + '()'; // XXX: TODO: scatter arguments
+ var message = '<-- ' + obj_name + '.' + func_name + '(' + Array.prototype.slice.call(arguments).join(', ') + ')';
if (Logger.autoIndentTrace) {
message = indent(Logger.__autoIndentLevel) + message;
}
View
@@ -14,6 +14,7 @@ function LoggingEvent(logger, level, message) {
this.message = Array.prototype.slice.call(message).join(''); // XXX: HACKetyhack
this._timestamp = new Date();
+ this.timestamp_value = this._timestamp.getTime();
this.timestamp = LoggingEvent.buildTimestampString(this._timestamp);
this.pid = process.pid;

0 comments on commit 1bea2c3

Please sign in to comment.