Skip to content

fix: correct log rules separator in dtk preference config - #149

Merged
18202781743 merged 1 commit into
linuxdeepin:masterfrom
18202781743:master
Jul 14, 2026
Merged

18202781743 merged 1 commit into
linuxdeepin:masterfrom
18202781743:master

Conversation

@18202781743

@18202781743 18202781743 commented Jul 14, 2026 •

Copy link
Copy Markdown
Contributor
  1. Change the separator in logging rules from comma to semicolon
  2. Update the serial number to reflect the configuration change

Log: Fixed logging rules separator from comma to semicolon in dtk
configuration

Influence:

  1. Verify that logging rules are correctly parsed with semicolon
    separator
  2. Test logging behavior to ensure proper filtering with updated rules
  3. Confirm configuration serial number is incremented correctly

fix: 修正 dtk 配置中日志规则的分隔符

  1. 将日志规则中的分隔符从逗号改为分号
  2. 更新序列号以反映配置变更

Log: 修复 dtk 配置中日志规则分隔符从逗号改为分号

Influence:

  1. 验证分号分隔的日志规则能被正确解析
  2. 测试日志过滤功能是否按更新后的规则正常工作
  3. 确认配置序列号正确递增

Summary by Sourcery

Bug Fixes:

  • Correct logging rules separator in DTK preference configuration so rules are parsed correctly.

@18202781743
18202781743 requested review from BLumia and mhduiy July 14, 2026 07:59
@sourcery-ai

sourcery-ai Bot commented Jul 14, 2026

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

Reviewer's Guide

This PR updates the DTK preference JSON so logging rules use a semicolon separator instead of a comma, and bumps the configuration serial/version field to reflect this change.

File-Level Changes

Change Details Files
Adjust logging rules to use semicolon separators so the configuration is parsed and applied correctly.
  • Replace commas with semicolons in logging rules configuration values
  • Ensure logging rule parsing aligns with the new separator semantics
configs/org.deepin.dtk.preference.json
Increment the configuration serial/version to reflect the logging rules change.
  • Update the configuration serial/version field to the next value
  • Keep other configuration entries unchanged while reflecting the new revision
configs/org.deepin.dtk.preference.json

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 left some high level feedback:

  • Check the rest of org.deepin.dtk.preference.json for any remaining comma-separated logging rule definitions to keep the separator usage consistent across the config.
  • If any code paths still expect comma-separated rules for this config, consider adding a short transitional parsing step (accepting both commas and semicolons) to avoid breaking existing deployments while the config rolls out.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Check the rest of `org.deepin.dtk.preference.json` for any remaining comma-separated logging rule definitions to keep the separator usage consistent across the config.
- If any code paths still expect comma-separated rules for this config, consider adding a short transitional parsing step (accepting both commas and semicolons) to avoid breaking existing deployments while the config rolls out.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Changed the logging rules separator from comma to semicolon in
configuration file to ensure proper parsing of multiple logging levels.
Updated serial number to reflect the change.

Log: Fixed logging rules separator in DTK preferences configuration

Influence:
1. Verify that logging rules with multiple levels (debug, info) are
correctly parsed
2. Test application behavior with the updated configuration

fix: 修正日志规则分隔符从逗号改为分号

将配置文件中的日志规则分隔符从逗号改为分号,以确保多个日志级别能被正确解
析。同时更新了序列号以反映此次变更。

Log: 修复 DTK 偏好设置配置中的日志规则分隔符

Influence:
1. 验证多个日志级别(debug、info)的规则能被正确解析
2. 测试应用在更新配置后的行为表现
@deepin-ci-robot

Copy link
Copy Markdown
Contributor

deepin pr auto review

★ 总体评分:100分

■ 【总体评价】

代码修复了DTK日志规则配置的分隔符问题,使其符合Qt日志过滤规则的标准格式。
逻辑正确且无安全漏洞,故给予满分。

■ 【详细分析】

  • 1.语法逻辑(基本正确)✓

修改将 configs/org.deepin.dtk.preference.json 中的 "value": "*.debug=false,*.info=false" 改为 "value": "*.debug=false;*.info=false"。Qt的日志规则中,多条规则应使用换行符或分号分隔,原使用的逗号会导致规则解析不正确,修改后语法逻辑完全正确。
潜在问题:无
建议:无需额外修改

  • 2.代码质量(良好)✓

修改精准定位了配置项的错误,修改方式简洁明了,符合JSON语法和Qt日志规则规范。
潜在问题:无
建议:保持当前代码风格

  • 3.代码性能(无性能问题)✓

仅修改静态配置文件的字符串值,不涉及运行时逻辑或资源消耗,对性能无任何影响。
潜在问题:无
建议:无需额外优化

  • 4.代码安全(存在0个安全漏洞)✓

漏洞对比统计:新增漏洞 0 个,减少漏洞 0 个,持平 0 个
本次修改仅涉及日志级别配置字符串的分隔符调整,未引入任何外部输入处理或敏感操作,不存在安全风险。

  • 建议:无需安全修复

■ 【改进建议代码示例】

        "rules": {
            "value": "*.debug=false;*.info=false",
            "serial": 2,
            "flags": ["global"],
            "name": "The logging rules of dtk applications"
        }

@deepin-ci-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: 18202781743, BLumia

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

@18202781743
18202781743 merged commit 75f7745 into linuxdeepin:master Jul 14, 2026
20 of 23 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