From a7831ebfcd09eaa1e363078e967046853acf2506 Mon Sep 17 00:00:00 2001 From: azivner Date: Wed, 6 Dec 2017 19:42:23 -0500 Subject: [PATCH] log data dir location --- services/build.js | 2 +- services/log.js | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/services/build.js b/services/build.js index 129528bca..49fc86a7f 100644 --- a/services/build.js +++ b/services/build.js @@ -1 +1 @@ -module.exports = { build_date:"2017-11-30T00:11:04-05:00", build_revision: "719f5530544efa1d7aae16afd8a9e64db04ff206" }; +module.exports = { build_date:"2017-12-04T23:02:48-05:00", build_revision: "23e8e20d44ef029e6891dec6d2d855d282996823" }; diff --git a/services/log.js b/services/log.js index 6cd78cded..f00b2d037 100644 --- a/services/log.js +++ b/services/log.js @@ -1,15 +1,15 @@ "use strict"; const fs = require('fs'); -const LOG_DIR = require('./data_dir').LOG_DIR; +const data_dir = require('./data_dir'); -if (!fs.existsSync(LOG_DIR)) { - fs.mkdirSync(LOG_DIR, 0o700); +if (!fs.existsSync(data_dir.LOG_DIR)) { + fs.mkdirSync(data_dir.LOG_DIR, 0o700); } const logger = require('simple-node-logger').createRollingFileLogger({ errorEventName: 'error', - logDirectory: LOG_DIR, + logDirectory: data_dir.LOG_DIR, fileNamePattern: 'trilium-.log', dateFormat:'YYYY-MM-DD' }); @@ -37,6 +37,8 @@ function request(req) { logger.info(req.method + " " + req.url); } +info("Using data dir: " + data_dir.TRILIUM_DATA_DIR); + module.exports = { info, error,