dtkcore icon indicating copy to clipboard operation
dtkcore copied to clipboard

Loggingrules dconfig support (cherry-pick from gerrit)

Open kegechen opened this issue 1 year ago • 5 comments

  • 允许基于dtk开发的应用动态控制其日志输出等级
  • lshw查询内存大小时返回多元素数组,修正解析过程
  • 从文件中读取deepinType和productType值时因为权限问题会失败
  • 增加registerLoggingRulesWatcher接口
  • 修复计算 build 版本号错误的问题
  • 修复日志格式时间戳显示异常问题

https://github.com/linuxdeepin/dtkcommon/pull/70

kegechen avatar May 09 '24 09:05 kegechen

Doc Check bot :green_circle: Document Coverage Check Passed!

deepin-bot[bot] avatar May 09 '24 09:05 deepin-bot[bot]

@Whale107 @Groveer @993381

kegechen avatar May 09 '24 09:05 kegechen

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Groveer, kegechen, zccrs

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

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 avatar May 14 '24 09:05 deepin-ci-robot

TAG Bot

New tag: 5.6.29 DISTRIBUTION: unstable Suggest: synchronizing this PR through rebase #415

deepin-bot[bot] avatar May 16 '24 02:05 deepin-bot[bot]

deepin pr auto review

关键摘要:

  • createDConfig函数中,当appId为空时返回nullptr,但未检查DConfig::create是否成功创建配置,可能会导致后续代码在尝试访问config时出现未定义行为。
  • initLoggingRules函数中使用了qEnvironmentVariableIsSet来检查环境变量DTK_DISABLED_LOGGING_RULES,但没有在代码中看到对这一变量的任何操作,可能存在未完成的功能。
  • updateLoggingRules函数中,var = m_dsgConfig->value(RULES_KEY);var = m_fallbackConfig->value(RULES_KEY);这两行代码路径没有注释说明其逻辑,可能会让人困惑。
  • QLoggingCategory::setFilterRules函数的参数使用了replace(";", "\n")来处理分号,但没有解释为什么需要这样做,可能需要更多的上下文信息。

是否建议立即修改: 是

这些问题可能会影响代码的可读性、可维护性和功能的正确性。建议在合并代码前进行充分的检查和修改。

deepin-ci-robot avatar May 17 '24 01:05 deepin-ci-robot