feat: add logs for python process

This commit is contained in:
Zamitto 2024-07-17 21:05:06 -03:00
parent 202f5b60de
commit 8c0c3e617b
4 changed files with 68 additions and 11 deletions

View file

@ -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");