From 9e6b4dc89520bae856116ebc4eeacf644bb623e8 Mon Sep 17 00:00:00 2001 From: Ivy233 Date: Sun, 4 Oct 2026 20:49:27 +0800 Subject: [PATCH] fix: demote missing tray plugin directory log to debug MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit allPluginPaths() scans a fixed list of tray plugin directories while resolving plugin groups. A missing directory is not an error: entries such as quick-trays/ (legacy dde-shell widget tray plugin directory, no package has installed there since those plugins were removed in dde-shell 9fcba120, 2024-07) and custom TRAY_DEBUG_PLUGIN_PATH locations can legitimately not exist. On every dock start, each dde-tray-loader instance printed one qCWarning per missing directory, adding non-actionable noise to the journal. Demote the message to qCDebug. Under the session default logging rules (*.debug=false) it stays silent, and it remains observable for diagnosis with QT_LOGGING_RULES='*.debug=false;org.deepin.dde.tray-loader.debug=true'. Per review discussion, the quick-trays/ entry is kept in the scan list; the problem is the log level, not the directory list. 修复:缺失的托盘插件目录日志降为 qCDebug allPluginPaths() 解析插件分组时会扫描固定的托盘插件目录列表。目录缺失 并非错误:例如 quick-trays/(旧 dde-shell widget 托盘插件目录,自 dde-shell 9fcba120,2024-07 起无包提供)以及 TRAY_DEBUG_PLUGIN_PATH 自定义路径都可能合法地不存在。此前每次 dock 启动,每个 dde-tray-loader 实例都会为每个缺失目录打印一条 qCWarning,给 journal 带来无法行动的 噪音。将日志降为 qCDebug:会话默认规则(*.debug=false)下保持静默, 排查时仍可通过 QT_LOGGING_RULES='*.debug=false;org.deepin.dde.tray-loader.debug=true' 观察。按评审讨论,quick-trays/ 扫描条目保留:问题在日志级别而不在 目录列表。 PMS: TASK-394335 --- src/loader/trayplugingroups.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/loader/trayplugingroups.cpp b/src/loader/trayplugingroups.cpp index 147d9d972..1edf7b01d 100644 --- a/src/loader/trayplugingroups.cpp +++ b/src/loader/trayplugingroups.cpp @@ -42,7 +42,7 @@ QStringList allPluginPaths() for (const auto &pluginDir : std::as_const(dirs)) { QDir dir(pluginDir); if (!dir.exists()) { - qCWarning(loaderLog) << "The plugin directory does not exist:" << pluginDir; + qCDebug(loaderLog) << "The plugin directory does not exist:" << pluginDir; continue; }