1
0
mirror of https://github.com/upscayl/upscayl.git synced 2024-09-24 03:18:28 +02:00
upscayl/electron/utils/logit.ts
Nayam Amarshe 54fc57f633 Fix #646
2024-02-09 18:26:04 +05:30

16 lines
395 B
TypeScript

import log from "electron-log";
import COMMAND from "../../common/commands";
import { getMainWindow } from "../main-window";
const logit = (...args: any) => {
const mainWindow = getMainWindow();
if (!mainWindow) return;
log.log(...args);
if (process.env.NODE_ENV === "development") {
return;
}
mainWindow.webContents.send(COMMAND.LOG, args.join(" "));
};
export default logit;