Repository navigation
[merge-to-it] logging_config: console format API, dotted-prefix colours, cached lookups - #1203
Merged
lotusl-code merged 3 commits intoOct 9, 2026
Conversation
Contributor
sgrizan-nv
reviewed
Oct 7, 2026
lotusl-code
added this pull request to stack #1233
October 9, 2026 22:01
lotusl-code
removed this pull request from stack #1233
October 9, 2026 22:42
lotusl-code
changed the base branch from
merge-to-it/logging-config-integrate-oob-and-args
to
main
October 9, 2026 22:43
lotusl-code
changed the base branch from
main
to
merge-to-it/logging-config-integrate-oob-and-args
October 9, 2026 22:43
…rs, cached lookups - set_console_format() sets the console columns; the default shows time (HH:MM:SS.mmm), level and the last logger-name segment, no pid. DATE_FORMAT and log_bridge's kPattern drop the date. - Logger colours cover dotted descendants (most specific wins), through a lookup cached per logger name and rebuilt on every change. - CI's WujiGlovePlugin marker matches the short logger name. Signed-off-by: Lotus Li <lotusl@nvidia.com>
…the console only Dropping the date from the shared DATE_FORMAT and from log_bridge's kPattern also removed it from Python and C++ log files, which makes sessions that cross midnight, rotated files and cross-process correlation ambiguous. DATE_FORMAT keeps the full date again; the console formatter uses its own _CONSOLE_DATE_FORMAT, and log_bridge splits kPattern into kFilePattern (dated) and kConsolePattern. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Lotus Li <lotusl@nvidia.com>
lotusl-code
force-pushed
the
merge-to-it/logging-config-console-format-prefix-cache
branch
from
October 9, 2026 22:44
5d9f469 to
cce4386
Compare
lotusl-code
changed the base branch from
merge-to-it/logging-config-integrate-oob-and-args
to
main
October 9, 2026 22:45
lotusl-code
added this pull request to stack #1235
October 9, 2026 22:48
sgrizan-nv
approved these changes
Oct 9, 2026
Signed-off-by: Lotus Li <lotusl@nvidia.com>
lotusl-code
force-pushed
the
merge-to-it/logging-config-console-format-prefix-cache
branch
from
October 9, 2026 23:17
f182f86 to
2300194
Compare
lotusl-code
removed this pull request from stack #1235
October 9, 2026 23:33
lotusl-code
enabled stacked auto-merge (squash)
October 9, 2026 23:33
lotusl-code
disabled stacked auto-merge
October 9, 2026 23:35
lotusl-code
added this pull request to stack #1237
October 9, 2026 23:35
lotusl-code
deleted the
merge-to-it/logging-config-console-format-prefix-cache
branch
October 9, 2026 23:43
lotusl-code
added a commit
that referenced
this pull request
Oct 10, 2026
…content filters (#1204) * [merge-to-it] logging_config: console format API, dotted-prefix colours, cached lookups (#1203) * [merge-to-it] logging_config: console format API, dotted-prefix colours, cached lookups - set_console_format() sets the console columns; the default shows time (HH:MM:SS.mmm), level and the last logger-name segment, no pid. DATE_FORMAT and log_bridge's kPattern drop the date. - Logger colours cover dotted descendants (most specific wins), through a lookup cached per logger name and rebuilt on every change. - CI's WujiGlovePlugin marker matches the short logger name. Signed-off-by: Lotus Li <lotusl@nvidia.com> * [merge-to-it] logging_config: keep the date in log files, drop it on the console only Dropping the date from the shared DATE_FORMAT and from log_bridge's kPattern also removed it from Python and C++ log files, which makes sessions that cross midnight, rotated files and cross-process correlation ambiguous. DATE_FORMAT keeps the full date again; the console formatter uses its own _CONSOLE_DATE_FORMAT, and log_bridge splits kPattern into kFilePattern (dated) and kConsolePattern. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Lotus Li <lotusl@nvidia.com> * ci: retrigger checks Signed-off-by: Lotus Li <lotusl@nvidia.com> --------- Signed-off-by: Lotus Li <lotusl@nvidia.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * [merge-to-it] logging_config: split set_console_filter into name and content filters set_console_logger_name_filter(names) keeps records from the given loggers and their dotted descendants; set_console_content_filter(pattern) keeps records whose message matches the regex. A record must pass both; each setter builds a new cached matcher, and an invalid pattern is logged instead of raised. Signed-off-by: Lotus Li <lotusl@nvidia.com> * [merge-to-it] logging_config: report whether the console content filter was applied set_console_content_filter() returned None both when it applied a pattern and when it rejected an invalid one, so a caller could not tell its regex was refused and the previous filter kept. It now returns True when the filter is applied or removed and False when the pattern is rejected; the error is still logged and the current filter retained. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Lotus Li <lotusl@nvidia.com> --------- Signed-off-by: Lotus Li <lotusl@nvidia.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This branch was successfully deployed
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.
[merge-to-it]
Summary
Three tightly coupled console changes, kept together because the code cannot be split between them (the formatter's colour lookup is
_logger_color(record.name) if terminal else None, the lookup only exists in cached form, and onetypingimport serves both the format TypedDict and the lookup's TypeVar):set_console_format()updates the console columns (show_time,show_level,show_logger_name,show_pid,use_short_name). The default is time (HH:MM:SS.mmm), level and the last logger-name segment, without the pid. Only the console drops the date (_CONSOLE_DATE_FORMAT, log_bridge'skConsolePattern); Python and C++ log files keep the fullLINE_FORMATwithDATE_FORMAT/kFilePattern.set_logger_colors()call.WujiGlovePluginmarker matches the short logger name.Until #1204 lands,
set_console_formatis imported by its ownfrom ._console import (...)statement next to the existing one-line import; #1204 consolidates them.Stack: targets the integration branch that merges #1201 and #1202.
Testing
tests/python/core/logging_configincl.test_routing.pywith the C++ emitter;clang-format-14onsink_config.cpp; pre-commit.🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Improvements