gui/modules/desktop/electron/libs/logger.ts
Neil 45828b3f40
Error to sentry (#499)
* send error to sentry

---------

Co-authored-by: neil molina <neil@neils-MacBook-Pro.local>
2023-04-25 12:25:13 +08:00

13 lines
299 B
TypeScript

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