From 2aeb721f8a58df76ba908c0344a36b5e95fadb22 Mon Sep 17 00:00:00 2001 From: Darren Date: Thu, 20 Jun 2013 22:05:34 +0100 Subject: [PATCH] Parsing log output when saving to file #306 --- server/kiwi.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/kiwi.js b/server/kiwi.js index 6e697f7..35c0a49 100755 --- a/server/kiwi.js +++ b/server/kiwi.js @@ -1,5 +1,6 @@ var fs = require('fs'), _ = require('lodash'), + util = require('util'), WebListener = require('./weblistener.js'), config = require('./configuration.js'), rehash = require('./rehash.js'), @@ -28,7 +29,7 @@ if (process.argv.indexOf('-f') === -1 && global.config && global.config.log) { var logfile = fs.openSync(log_file_name, 'a'), out; - out = Array.prototype.join.apply(arguments, [' ']); + out = util.format.apply(util, arguments); // Make sure we out somthing to log and we have an open file if (!out || !logfile) return; -- 2.25.1