Change logs path to match hydra.db

This commit is contained in:
Zamitto 2024-05-26 15:33:21 -03:00
parent c648ce3d59
commit 35e3339519
2 changed files with 3 additions and 5 deletions

View File

@ -26,6 +26,8 @@ export const databasePath = path.join(
"hydra.db" "hydra.db"
); );
export const logsPath = path.join(app.getPath("appData"), "hydra", "logs");
export const seedsPath = app.isPackaged export const seedsPath = app.isPackaged
? path.join(process.resourcesPath, "seeds") ? path.join(process.resourcesPath, "seeds")
: path.join(__dirname, "..", "..", "seeds"); : path.join(__dirname, "..", "..", "seeds");

View File

@ -1,11 +1,7 @@
import { app } from "electron"; import { logsPath } from "@main/constants";
import log from "electron-log"; import log from "electron-log";
import path from "path"; import path from "path";
const logsPath = app.isPackaged
? path.join(app.getAppPath(), "..", "..", "logs")
: path.join(app.getAppPath(), "logs");
log.transports.file.resolvePathFn = ( log.transports.file.resolvePathFn = (
_: log.PathVariables, _: log.PathVariables,
message?: log.LogMessage | undefined message?: log.LogMessage | undefined