feat: categorize shortcut plugin logs - #117
Conversation
There was a problem hiding this comment.
Sorry @yixinshark, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
Reviewer's GuideAdds a dedicated Qt logging category Sequence diagram for categorized shortcut logging and filteringsequenceDiagram
actor Developer
participant ShortcutPlugin
participant QtLoggingSystem
Developer->>QtLoggingSystem: setEnvironment(QT_LOGGING_RULES="dde.services.shortcut=false")
ShortcutPlugin->>ShortcutPlugin: qCInfo(logShortcut, message)
ShortcutPlugin->>QtLoggingSystem: emitLog(logShortcut, Info)
QtLoggingSystem-->>ShortcutPlugin: [category dde.services.shortcut disabled] suppress output
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
f20ff8f to
acdb5f5
Compare
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: robertkill, yixinshark 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 |
Add a dedicated Qt logging category for the shortcut plugin. - Route 237 plugin and debug-runner log calls through qC* macros. - Use dde.services.shortcut so grouped service logs can be filtered by plugin. - Share the category source definition between the plugin and debug targets. 为快捷键插件增加独立的 Qt 日志分类。 - 将插件及调试程序中的 237 处日志调用迁移到 qC* 宏。 - 使用 dde.services.shortcut,使分组服务日志可以按插件过滤。 - 在插件与调试目标之间共享日志分类的源码定义。 Log: categorize shortcut plugin logs Change-Id: Id199e18fad29b54e6d63b399570ddfd8d027c3ca
acdb5f5 to
590d289
Compare
|
/forcemerge |
|
This pr force merged! (status: blocked) |
deepin pr auto review★ 总体评分:95分■ 【总体评价】
■ 【详细分析】
■ 【改进建议代码示例】 // 当前代码已经非常完善,无需修复。以下为未来可能的日志子分类扩展示例:
// shortcutlogging.h
#pragma once
#include <QLoggingCategory>
Q_DECLARE_LOGGING_CATEGORY(logShortcut)
Q_DECLARE_LOGGING_CATEGORY(logShortcutInput)
Q_DECLARE_LOGGING_CATEGORY(logShortcutGesture)
Q_DECLARE_LOGGING_CATEGORY(logShortcutConfig)
// shortcutlogging.cpp
#include "shortcutlogging.h"
Q_LOGGING_CATEGORY(logShortcut, "dde.services.shortcut")
Q_LOGGING_CATEGORY(logShortcutInput, "dde.services.shortcut.input")
Q_LOGGING_CATEGORY(logShortcutGesture, "dde.services.shortcut.gesture")
Q_LOGGING_CATEGORY(logShortcutConfig, "dde.services.shortcut.config") |
Summary
dde.services.shortcutQt logging category for the shortcut pluginqC*macrosTest plan
cmake --build build --target plugin-dde-shortcut dde-shortcut-debug -j2ctest --test-dir build -R "^shortcut-" --output-on-failure[dde.services.shortcut]QT_LOGGING_RULES="dde.services.shortcut=false"suppresses the categorySummary by Sourcery
Enhancements: