mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
feat: add network logger file
This commit is contained in:
parent
5869057692
commit
b1ff05c456
2 changed files with 6 additions and 1 deletions
|
@ -7,7 +7,7 @@ import { WindowManager } from "./window-manager";
|
||||||
import url from "url";
|
import url from "url";
|
||||||
import { uploadGamesBatch } from "./library-sync";
|
import { uploadGamesBatch } from "./library-sync";
|
||||||
import { clearGamesRemoteIds } from "./library-sync/clear-games-remote-id";
|
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 { UserNotLoggedInError, SubscriptionRequiredError } from "@shared";
|
||||||
import { omit } from "lodash-es";
|
import { omit } from "lodash-es";
|
||||||
import { appVersion } from "@main/constants";
|
import { appVersion } from "@main/constants";
|
||||||
|
|
|
@ -10,6 +10,10 @@ log.transports.file.resolvePathFn = (
|
||||||
return path.join(logsPath, "pythonrpc.txt");
|
return path.join(logsPath, "pythonrpc.txt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (message?.scope === "network") {
|
||||||
|
return path.join(logsPath, "network.txt");
|
||||||
|
}
|
||||||
|
|
||||||
if (message?.scope == "achievements") {
|
if (message?.scope == "achievements") {
|
||||||
return path.join(logsPath, "achievements.txt");
|
return path.join(logsPath, "achievements.txt");
|
||||||
}
|
}
|
||||||
|
@ -34,3 +38,4 @@ log.initialize();
|
||||||
export const pythonRpcLogger = log.scope("python-rpc");
|
export const pythonRpcLogger = log.scope("python-rpc");
|
||||||
export const logger = log.scope("main");
|
export const logger = log.scope("main");
|
||||||
export const achievementsLogger = log.scope("achievements");
|
export const achievementsLogger = log.scope("achievements");
|
||||||
|
export const networkLogger = log.scope("network");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue