-
Notifications
You must be signed in to change notification settings - Fork 377
chore: Logging lower severity #2531
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -30,7 +30,7 @@ internal class InAppHydrator( | |||||
| try { | ||||||
| val content = InAppMessageContent(jsonObject) | ||||||
| if (content.contentHtml == null) { | ||||||
| Logging.debug("displayMessage:OnSuccess: No HTML retrieved from loadMessageContent") | ||||||
| Logging.info("displayMessage:OnSuccess: No HTML retrieved from loadMessageContent") | ||||||
|
||||||
| Logging.info("displayMessage:OnSuccess: No HTML retrieved from loadMessageContent") | |
| Logging.debug("displayMessage:OnSuccess: No HTML retrieved from loadMessageContent") |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -86,9 +86,9 @@ internal class NotificationGenerationProcessor( | |||||
| }.join() | ||||||
| } | ||||||
| } catch (to: TimeoutCancellationException) { | ||||||
| Logging.error("remoteNotificationReceived timed out, continuing with wantsToDisplay=$wantsToDisplay.", to) | ||||||
| Logging.info("remoteNotificationReceived timed out, continuing with wantsToDisplay=$wantsToDisplay.", to) | ||||||
| } catch (t: Throwable) { | ||||||
| Logging.error("remoteNotificationReceived threw an exception. Displaying normal OneSignal notification.", t) | ||||||
| Logging.info("remoteNotificationReceived threw an exception. Displaying normal OneSignal notification.", t) | ||||||
| } | ||||||
|
|
||||||
| var shouldDisplay = | ||||||
|
|
@@ -121,7 +121,7 @@ internal class NotificationGenerationProcessor( | |||||
| } catch (to: TimeoutCancellationException) { | ||||||
| Logging.info("notificationWillShowInForegroundHandler timed out, continuing with wantsToDisplay=$wantsToDisplay.", to) | ||||||
| } catch (t: Throwable) { | ||||||
| Logging.error( | ||||||
| Logging.info( | ||||||
|
||||||
| Logging.info( | |
| Logging.warn( |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -155,9 +155,9 @@ internal class NotificationLifecycleService( | |
| }, | ||
| onError = { ex -> | ||
| if (ex is BackendException) { | ||
| Logging.error("Notification opened confirmation failed with statusCode: ${ex.statusCode} response: ${ex.response}") | ||
| Logging.info("Notification opened confirmation failed with statusCode: ${ex.statusCode} response: ${ex.response}") | ||
| } else { | ||
| Logging.error("Unexpected error in notification opened confirmation", ex) | ||
| Logging.info("Unexpected error in notification opened confirmation", ex) | ||
|
Comment on lines
+158
to
+160
|
||
| } | ||
| }, | ||
| ) | ||
|
|
@@ -275,22 +275,19 @@ internal class NotificationLifecycleService( | |
|
|
||
| val intent = intentGenerator.getIntentVisible() | ||
| if (intent != null) { | ||
| Logging.info("SDK running startActivity with Intent: $intent") | ||
| Logging.debug("SDK running startActivity with Intent: $intent") | ||
| withContext(Dispatchers.Main) { | ||
| activity.startActivity(intent) | ||
| } | ||
| } else { | ||
| Logging.info("SDK not showing an Activity automatically due to it's settings.") | ||
| Logging.debug("SDK not showing an Activity automatically due to it's settings.") | ||
| } | ||
| } catch (e: JSONException) { | ||
| Logging.error("Could not parse JSON to open notification activity.") | ||
| e.printStackTrace() | ||
| Logging.error("Could not parse JSON to open notification activity.", e) | ||
|
jkasten2 marked this conversation as resolved.
|
||
| } catch (e: ActivityNotFoundException) { | ||
| Logging.error("No activity found to handle notification open intent.") | ||
| e.printStackTrace() | ||
| Logging.warn("No activity found to handle notification open intent.", e) | ||
| } catch (e: Exception) { | ||
| Logging.error("Could not open notification activity.") | ||
| e.printStackTrace() | ||
| Logging.error("Could not open notification activity.", e) | ||
| } | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -18,11 +18,11 @@ internal class PushTokenManager( | |||||
| override suspend fun retrievePushToken(): PushTokenResponse { | ||||||
| when (_deviceService.jetpackLibraryStatus) { | ||||||
| IDeviceService.JetpackLibraryStatus.MISSING -> { | ||||||
| Logging.fatal("Could not find the Jetpack/AndroidX. Please make sure it has been correctly added to your project.") | ||||||
| Logging.info("Could not find the Jetpack/AndroidX. Please make sure it has been correctly added to your project.") | ||||||
|
||||||
| Logging.info("Could not find the Jetpack/AndroidX. Please make sure it has been correctly added to your project.") | |
| Logging.warn("Could not find the Jetpack/AndroidX. Please make sure it has been correctly added to your project.") |
Copilot
AI
Jan 27, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Downgrading from Logging.fatal to Logging.info for outdated Jetpack/AndroidX library may be too severe a reduction. This is a critical configuration issue that prevents push notifications from working entirely. Consider using Logging.warn instead to maintain visibility of this important configuration problem while still reducing log volume.
| Logging.info( | |
| Logging.warn( |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -20,7 +20,7 @@ internal class ReceiveReceiptProcessor( | |||||
| try { | ||||||
| _backend.updateNotificationAsReceived(appId, notificationId, subscriptionId, deviceType) | ||||||
| } catch (ex: BackendException) { | ||||||
| Logging.error("Receive receipt failed with statusCode: ${ex.statusCode} response: ${ex.response}") | ||||||
| Logging.info("Receive receipt failed with statusCode: ${ex.statusCode} response: ${ex.response}") | ||||||
|
||||||
| Logging.info("Receive receipt failed with statusCode: ${ex.statusCode} response: ${ex.response}") | |
| Logging.warn("Receive receipt failed with statusCode: ${ex.statusCode} response: ${ex.response}") |
Uh oh!
There was an error while loading. Please reload this page.