Skip to content

Conversation

@jkasten2
Copy link
Member

@jkasten2 jkasten2 commented Feb 21, 2025

Description

One Line Summary

Add log listener debug feature, so it's possible for app developers to use this to send OneSignal device logs to their backend.

Details

Motivation

There was no way for app developer to capture logs from the OneSignal SDK, as you can't intercept Android's Log methods.

Scope

Only adds new functionally to get log entries from OneSignal.

Testing

Manual testing

Tested on an Android 15 Emulator, ensured log entries can be printed. Also tested throwables print correctly, with their full stack trace.

Affected code checklist

  • Notifications
    • Display
    • Open
    • Push Processing
    • Confirm Deliveries
  • Outcomes
  • Sessions
  • In-App Messaging
  • REST API requests
  • Public API changes
    • OneSignal.addLogListener(OneSignalLogEvent)
    • OneSignal.removeLogListener(OneSignalLogEvent)

Checklist

Overview

  • I have filled out all REQUIRED sections above
  • PR does one thing
    • If it is hard to explain how any codes changes are related to each other then it most likely needs to be more than one PR
  • Any Public API changes are explained in the PR details and conform to existing APIs

Testing

  • I have included test coverage for these changes, or explained why they are not needed
  • All automated tests pass, or I explained why that is not possible
    • player-model-main CI is broken currently
  • I have personally tested this on my device, or explained why that is not possible

Final pass

  • Code is as readable as possible.
  • I have reviewed this PR myself, ensuring it meets each checklist item

This change is Reviewable

This allows app developers to get all log entries so they can send
them to their backend for later review.
@jkasten2 jkasten2 added the WIP Work In Progress label Feb 21, 2025
@jkasten2 jkasten2 removed the WIP Work In Progress label Feb 21, 2025
@jkasten2 jkasten2 merged commit 9aed53e into player-model-main Feb 21, 2025
1 of 2 checks passed
@jkasten2 jkasten2 deleted the player-model-log-listener branch February 21, 2025 18:46
@jkasten2 jkasten2 mentioned this pull request Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants