feat: refactor logging architecture to support other log collectors#2
Merged
justprodev merged 7 commits intomainfrom Dec 21, 2025
Merged
feat: refactor logging architecture to support other log collectors#2justprodev merged 7 commits intomainfrom
justprodev merged 7 commits intomainfrom
Conversation
…on and supported services
…te logging services
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.
This pull request refactors and modernizes the
remote_loggingDart package, expanding its capabilities from Loggly-only support to a more flexible, collector-based architecture for remote logging. It introduces a new abstraction for log collectors, adds support for Splunk, improves tag handling across platforms, and updates the API for easier extensibility and testing. The update also removes legacy code and updates documentation and tests to match the new structure.Key changes:
Major Architecture and API Changes
LogCollectorabstraction and refactored the logging pipeline to support multiple remote logging services, not just Loggly. The main entrypoint is nowinitRemoteLogging, which accepts any collector. (lib/src/model.dart[1]lib/src/remote_logging.dart[2] [3]lib/remote_logging.dart[4]HttpCollectoras a base class for HTTP-based collectors, and implemented bothLogglyCollectorand newSplunkCollectorclasses for sending logs to Loggly and Splunk, respectively. (lib/src/remote/collectors/http_collector.dart[1]lib/src/remote/collectors/loggly_collector.dart[2]lib/src/remote/collectors/splunk_collector.dart[3]Tag Handling and Platform Support
lib/src/remote/tags/tags.dart[1]lib/src/remote/tags/impl/io_tags.dart[2]lib/src/remote/tags/impl/empty_tags.dart[3]lib/src/remote_logging.dartlib/src/remote_logging.dartL33-R57)Deprecation and Cleanup
initLoggingAPI in favor ofinitRemoteLogging, providing a backward-compatible wrapper for legacy usage. (lib/src/remote_logging.dartlib/src/remote_logging.dartR66-R96)lib/src/remote/loggly.dart[1]lib/src/remote/mobile_tags.dart[2]Documentation and Testing
README.mdto reflect the new package name, API, and multi-collector support. (README.mdREADME.mdL1-R15)test/legacy_remote_logging_test.dart[1]test/loggly_collector_test.dart[2]test/loggly_test.dart[3]Package Metadata
pubspec.yamlto reflect the new version (2.0.0), Dart SDK constraints, and description. (pubspec.yamlpubspec.yamlL2-R7)