chore: Move warning logs from Sentry to standard logs (#11708)

This commit is contained in:
Tom Moor
2026-03-10 19:37:02 -04:00
committed by GitHub
parent 0c6e4f349b
commit 0d8d9a1798
+1 -20
View File
@@ -117,26 +117,7 @@ class Logger {
*/
public warn(message: string, extra?: Extra) {
Metrics.increment("logger.warning");
if (env.SENTRY_DSN) {
Sentry.withScope((scope) => {
scope.setLevel("warning");
for (const key in extra) {
scope.setExtra(key, this.sanitize(extra[key]));
}
Sentry.captureMessage(message);
});
}
if (env.isProduction) {
this.output.warn(message, this.sanitize(extra));
} else if (extra) {
console.warn(message, extra);
} else {
console.warn(message);
}
this.output.warn(message, this.sanitize(extra));
}
/**