Loggingrules dconfig support (cherry-pick from gerrit)#413
Merged
Conversation
deepin-ci-robot
added a commit
to linuxdeepin/dtk6core
that referenced
this pull request
May 9, 2024
Synchronize source files from linuxdeepin/dtkcore. Source-pull-request: linuxdeepin/dtkcore#413
kegechen
requested review from
18202781743,
BLumia,
FeiWang1119,
asterwyx and
xzl01
May 9, 2024 09:50
Contributor
|
Doc Check bot |
Contributor
Author
Groveer
approved these changes
May 10, 2024
18202781743
reviewed
May 10, 2024
deepin-ci-robot
added a commit
to linuxdeepin/dtk6core
that referenced
this pull request
May 10, 2024
Synchronize source files from linuxdeepin/dtkcore. Source-pull-request: linuxdeepin/dtkcore#413
18202781743
reviewed
May 10, 2024
zccrs
requested changes
May 10, 2024
deepin-ci-robot
added a commit
to linuxdeepin/dtk6core
that referenced
this pull request
May 11, 2024
Synchronize source files from linuxdeepin/dtkcore. Source-pull-request: linuxdeepin/dtkcore#413
zccrs
requested changes
May 11, 2024
deepin-ci-robot
added a commit
to linuxdeepin/dtk6core
that referenced
this pull request
May 11, 2024
Synchronize source files from linuxdeepin/dtkcore. Source-pull-request: linuxdeepin/dtkcore#413
deepin-ci-robot
added a commit
to linuxdeepin/dtk6core
that referenced
this pull request
May 11, 2024
Synchronize source files from linuxdeepin/dtkcore. Source-pull-request: linuxdeepin/dtkcore#413
zccrs
requested changes
May 13, 2024
deepin-ci-robot
added a commit
to linuxdeepin/dtk6core
that referenced
this pull request
May 14, 2024
Synchronize source files from linuxdeepin/dtkcore. Source-pull-request: linuxdeepin/dtkcore#413
deepin-ci-robot
added a commit
to linuxdeepin/dtk6core
that referenced
this pull request
May 14, 2024
Synchronize source files from linuxdeepin/dtkcore. Source-pull-request: linuxdeepin/dtkcore#413
deepin-ci-robot
added a commit
to linuxdeepin/dtk6core
that referenced
this pull request
May 14, 2024
Synchronize source files from linuxdeepin/dtkcore. Source-pull-request: linuxdeepin/dtkcore#413
deepin-ci-robot
added a commit
to linuxdeepin/dtk6core
that referenced
this pull request
May 14, 2024
Synchronize source files from linuxdeepin/dtkcore. Source-pull-request: linuxdeepin/dtkcore#413
zccrs
approved these changes
May 14, 2024
Contributor
|
[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. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
18202781743
reviewed
May 14, 2024
| updateLoggingRules(); | ||
| } | ||
|
|
||
| void DLogManagerPrivate::updateLoggingRules() |
Contributor
There was a problem hiding this comment.
在应用不重启的情况下,不能重置之前设置的值了,
Contributor
Author
There was a problem hiding this comment.
似的,reset 之后,isDefaultValue 是 true,也就是说不能用reset的方式来清空rules,只能删除的方式清空
Contributor
|
TAG Bot New tag: 5.6.29 |
在运行中,不需要重启应用,也可以通过配置项控制日志输出等级 注: 应用的applicationName 需要和dconfig安装时的appid等同方可识别 配置规则等同于QT_LOGGING_RULES 注意:由于 dtk/dtk6 的存在 meta 文件 在 libdtkdata 中安装 Log: 允许基于dtk开发的应用动态控制其日志输出等级 Influence: 允许基于dtk开发的应用动态控制其日志输出等级 Task: https://pms.uniontech.com/task-view-307567.html https://pms.uniontech.com/task-view-305899.html
调整json结果解析过程 Log: 在不同场景下lshw可能返回多个元素 Influence: DSysInfo::memoryInstalledSize解析过程 Bug: https://pms.uniontech.com/bug-view-228681.html Change-Id: I51030f037fa272ef9d510265524e5ec934c1f9bd
安装了三方管控应用时,从文件中读取deepinType和productType值时因为权限问题会失败,需要重新读取一次 Log: 修复第一次读取配置文件失败导致无法显示系统版本和说明问题 Influence: 正常显示版本和说明
功能:监听 dconfig 的值然后设置应用的日志级别 目的: 1.取消QT_LOGGING_RULES需要在创建 application之前处理 因为QLoggingRegistry在构造函数中获取环境变量的值后不会监听环境变量的变化. 目前直接使用applicationName当做appId 的做法不可行. 2.不和应用的 applicationName耦合目前大部分应用的applicationName和dconfig 的appId是不一样的,需要修改应用的名字 可能存在多个 application 使用通过一个 dconfig 的情况,修改applicantionName的方法不可行. PS:从 DConfig 获取默认 appId 的逻辑上看, DSGApplication应用会有问题 3.开发者可以选择是否需要设置以及监听日志级别变动 Log: Task: https://pms.uniontech.com/task-view-303379.html
场景如下(完整版本号 -> 构建版本号): 5.6.8 -> 0 5.6.8.7 -> 7 5.6.8+u001 -> 1 5.6.8.7+u001 -> 7 5.6.8.0+u001 -> 0 Log: Influence: 构建版本号(BUILD_VERSION )
DeepinType类型增加军用版 Log: DeepinType类型增加军用版 Task: https://pms.uniontech.com/task-view-316703.html Influence: DeepinType类型 Change-Id: I9db5a3d14eebab69b5cac44fbfb0d2a09d8d84c3
适配qt的日志格式
%{time yyyy-MM-ddTHH:mm:ss.zzz} ==> %{time}{yyyy-MM-ddTHH:mm:ss.zzz}
Log: 修复日志格式时间戳显示异常问题
Bug: https://pms.uniontech.com/bug-view-236239.html
Influence: 使用DLogManager的应用日志输出格式
org.deepin.dtk.logginerules ==> org.deepin.dtk.preference 如果 DConfig 无效就不清空环境变量
- 移除相关接口, 默认启用(可以用 DTK_DISABLED_LOGGING_RULES 禁用) - 优先使用 dsgAppId , 用户可以通过 DTK_LOGGING_FALLBACK_APPID 指定 fallbackAppId - 有配置过 rules 时, 优先使用(即非默认值优先) - fallbackConfig 发生变化时会检查 dsgConfig 是否修改过,是则忽略
deepin-ci-robot
added a commit
to linuxdeepin/dtk6core
that referenced
this pull request
May 17, 2024
Synchronize source files from linuxdeepin/dtkcore. Source-pull-request: linuxdeepin/dtkcore#413
Contributor
deepin pr auto review关键摘要:
是否建议立即修改: 这些问题可能会影响代码的可读性、可维护性和功能的正确性。建议在合并代码前进行充分的检查和修改。 |
kegechen
pushed a commit
to linuxdeepin/dtk6core
that referenced
this pull request
May 24, 2024
Synchronize source files from linuxdeepin/dtkcore. Source-pull-request: linuxdeepin/dtkcore#413
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
linuxdeepin/dtkcommon#70