feat: add network logger file

This commit is contained in:
Zamitto 2025-01-10 20:54:54 -03:00
parent 5869057692
commit b1ff05c456
2 changed files with 6 additions and 1 deletions

View File

@ -7,7 +7,7 @@ import { WindowManager } from "./window-manager";
import url from "url";
import { uploadGamesBatch } from "./library-sync";
import { clearGamesRemoteIds } from "./library-sync/clear-games-remote-id";
import { logger } from "./logger";
import { networkLogger as logger } from "./logger";
import { UserNotLoggedInError, SubscriptionRequiredError } from "@shared";
import { omit } from "lodash-es";
import { appVersion } from "@main/constants";

View File

@ -10,6 +10,10 @@ log.transports.file.resolvePathFn = (
return path.join(logsPath, "pythonrpc.txt");
}
if (message?.scope === "network") {
return path.join(logsPath, "network.txt");
}
if (message?.scope == "achievements") {
return path.join(logsPath, "achievements.txt");
}
@ -34,3 +38,4 @@ log.initialize();
export const pythonRpcLogger = log.scope("python-rpc");
export const logger = log.scope("main");
export const achievementsLogger = log.scope("achievements");
export const networkLogger = log.scope("network");