Web: Doceditor: fixed variable name for getting path to logs from environment
This commit is contained in:
parent
7be5fd3de7
commit
b8efdefbcd
@ -3,18 +3,16 @@ import "winston-daily-rotate-file";
|
|||||||
import path from "path";
|
import path from "path";
|
||||||
import fs from "fs";
|
import fs from "fs";
|
||||||
|
|
||||||
let logpath = process.env.logpath || null;
|
let logPath = process.env.logPath || null;
|
||||||
|
|
||||||
if (logpath != null) {
|
if (logPath != null) {
|
||||||
if (!path.isAbsolute(logpath)) {
|
if (!path.isAbsolute(logPath)) {
|
||||||
logpath = path.join(__dirname, "..", logpath);
|
logPath = path.join(__dirname, "..", logPath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const fileName = IS_DEVELOPMENT
|
const fileName = logPath
|
||||||
? path.join(__dirname, "..", "..", "..", "Logs", "editor.%DATE%.log")
|
? path.join(logPath, "editor.%DATE%.log")
|
||||||
: logpath
|
|
||||||
? path.join(logpath, "editor.%DATE%.log")
|
|
||||||
: path.join(__dirname, "..", "..", "..", "Logs", "editor.%DATE%.log");
|
: path.join(__dirname, "..", "..", "..", "Logs", "editor.%DATE%.log");
|
||||||
const dirName = path.dirname(fileName);
|
const dirName = path.dirname(fileName);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user