|
@@ -41,11 +41,12 @@ export const dateFormat = (
|
|
};
|
|
};
|
|
|
|
|
|
const zlog = require("electron-log");
|
|
const zlog = require("electron-log");
|
|
-const filepath: string = process.env.PORTABLE_EXECUTABLE_DIR || "";
|
|
|
|
|
|
+const filepath: string = process.env.PORTABLE_EXECUTABLE_DIR || "./";
|
|
const nowdate = Date.now();
|
|
const nowdate = Date.now();
|
|
const nowdate_str = dateFormat(nowdate, "yyyy-MM-dd");
|
|
const nowdate_str = dateFormat(nowdate, "yyyy-MM-dd");
|
|
const filename = "download_" + nowdate_str + ".log";
|
|
const filename = "download_" + nowdate_str + ".log";
|
|
-zlog.transports.file.resolvePath = () => path.join(filepath, filename);
|
|
|
|
|
|
+zlog.transports.file.resolvePath = () =>
|
|
|
|
+ path.join(filepath, "logs/" + filename);
|
|
zlog.transports.file.level = true;
|
|
zlog.transports.file.level = true;
|
|
zlog.transports.console.level = false;
|
|
zlog.transports.console.level = false;
|
|
|
|
|