mirror of
https://github.com/outline/outline.git
synced 2026-11-23 06:11:04 +03:00
chore: Move warning logs from Sentry to standard logs (#11708)
This commit is contained in:
1 parent
0c6e4f349b
commit
0d8d9a1798
1 file changed
+1
-20
@@ -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