We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5cd64aa commit be57e59Copy full SHA for be57e59
logger.config.mjs
@@ -3,15 +3,15 @@ import { logToSentry } from './sentry.client.config.mjs';
3
4
export const configureLogger = () => {
5
if (process.env.NODE_ENV === 'production') {
6
- log.setLevel('error');
+ // In production, we want to log only to Sentry
7
+ log.setLevel('silent');
8
- const originalErrorMethod = log.error;
9
log.error = (...args) => {
10
- originalErrorMethod(...args); // log the error to the console
11
- logToSentry(args.join(' ')); // send the error to Sentry
+ logToSentry(args.join(' '));
12
};
13
14
} else if (process.env.NODE_ENV === 'development') {
+ // In development, we want to log only to the console
15
log.setLevel('info');
16
}
17
0 commit comments