Skip to content

chore: adapt debugging settings function#667

Merged
BLumia merged 1 commit into
linuxdeepin:masterfrom
BLumia:log
Nov 11, 2025
Merged

chore: adapt debugging settings function#667
BLumia merged 1 commit into
linuxdeepin:masterfrom
BLumia:log

Conversation

@BLumia

@BLumia BLumia commented Nov 11, 2025

Copy link
Copy Markdown
Member

Using linuxdeepin/dde-control-center f86903a87b52048189d0d869c1828fc13da28c03 as reference.

Log:

Using linuxdeepin/dde-control-center f86903a87b52048189d0d869c1828fc13da28c03
as reference.

Log:
@BLumia BLumia requested a review from wjyrich November 11, 2025 05:36

@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.

Sorry @BLumia, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@deepin-ci-robot

Copy link
Copy Markdown

deepin pr auto review

我来对这次代码变更进行审查:

  1. 代码质量改进:
  • 日志分类命名规范化:将所有的日志分类从 "dde.launchpad.xxx" 改为 "org.deepin.dde.launchpad.xxx",这是一个很好的改进,符合 Deepin 项目的命名规范。
  • 新增了调试配置文件和日志配置文件,这有助于统一管理和调试。
  1. 安全性:
  • 配置文件使用了 JSON 格式,结构清晰。
  • 日志配置文件中指定了具体的执行路径 "/usr/bin/dde-shell",避免了潜在的路径注入风险。
  1. 性能:
  • 这些变更主要是配置和日志相关的修改,不会对运行时性能产生显著影响。
  1. 建议改进:
    a) CMakeLists.txt 中的安装路径:
# 建议使用变量来存储路径,提高可维护性
set(DEBUG_CONFIG_DIR ${CMAKE_INSTALL_DATADIR}/deepin-debug-config/deepin-debug-config.d)
set(LOG_CONFIG_DIR ${CMAKE_INSTALL_DATADIR}/deepin-log-viewer/deepin-log.conf.d)

install(FILES ${CMAKE_SOURCE_DIR}/dist/deepin-debug-config/org.deepin.dde.launchpad.json
    DESTINATION ${DEBUG_CONFIG_DIR})
install(FILES ${CMAKE_SOURCE_DIR}/dist/deepin-log-config/org.deepin.dde.launchpad.json
    DESTINATION ${LOG_CONFIG_DIR})

b) 日志配置文件优化:

  • 可以考虑将重复的配置项提取为模板,减少配置文件的冗余
  • 添加配置文件版本控制和兼容性说明

c) 日志分类管理:

  • 建议创建一个统一的头文件来管理所有的日志分类,避免在各个源文件中重复定义
  • 可以考虑添加日志级别的配置选项
  1. 其他建议:
  • 建议在配置文件中添加详细的注释说明,便于维护人员理解
  • 可以考虑添加配置文件的验证机制,确保配置文件的正确性

总体来说,这次变更是一个积极的改进,提高了代码的可维护性和调试能力。建议的改进主要集中在配置管理和代码组织方面,这些改进将使代码更加健壮和易于维护。

@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

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

@BLumia BLumia merged commit cbd57a9 into linuxdeepin:master Nov 11, 2025
7 of 9 checks passed
@BLumia BLumia deleted the log branch November 11, 2025 06:32
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.

4 participants