Skip to content
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

Create interface for internal logging #828

Merged
merged 1 commit into from
May 10, 2024
Merged

Conversation

fractalwrench
Copy link
Contributor

Goal

Extracts an interface named EmbLogger that will be used for internal logging. I have renamed InternalEmbraceLogger as EmbLoggerImpl for now but am open to naming suggestions. Extracting this code to an interface will make it easier to verify that specific messages are logged during testing. It also opens up the possibility of using a no-op implementation in production builds to save CPU time.

Testing

Relied on existing test coverage.

@fractalwrench fractalwrench requested a review from a team as a code owner May 9, 2024 16:10
Copy link
Collaborator

@bidetofevil bidetofevil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Phew. Massive and much needed change. LGTM!

Copy link

codecov bot commented May 10, 2024

Codecov Report

Attention: Patch coverage is 65.85366% with 14 lines in your changes are missing coverage. Please review.

Project coverage is 81.40%. Comparing base (307d284) to head (58417d8).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #828      +/-   ##
==========================================
- Coverage   81.42%   81.40%   -0.02%     
==========================================
  Files         425      426       +1     
  Lines       11358    11358              
  Branches     1689     1689              
==========================================
- Hits         9248     9246       -2     
- Misses       1400     1402       +2     
  Partials      710      710              
Files Coverage Δ
...android/embracesdk/FlutterInternalInterfaceImpl.kt 91.66% <ø> (ø)
...oid/embracesdk/ReactNativeInternalInterfaceImpl.kt 64.44% <ø> (ø)
...e/android/embracesdk/UnityInternalInterfaceImpl.kt 45.28% <ø> (ø)
...mbrace/android/embracesdk/anr/EmbraceAnrService.kt 94.00% <ø> (ø)
.../embracesdk/anr/detection/BlockedThreadDetector.kt 82.92% <ø> (ø)
...embracesdk/anr/detection/LivenessCheckScheduler.kt 82.25% <ø> (ø)
...id/embracesdk/anr/detection/TargetThreadHandler.kt 80.95% <ø> (ø)
...embracesdk/anr/detection/UnbalancedCallDetector.kt 100.00% <ø> (ø)
...cesdk/anr/ndk/EmbraceNativeThreadSamplerService.kt 87.50% <ø> (ø)
...embracesdk/anr/ndk/NativeThreadSamplerInstaller.kt 63.63% <ø> (ø)
... and 87 more

... and 1 file with indirect coverage changes

@fractalwrench fractalwrench changed the base branch from inline-err-service-action to master May 10, 2024 09:00
@fractalwrench fractalwrench merged commit bb925cc into master May 10, 2024
4 checks passed
@fractalwrench fractalwrench deleted the emb-logger-interface branch May 10, 2024 09:29
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.

None yet

2 participants