mirror of
https://github.com/outline/outline.git
synced 2026-06-13 11:25:03 +03:00
chore: Move warning logs from Sentry to standard logs (#11708)
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user