From ab66fac3a6a14f30bd4f7a1765a1966ccc0d1602 Mon Sep 17 00:00:00 2001 From: Connor Peet Date: Wed, 28 Jan 2015 23:31:20 -0500 Subject: [PATCH] Don't leak arguments --- modules/logging.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/logging.js b/modules/logging.js index d951073..32e2006 100644 --- a/modules/logging.js +++ b/modules/logging.js @@ -4,7 +4,10 @@ var exp = {}; function log() { var time = new Date().toISOString(); - var text = Array.prototype.slice.call(arguments).join(" "); + var text = ''; + for (var i = 0, l = arguments.length; i < l; i++) { + text += ' ' + arguments[i]; + } console.log(time + ": " + text); } @@ -17,4 +20,4 @@ if (config.debug_enabled) { exp.debug = function(){}; } -module.exports = exp; \ No newline at end of file +module.exports = exp;