mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
feat: add logs for python process
This commit is contained in:
parent
202f5b60de
commit
8c0c3e617b
4 changed files with 68 additions and 11 deletions
|
@ -6,6 +6,10 @@ log.transports.file.resolvePathFn = (
|
|||
_: log.PathVariables,
|
||||
message?: log.LogMessage | undefined
|
||||
) => {
|
||||
if (message?.scope === "python-instance") {
|
||||
return path.join(logsPath, "pythoninstance.txt");
|
||||
}
|
||||
|
||||
if (message?.level === "error") {
|
||||
return path.join(logsPath, "error.txt");
|
||||
}
|
||||
|
@ -23,4 +27,5 @@ log.errorHandler.startCatching({
|
|||
|
||||
log.initialize();
|
||||
|
||||
export const pythonInstanceLogger = log.scope("python-instance");
|
||||
export const logger = log.scope("main");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue