Use dedicated logging for interpose and development warnings#855
Merged
Use dedicated logging for interpose and development warnings#855
Conversation
🤖 Augment PR SummarySummary: This PR refines diagnostics by routing interpose and development-only warnings through dedicated OSLog categories. Changes:
Technical Notes: Keeps diagnostics filterable via subsystem/category, while avoiding noisy stdout output outside of DEBUG builds. 🤖 Was this summary useful? React with 👍 or 👎 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #855 +/- ##
==========================================
- Coverage 27.20% 27.20% -0.01%
==========================================
Files 673 673
Lines 44165 44165
==========================================
- Hits 12016 12013 -3
- Misses 32149 32152 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
InterposeOSLog inInterpose.cand route interpose diagnostics through it instead ofOS_LOG_DEFAULT.[OpenSwiftUI]text prefix from those interpose log messages now that the subsystem/category carry the context.printdiagnostics inLogging.swiftwith a DEBUG-only development logger.Why
The interpose logs should be filterable through a dedicated category rather than mixed into the default log stream. Development diagnostics should also use the logging system instead of printing directly.
Validation
xcrun clang -fsyntax-only -fblocks -std=c11 -I Sources/OpenSwiftUI_SPI -D_OPENSWIFTUI_SWIFTUI_RENDER=1 Sources/OpenSwiftUI_SPI/Util/Interpose.cDARWINPRIVATEFRAMEWORKS_TARGET_RELEASE=2024 swift build --target OpenSwiftUI_SPIDARWINPRIVATEFRAMEWORKS_TARGET_RELEASE=2024 swift build --target OpenSwiftUICoreDARWINPRIVATEFRAMEWORKS_TARGET_RELEASE=2024 swift build -c release --target OpenSwiftUICore