gui/modules/desktop/electron/libs/logger.ts
ABevier 67edf9971b
more e2e tuning (#614)
* more e2e tuning

* prettier
2023-05-16 07:53:27 +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;