feat: move python rpc log to own file

This commit is contained in:
Zamitto 2024-12-24 00:54:20 -03:00
parent f8b9fe80fd
commit e50cb74d1d
2 changed files with 4 additions and 4 deletions

View File

@ -31,6 +31,6 @@ log.errorHandler.startCatching({
log.initialize();
export const pythonInstanceLogger = log.scope("python-instance");
export const pythonRpcLogger = log.scope("python-rpc");
export const logger = log.scope("main");
export const achievementsLogger = log.scope("achievements");

View File

@ -5,7 +5,7 @@ import fs from "node:fs";
import path from "node:path";
import crypto from "node:crypto";
import { logger } from "./logger";
import { pythonRpcLogger } from "./logger";
import { Readable } from "node:stream";
import { app, dialog } from "electron";
@ -39,7 +39,7 @@ export class PythonRPC {
if (!readable) return;
readable.setEncoding("utf-8");
readable.on("data", logger.log);
readable.on("data", pythonRpcLogger.log);
}
public static spawn(
@ -100,7 +100,7 @@ export class PythonRPC {
public static kill() {
if (this.pythonProcess) {
logger.log("Killing python process");
pythonRpcLogger.log("Killing python process");
this.pythonProcess.kill();
this.pythonProcess = null;
}