Send error messages to sentry, even if the error object is missing

This commit is contained in:
vishnukvmd 2022-11-14 18:57:37 +05:30
parent 3d95c789f5
commit 332faa9166

View file

@ -252,8 +252,16 @@ class SuperLogging {
}
// add error to sentry queue
if (sentryIsEnabled && rec.error != null) {
_sendErrorToSentry(rec.error, null);
if (sentryIsEnabled) {
if (rec.error != null) {
_sendErrorToSentry(rec.error, null);
} else if (rec.level == Level.SEVERE || rec.level == Level.SHOUT) {
if (rec.error != null) {
_sendErrorToSentry(rec.error, null);
} else {
_sendErrorToSentry(rec.message, null);
}
}
}
}