feat(console): configurable output stream#118
Merged
Conversation
Let ConsoleLogger target any std::ostream& and add an optional level-based routing table so callers can split regular output from diagnostics across cout, cerr, and any caller-provided stream without breaking the historical default behavior. Constraint: Preserve default std::cout behavior and existing public API Rejected: Built-in auto routing by level | would force a fixed severity policy users cannot tune Confidence: high Scope-risk: moderate Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Treat null custom streams as a no-op route, drop color writes into custom streams, trim the redundant config field copies in the dual-arg constructor, add static ConsoleStreamRoute helpers, rename TO_STREAM macros to STREAM, and cover sync and null-fallback paths in tests. Constraint: Preserve public API and default std::cout behavior Confidence: high Scope-risk: narrow Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Move ConsoleStreamRoute.hpp under loggers/ConsoleLogger/ and rely on the existing enums pull-in via the logger aggregator instead of an explicit ../enums.hpp include. Constraint: Preserve public include path semantics through ConsoleLogger.hpp Confidence: high Scope-risk: narrow Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add a small unit test for the to_cerr helper and mark ConsoleLogger::get_config() as const so it matches the rest of the read-only accessors. Constraint: Preserve public API Confidence: high Scope-risk: narrow Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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
Verification
🤖 Generated with Claude Code