Skip to content
Snippets Groups Projects
Commit 77286282 authored by Lloyd Hilaiel's avatar Lloyd Hilaiel
Browse files

fix concatenation of log_path with log file name

parent 52efac96
No related branches found
No related tags found
No related merge requests found
const winston = require("winston"); const
const configuration = require("./configuration"); winston = require("winston"),
configuration = require("./configuration"),
path = require('path');
// go through the configuration and determine log location // go through the configuration and determine log location
// for now we only log to one place // for now we only log to one place
...@@ -16,8 +18,7 @@ function setupLogger(category) { ...@@ -16,8 +18,7 @@ function setupLogger(category) {
if (LOGGERS[category]) if (LOGGERS[category])
return; return;
// FIXME: check if log_path is properly terminated var filename = path.join(log_path, category + "-log.txt");
var filename = log_path + category + "-log.txt";
LOGGERS[category] = new (winston.Logger)({ LOGGERS[category] = new (winston.Logger)({
transports: [new (winston.transports.File)({filename: filename})] transports: [new (winston.transports.File)({filename: filename})]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment