1
0
mirror of https://github.com/upscayl/upscayl.git synced 2025-02-03 05:07:14 +01:00

16 lines
428 B
TypeScript
Raw Normal View History

2023-09-10 23:12:18 +05:30
import log from "electron-log";
import { getMainWindow } from "../main-window";
2024-10-06 12:45:44 +05:30
import { ELECTRON_COMMANDS } from "../../common/electron-commands";
2023-09-10 14:44:04 +05:30
const logit = (...args: any) => {
2023-09-10 23:12:18 +05:30
const mainWindow = getMainWindow();
2023-09-10 14:44:04 +05:30
if (!mainWindow) return;
2023-09-10 23:12:18 +05:30
log.log(...args);
2024-02-09 18:26:04 +05:30
if (process.env.NODE_ENV === "development") {
return;
}
mainWindow.webContents.send(ELECTRON_COMMANDS.LOG, args.join(" "));
2023-09-10 14:44:04 +05:30
};
export default logit;