Skip to content

Commit e50cb74

Browse files
committed
feat: move python rpc log to own file
1 parent f8b9fe8 commit e50cb74

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/main/services/logger.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@ log.errorHandler.startCatching({
3131

3232
log.initialize();
3333

34-
export const pythonInstanceLogger = log.scope("python-instance");
34+
export const pythonRpcLogger = log.scope("python-rpc");
3535
export const logger = log.scope("main");
3636
export const achievementsLogger = log.scope("achievements");

src/main/services/python-rpc.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import fs from "node:fs";
55
import path from "node:path";
66
import crypto from "node:crypto";
77

8-
import { logger } from "./logger";
8+
import { pythonRpcLogger } from "./logger";
99
import { Readable } from "node:stream";
1010
import { app, dialog } from "electron";
1111

@@ -39,7 +39,7 @@ export class PythonRPC {
3939
if (!readable) return;
4040

4141
readable.setEncoding("utf-8");
42-
readable.on("data", logger.log);
42+
readable.on("data", pythonRpcLogger.log);
4343
}
4444

4545
public static spawn(
@@ -100,7 +100,7 @@ export class PythonRPC {
100100

101101
public static kill() {
102102
if (this.pythonProcess) {
103-
logger.log("Killing python process");
103+
pythonRpcLogger.log("Killing python process");
104104
this.pythonProcess.kill();
105105
this.pythonProcess = null;
106106
}

0 commit comments

Comments
 (0)