mirror of
https://github.com/zadam/trilium.git
synced 2025-03-12 15:56:26 +08:00
log data dir location
This commit is contained in:
parent
23e8e20d44
commit
a7831ebfcd
2 changed files with 7 additions and 5 deletions
|
@ -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" };
|
||||
|
|
|
@ -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-<DATE>.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,
|
||||
|
|
Loading…
Reference in a new issue