Web: Doceditor: fixed logpath
This commit is contained in:
parent
67e6e54f45
commit
f191e3f3ca
@ -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,
|
||||
"..",
|
||||
|
Loading…
Reference in New Issue
Block a user