fix: Add log trace to send log to Sentry and print to web console for validate refresh token

This commit is contained in:
dab246
2026-02-05 16:53:00 +07:00
committed by Dat H. Pham
parent 6e2fbea0c0
commit e55283abb8
2 changed files with 63 additions and 26 deletions
+15 -9
View File
@@ -81,14 +81,18 @@ void _internalLog(
}
if (shouldSentry) {
unawaited(
SentryManager.instance.captureException(
exception ?? rawMessage,
stackTrace: stackTrace,
message: rawMessage,
extras: extras,
),
);
if (level == Level.trace) {
SentryManager.instance.captureMessage(rawMessage, extras: extras);
} else {
unawaited(
SentryManager.instance.captureException(
exception ?? rawMessage,
stackTrace: stackTrace,
message: rawMessage,
extras: extras,
),
);
}
}
}
@@ -132,7 +136,9 @@ void _printWebConsole(Level level, String value) {
}
bool _shouldReportToSentry(Level level) {
return level == Level.error || level == Level.critical;
return level == Level.error ||
level == Level.critical ||
level == Level.trace;
}
void logError(