Repository navigation
Take an explicitly configured text_log.level into account when updating logger levels - #127717
Conversation
Loggers::buildLoggers computes the root logger level as the maximum of all configured sinks, including text_log.level. Loggers::updateLevels, which is called after startup (to restore logger.level from startup_level) and on every configuration reload, only looked at the file, console, errorlog and syslog levels. With logger.level below text_log.level the root level dropped to the file level after startup or on the first reload, and system.text_log silently lost every message below that level. Include text_log.level in the computation in updateLevels as well, so that a configuration such as logger.level=information with text_log.level=trace keeps Trace and Debug messages in system.text_log while the file log stays at information. Co-Authored-By: Claude Fable 5.1 <[email protected]>
|
Workflow [PR], commit [2fb3f88] Summary: ✅
AI ReviewSummaryAn explicitly configured Final Verdict✅ Approve |
|
@nerve-bot WDYT? |
|
@groeneai wdyt? |
The default configuration enables text_log without a level, which means "trace". Counting that default towards the root level would make every server with logger.level below trace start writing Trace and Debug messages into system.text_log. Keep the previous behaviour for an unset text_log.level and only raise the root level when it is set explicitly. Co-Authored-By: Claude Fable 5.1 <[email protected]>
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Preview approval requiredThis pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit |
|
The approach looks right to me, and counting only an explicit One gap: Measured on a current master build (
The same rule in if (config.has("text_log.level"))
max_log_level = std::max(text_log_level, max_log_level);The test could then also check the startup part, e.g. that the |
Build profile diff (arm_release)Commit See the job log for details. |
buildLoggers only passed text_log.level to the text_log channel and did not include it in the root logger level, so with logger.level below text_log.level the Debug and Trace messages logged before the initial configuration load never reached system.text_log. Use the same rule as in updateLevels, and assert in the test that a startup Trace message is in system.text_log. Co-Authored-By: Claude Fable 5.1 <[email protected]>
|
@groeneai check this new version |
|
Looks right to me now.
No further comments from me. |
Backport #127717 to 26.10: Take an explicitly configured text_log.level into account when updating logger levels
Backport #127717 to 26.8: Take an explicitly configured text_log.level into account when updating logger levels
Backport #127717 to 26.9: Take an explicitly configured text_log.level into account when updating logger levels
…l into account when updating logger levels
…l into account when updating logger levels
…el into account when updating logger levels
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Fix
text_log.levelhaving no effect when it is set to a more verbose level thanlogger.level: messages belowlogger.levelnever reachedsystem.text_log, neither at startup nor after a configuration reload. Behaviour is unchanged whentext_log.levelis not set.Documentation entry for user-facing changes
No new settings. The
levelrow of thetext_logserver setting (docs/reference/settings/server-settings/_server_settings_outside_source.mdx) and the comment in the defaultconfig.xmlnow state that an explicitly settext_log.levelraises the root logger level, while an unset level is limited by the other log outputs.Details
The root logger level is the gate in front of all log outputs and is meant to be the maximum of the configured output levels (see the comment in
Loggers::buildLoggers).text_logis such an output with its owntext_log.level, but neitherLoggers::buildLoggers(startup) norLoggers::updateLevels(initial configuration load, restore oflogger.levelafterlogger.startup_level, everySYSTEM RELOAD CONFIG) included it in that maximum. With for example:the root level was
informationandsystem.text_logsilently lost everything below it, while the setting suggested otherwise.This change adds an explicitly configured
text_log.levelto the maximum in both functions. The text_log channel keeps filtering at its own level, so the file log is still capped atlogger.level.An unset
text_log.level(the shipped default, read astrace) is deliberately not counted: that would make every server withlogger.levelbelowtracestart writing Trace and Debug rows intosystem.text_log. Such servers keep today's behaviour, the same convention asconsole_log_level, which also followslogger.levelwhen unset.New integration test
test_text_log_level_after_reloadchecks that a startup Trace message (Initialized DateLUT ...) is insystem.text_log, that Trace rows keep arriving afterSYSTEM RELOAD CONFIG, and that the file log contains no Trace or Debug lines.The failing
Upgrade check(use_query_condition_cache_for_time_conditionsnot in the settings changes history) is unrelated to this change.A follow-up (#127718) makes
text_log.levelitself reloadable.🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/127717]
Version info
26.11.1.793-master(included in26.11and later)26.10.3.9,26.9.26.19,26.8.35.18