gui/electron/libs/logger.ts
Neil 6ad452331b
flatten repo: remove pnpm workspace + merge workspaces (#688)
* remove unused components

* remove pnpm

* implementation of local dev pantry setup (#689)
2023-06-30 10:33:39 +08:00

18 lines
390 B
TypeScript

import log from "electron-log";
export const setSentryLogging = (sentry: any) => {
const oldError = log.error;
log.error = (...params: any[]) => {
if (process.env.TEST === "true") {
log.info(params);
return;
}
oldError(params);
sentry.captureException(params[0].message);
};
};
// Export the log object to use it throughout the app
export default log;