Skip to content

chore(systemd): remove hardcoded qt logging rule - #391

Merged
deepin-bot[bot] merged 1 commit into
linuxdeepin:masterfrom
mhduiy:prelaunch-splash-protocol-rename
Oct 15, 2026
Merged

deepin-bot[bot] merged 1 commit into
linuxdeepin:masterfrom
mhduiy:prelaunch-splash-protocol-rename

Conversation

@mhduiy

@mhduiy mhduiy commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Removes the hardcoded QT_LOGGING_RULES="*.debug=false" from the user systemd unit of dde-application-manager.

  • Debug output now follows the session's Qt logging configuration (qtlogging.ini / QT_LOGGING_RULES from the environment) instead of being force-disabled by the unit
  • Debug logs can be enabled without editing the installed unit
  • No other unit in the repo sets logging rules; behavior is otherwise unchanged

PMS: TASK-396623

Summary by Sourcery

Enhancements:

  • Allow the application manager to follow the session's Qt logging configuration instead of forcing debug logging off in its user systemd unit.

1. Drop Environment=QT_LOGGING_RULES="*.debug=false" from the user
   service unit of dde-application-manager
2. Debug output now follows the session's Qt logging configuration
   instead of being force-disabled by the unit
3. Debug logs can be enabled without editing the installed unit;
   no other unit in the repo sets logging rules

Log: Debug logging of the application manager is no longer forced off by the service unit
Influence: Debug logs follow qtlogging.ini/session env; no other behavior change

chore(systemd): 移除硬编码的 Qt 日志规则

1. 从 dde-application-manager 用户服务单元中移除
   Environment=QT_LOGGING_RULES="*.debug=false"
2. debug 日志改由会话的 Qt 日志配置决定,不再被 unit 强制关闭
3. 无需修改已安装的 unit 即可开启调试日志;
   仓库内其余 unit 均未设置日志规则

Log: 应用管理器的调试日志不再被服务单元强制关闭
PMS: TASK-396623
Influence: 调试日志跟随 qtlogging.ini/会话环境,其余行为不变
@sourcery-ai

sourcery-ai Bot commented Oct 15, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Removes the user systemd unit’s hardcoded Qt logging override, allowing qtlogging.ini or the session’s QT_LOGGING_RULES environment setting to control debug output without modifying the installed unit.

File-Level Changes

Change Details Files
Delegate Qt logging behavior to the session configuration instead of forcing it off in the user service unit.
  • Remove the hardcoded QT_LOGGING_RULES="*.debug=false" environment setting.
  • Preserve the rest of the systemd unit behavior unchanged.
misc/systemd/user/org.desktopspec.ApplicationManager1.service.in

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: mhduiy, robertkill

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@deepin-ci-robot

Copy link
Copy Markdown

deepin pr auto review

🤖 AI 代码审查报告

总体评分: 100 分 (通过阈值: 70分)

Pass


📊 总体评价

项目 结果
审查结论 代码审查通过
评分详情 总体评分 100 分,大于 70 分通过阈值,代码质量符合要求。本次变更从 systemd 用户服务单元中移除了硬编码的 QT_LOGGING_RULES 环境变量,变更内容简洁明确,无安全漏洞,无语法逻辑问题。

🔍 详细分析

1. 语法逻辑 ✅

评价: 优秀 ✅ 通过

潜在问题:
✅ 未发现明显问题

建议: 无需修改,systemd 单元文件语法正确,移除 Environment 指令后服务单元仍然有效。


2. 代码质量 ✅

评价: 优秀 ✅ 通过

潜在问题:
✅ 未发现明显问题

建议: 无需修改,变更简洁明了,commit message 清晰描述了变更目的,PR 描述提供了充分的上下文。


3. 代码性能 ✅

评价: 优秀 ✅ 通过

潜在问题:
✅ 未发现明显问题

建议: 无需修改,移除环境变量对性能无影响。


4. 代码安全 🔒

评价: 优秀 ✅ 通过

🔐 发现 0 个安全漏洞

安全漏洞详情:
✅ 未发现安全漏洞

建议: 无需修改,移除硬编码的日志规则不会引入安全漏洞。调试日志的开启与关闭应由会话级配置控制,而非硬编码在 systemd 单元中。


💡 改进建议代码示例

# 移除前(misc/systemd/user/org.desktopspec.ApplicationManager1.service.in)
[Service]
Type=dbus
BusName=org.desktopspec.ApplicationManager1
ExecStart=@CMAKE_INSTALL_FULL_BINDIR@/dde-application-manager
Environment=QT_LOGGING_RULES="*.debug=false"  # <- 被移除的行
Slice=session.slice
Restart=always
RestartSec=500ms

# 移除后
[Service]
Type=dbus
BusName=org.desktopspec.ApplicationManager1
ExecStart=@CMAKE_INSTALL_FULL_BINDIR@/dde-application-manager
# Environment 行已移除,调试日志现在遵循会话级 Qt 日志配置
Slice=session.slice
Restart=always
RestartSec=500ms

本报告由 AI 代码审查工具自动生成

@mhduiy

mhduiy commented Oct 15, 2026

Copy link
Copy Markdown
Contributor Author

/forcemerge

@deepin-bot

deepin-bot Bot commented Oct 15, 2026

Copy link
Copy Markdown

This pr force merged! (status: blocked)

@deepin-bot
deepin-bot Bot merged commit 97c3212 into linuxdeepin:master Oct 15, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants