-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Loggingrules dconfig support (cherry-pick from gerrit) #413
Conversation
Synchronize source files from linuxdeepin/dtkcore. Source-pull-request: linuxdeepin/dtkcore#413
Doc Check bot |
Synchronize source files from linuxdeepin/dtkcore. Source-pull-request: linuxdeepin/dtkcore#413
Synchronize source files from linuxdeepin/dtkcore. Source-pull-request: linuxdeepin/dtkcore#413
Synchronize source files from linuxdeepin/dtkcore. Source-pull-request: linuxdeepin/dtkcore#413
Synchronize source files from linuxdeepin/dtkcore. Source-pull-request: linuxdeepin/dtkcore#413
Synchronize source files from linuxdeepin/dtkcore. Source-pull-request: linuxdeepin/dtkcore#413
Synchronize source files from linuxdeepin/dtkcore. Source-pull-request: linuxdeepin/dtkcore#413
Synchronize source files from linuxdeepin/dtkcore. Source-pull-request: linuxdeepin/dtkcore#413
Synchronize source files from linuxdeepin/dtkcore. Source-pull-request: linuxdeepin/dtkcore#413
[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 |
updateLoggingRules(); | ||
} | ||
|
||
void DLogManagerPrivate::updateLoggingRules() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
在应用不重启的情况下,不能重置之前设置的值了,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
似的,reset 之后,isDefaultValue 是 true,也就是说不能用reset的方式来清空rules,只能删除的方式清空
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 是否修改过,是则忽略
Synchronize source files from linuxdeepin/dtkcore. Source-pull-request: linuxdeepin/dtkcore#413
deepin pr auto review关键摘要:
是否建议立即修改: 这些问题可能会影响代码的可读性、可维护性和功能的正确性。建议在合并代码前进行充分的检查和修改。 |
Synchronize source files from linuxdeepin/dtkcore. Source-pull-request: linuxdeepin/dtkcore#413
linuxdeepin/dtkcommon#70