Repository navigation
Make text_log.level reloadable - #127718
alexey-milovidov merged 6 commits into
Conversation
text_log.level was read only in Loggers::buildLoggers, so changing it required a server restart, unlike logger.level, console_log_level, errorlog_level and syslog_level, which are re-applied by Loggers::updateLevels on every configuration reload. Add OwnSplitChannelBase::setTextLogLevel and call it from updateLevels, so that a changed text_log.level takes effect on SYSTEM RELOAD CONFIG. The text_log channel itself (queue and background thread) is still created at startup; turning text_log on or off at runtime is not covered. Co-Authored-By: Claude Fable 5.1 <[email protected]>
|
Workflow [PR], commit [334804c] Summary: ✅
AI ReviewSummaryPR #127718 makes Missing context / blind spots
Final VerdictStatus: ✅ Approve. No code changes requested; the current revision still needs its CI results. |
|
@nerve-bot WDYT? |
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Compile time of recompiled translation units18 translation units recompiled, 96 s compile time in total, 17 of them have a recent master baseline. Translation units without a recent master baseline:
|
… after reload to `none` - When `text_log.level` is removed from an existing `text_log` section, `updateLevels` now reapplies the default `trace` threshold to the sink (as after a restart), while the root logger level is still raised only for an explicit value. - `OwnAsyncSplitChannel` remembers that its `text_log` consumer was started. A later reload to `none` keeps serving the `flushTextLogs` handshake, so messages accepted before the reload are still persisted by `SYSTEM FLUSH LOGS` and on shutdown, and `open` restarts the consumer after `remapExecutable` so the level can be raised again. - The integration test now keeps the file log at `trace` so the sink threshold is tested independently of the root logger, covers both the synchronous and the asynchronous channel, the removal of the explicit level, and draining across a reload to `none`. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…adable # Conflicts: # src/Loggers/Loggers.cpp
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
text_log.levelcan now be changed without a server restart; it is re-applied on configuration reload like the other logger levels.Documentation entry for user-facing changes
An explicitly configured
text_log.levelis applied onSYSTEM RELOAD CONFIG. Enabling or disablingtext_logitself still requires a restart.Details
Follow-up to #127717, which made
Loggers::updateLevelsinclude an explicitly configuredtext_log.levelin the root logger level. Until now the level was read only at startup inLoggers::buildLoggers, so operators had to restart the server to change how much reachessystem.text_log, whilelogger.level,console_log_level,errorlog_levelandsyslog_levelare all reloadable.This adds
OwnSplitChannelBase::setTextLogLevel(int)(implemented for both the synchronous and the asynchronous split channel by updating the atomictext_log_max_priority) and calls it fromupdateLevelswhentext_log.levelis set in the configuration. The asynchronous channel only applies the new level when its text_log consumer thread exists, which is the case whenevertext_logwas configured at startup with a level other thannone.The integration test
test_text_log_level_after_reloadkeeps the file log attraceand checks, on both an asynchronous and a synchronous node, that thetext_logsink filters messages on reload (information,trace,none, and a removed level), and that messages accepted before a reload tononeare still flushed.Removing
text_log.levelfrom the configuration reapplies the defaulttracethreshold to the sink, as after a restart. For the asynchronous channel, thetext_logconsumer keeps running after a reload tonone, soSYSTEM FLUSH LOGSand shutdown still drain messages accepted before the reload.🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/127718]
Version info
26.11.1.1017-master(included in26.11and later)