fix(FastLogger): enable SplitterChannel #5379#5380
Open
aleks-f wants to merge 2 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates FastLogger so it can correctly adapt a SplitterChannel into multiple Quill sinks (instead of falling back to a single console sink), and adds coverage for the new behavior. It also introduces a standalone Windows PowerShell build/test helper script.
Changes:
- Add
SplitterChannel::getChannel()accessor and updateFastLoggersink collection to recursively enumerate splitter children (plus sink de-duplication). - Add/extend Foundation tests to verify splitter fan-out and graceful skipping of unsupported
EventChannelinside a splitter. - Add
build.ps1to configure/build/test Poco on Windows via CMake and Visual Studio toolchain setup.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| Foundation/testsuite/src/FastLoggerChannelsTest.h | Declares a new test for EventChannel behavior under FastLogger. |
| Foundation/testsuite/src/FastLoggerChannelsTest.cpp | Expands splitter coverage and adds an EventChannel-skipping test. |
| Foundation/src/SplitterChannel.cpp | Implements getChannel(int) to enable safe child enumeration. |
| Foundation/src/FastLogger.cpp | Recurses into SplitterChannel children, skips EventChannel, and de-duplicates sinks. |
| Foundation/include/Poco/SplitterChannel.h | Exposes getChannel(int) in the public API. |
| build.ps1 | Adds a Windows standalone build/test script for Poco via CMake. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ix pattern translation Make the Quill-backed FastLogger a complete, correct logging path so loggers can switch to type=fast without losing formatting or shifting to UTC. Timezone: - Render timestamps in local time by default, set explicitly rather than relying on Quill's default so it cannot silently regress. - Honor an explicitly configured PatternFormatter times=local/UTC and the %L flag; fall back to local when nothing is configured. PatternFormatter gains getLocalTime() and isLocalTimeConfigured() (backed by a _localTimeSet flag) so an explicit UTC can be distinguished from the unset default. Pattern translation: - Treat a contiguous run of date/time specifiers, and the separators between them, as the timestamp: emit a single %(time) and route the run into Quill's timestamp_pattern. Fixes mangled output such as 20260601-- :: instead of 2026-06-01 12:30:45. Channel traversal: - Recurse into SplitterChannel children so a splitter maps to all of its sinks and per-child patterns are picked up, instead of falling back to a lone unformatted console sink. - Skip EventChannel with a warning (it cannot back a Quill sink) rather than adding a duplicate console sink; de-duplicate singleton sinks. - Guard channel-graph traversal against cycles with a visited set to avoid infinite recursion and stack overflow. Tests: FastLoggerChannelsTest covers splitter routing, EventChannel skip, local-time default, explicit-UTC override, timestamp layout, and the cycle guard.
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.