feat(core): implement cross-platform logging system - #32
Closed
abdo-essam wants to merge 3 commits into
Closed
abdo-essam wants to merge 3 commits into
abdo-essam wants to merge 3 commits into
Conversation
Introduce a unified logging infrastructure including ComposeShieldLogger, LogLevel, and platform-specific implementations for Android (Logcat) and iOS (NSLog). This system allows developers to monitor security-related events and diagnostic information across the library. - Add ComposeShieldLogger interface and ComposeShieldLoggers factory - Implement androidLogcat and osLog platform loggers - Integrate ShieldLog internal utility with atomic references - Add comprehensive unit tests for log filtering and dispatching
There was a problem hiding this comment.
This PR successfully implements a cross-platform logging system with clean architecture and proper thread-safety. The implementation includes:
- Well-defined logger interface with level-based filtering
- Platform-specific implementations (Android Logcat, iOS NSLog)
- Thread-safe internal logger holder using AtomicReference
- Comprehensive test coverage including error scenarios
- Proper migration from println statements to structured logging
The code is production-ready with no blocking issues identified.
You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.
Improve code readability in the logger test file by sorting imports alphabetically and reformatting long parameter lists.
Update the composeshield.klib.api file to include the new ComposeShieldLogLevel enum entries. This aligns the public API surface with the cross-platform logging system implementation.
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.
No description provided.