[Bug] ChangeLogLevel only touches the root logger, so it changes nothing with the shipped logback configuration

オープン
#11,400 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@iloveeyjafjalla がすでに取り組んでいます。

2026年10月13日 から。

  • #11401 @iloveeyjafjalla による — オープン

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
java
領域
observability

調査の方向性

Start at the ChangeLogLevel handler, where the root logger's level is set via loggerContext, then compare it with the component loggers in proxy/src/main/resources/rmq.proxy.logback.xml, which use additivity="false". Done means the requested level reaches those explicit-level loggers too, or docs/proxy-admin.md §8 is updated to state root-only behaviour. Open pull request #11401 already targets this, so coordinate with it before starting.

索引モデルが issue の本文から書いたものです。

説明

Before Creating the Bug Report
  • I found a bug, not just asking a question, which should be created in GitHub Discussions.
  • I have searched the GitHub Issues and GitHub Discussions of this repository and believe that this is not a duplicate.
  • I have confirmed that this bug belongs to the current repository, not other repositories of RocketMQ.
Runtime platform environment

OS: any (proxy module, admin gRPC surface, shipped logback configuration)

RocketMQ version

branch: develop
Git commit id: a7edeecfb (2026-10-13; the files are unchanged by that commit)

JDK Version

Compiler: Temurin 1.8.0_504 (target 1.8, same as CI)

Describe the Bug

ChangeLogLevel reports success but changes nothing that is logged, because it only sets the root logger's level while the
shipped logging configuration pins every component logger.

The handler:

loggerContext.getLogger( ... Logger.ROOT_LOGGER_NAME).setLevel(logbackLevel);
remark = "log level changed to " + logbackLevel;

The configuration the distribution ships (proxy/src/main/resources/rmq.proxy.logback.xml, installed as
conf/rmq.proxy.logback.xml and selected by mqproxy through -Drmq.logback.configurationFile) gives 20 component
loggers their own level with additivity="false"
, for example:

<logger name="RocketmqProxy" additivity="false" level="INFO">
<logger name="RocketmqBroker" additivity="false" level="INFO">
...

In Logback a logger with an explicit level does not inherit the root logger's level, so after
ChangeLogLevel(DEBUG) every Rocketmq* logger keeps logging at INFO: the RPC answers
"log level changed to DEBUG" while the operator sees no additional log line — the on-demand troubleshooting switch the
proto documents ("dynamically change the runtime log level of the server without a restart") has no effect on the logs they
are trying to raise.

Steps to Reproduce
  1. Start the proxy as the distribution does (so the shipped rmq.proxy.logback.xml is in effect).
  2. Call ChangeLogLevel with DEBUG.
  3. The response says the level changed, but no DEBUG line from any org.apache.rocketmq.* logger appears, because the
    component loggers still carry their configured INFO level.
Expected behavior

The runtime change reaches the loggers whose level the configuration pinned (those are precisely the loggers with an
explicit level), so the server's log verbosity actually changes.

Actual behavior

Only the root logger is changed; the application loggers keep the configured level, and the RPC still reports success.

Additional context

Fix: apply the requested level to the root logger and to the loggers with an explicit level. If root-only behaviour is
preferred, the boundary belongs in docs/proxy-admin.md §8 instead — either way the current state (a documented switch that
silently does nothing with the shipped configuration) is not one of the two.

主要言語
Java
スター
22.7k
フォーク
12k
平均マージ
3日 18時間
マージ済み PR(30日)
17

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

apache/rocketmq のほかの issue

apache/rocketmq の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。