From 77286282d1c1722fa844c460a7549f58ce7c0fcc Mon Sep 17 00:00:00 2001
From: Lloyd Hilaiel <lloyd@hilaiel.com>
Date: Fri, 5 Aug 2011 15:00:43 -0600
Subject: [PATCH] fix concatenation of log_path with log file name

---
 libs/logging.js | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/libs/logging.js b/libs/logging.js
index 1d18ef520..7cb5a1eb1 100644
--- a/libs/logging.js
+++ b/libs/logging.js
@@ -1,5 +1,7 @@
-const winston = require("winston");
-const configuration = require("./configuration");
+const
+winston = require("winston"),
+configuration = require("./configuration"),
+path = require('path');
 
 // go through the configuration and determine log location
 // for now we only log to one place
@@ -16,8 +18,7 @@ function setupLogger(category) {
   if (LOGGERS[category])
     return;
 
-  // FIXME: check if log_path is properly terminated
-  var filename = log_path + category + "-log.txt";
+  var filename = path.join(log_path, category + "-log.txt");
 
   LOGGERS[category] = new (winston.Logger)({
       transports: [new (winston.transports.File)({filename: filename})]
-- 
GitLab