1
0
mirror of https://github.com/upscayl/upscayl.git synced 2025-01-27 00:13:45 +01:00

13 lines
331 B
TypeScript
Raw Normal View History

2023-09-10 23:12:18 +05:30
import log from "electron-log";
import COMMAND from "../../common/commands";
2023-09-10 23:12:18 +05:30
import { getMainWindow } from "../main-window";
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);
2023-09-10 14:44:04 +05:30
mainWindow.webContents.send(COMMAND.LOG, args.join(" "));
};
export default logit;