Web: Doceditor: fixed logpath

This commit is contained in:
Artem Tarasov 2022-07-21 16:01:01 +03:00
parent 67e6e54f45
commit f191e3f3ca

View File

@ -3,8 +3,18 @@ import "winston-daily-rotate-file";
import path from "path";
import fs from "fs";
const fileName = IS_DEVELOPMENT
let logpath = process.env.logpath || null;
if (logpath != null) {
if (!path.isAbsolute(logpath)) {
logpath = path.join(__dirname, "..", logpath);
}
}
const fileName = !IS_DEVELOPMENT
? path.join(__dirname, "..", "..", "..", "Logs", "editor.%DATE%.log")
: logpath
? path.join(logpath, "editor.%DATE%.log")
: path.join(
__dirname,
"..",