improve logging

This commit is contained in:
otsmr 2025-05-01 23:45:11 +02:00
parent d3104897f7
commit 2a5579a304
2 changed files with 3 additions and 4 deletions

View file

@ -72,8 +72,6 @@ Future initFCMService() async {
}
FirebaseMessaging.onMessage.listen((RemoteMessage message) {
Logger("firebase-notification")
.finer('Got a message while in the foreground!');
handleRemoteMessage(message);
});
}
@ -82,7 +80,7 @@ Future initFCMService() async {
Future<void> _firebaseMessagingBackgroundHandler(RemoteMessage message) async {
setupLogger();
Logger("firebase-background")
.shout('Handling a background message: ${message.messageId}');
.info('Handling a background message: ${message.messageId}');
twonlyDatabase = TwonlyDatabase();
await handleRemoteMessage(message);

View file

@ -274,7 +274,8 @@ Future<PushKind?> tryDecryptMessage(
final plaintextString = utf8.decode(plaintext);
return PushKindExtension.fromString(plaintextString);
} catch (e) {
Logger("notification-service").shout(e);
// this error is allowed to happen...
// Logger("notification-service").shout(e);
return null;
}
}