Skip to content

fix(FastLogger): enable SplitterChannel #5379#5380

Open
aleks-f wants to merge 2 commits into
mainfrom
5379-fastlogger-splitterchannel
Open

fix(FastLogger): enable SplitterChannel #5379#5380
aleks-f wants to merge 2 commits into
mainfrom
5379-fastlogger-splitterchannel

Conversation

@aleks-f
Copy link
Copy Markdown
Member

@aleks-f aleks-f commented Jun 1, 2026

No description provided.

@aleks-f aleks-f requested a review from Copilot June 1, 2026 14:53
@aleks-f aleks-f self-assigned this Jun 1, 2026
@aleks-f aleks-f linked an issue Jun 1, 2026 that may be closed by this pull request
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 update FastLogger sink collection to recursively enumerate splitter children (plus sink de-duplication).
  • Add/extend Foundation tests to verify splitter fan-out and graceful skipping of unsupported EventChannel inside a splitter.
  • Add build.ps1 to 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.

Comment thread Foundation/src/FastLogger.cpp Outdated
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FastLogger can not use SplitterChannel

2 participants