feat: add appender unregistration methods#30
Merged
mhduiy merged 1 commit intolinuxdeepin:masterfrom Feb 27, 2026
Merged
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: mhduiy 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 |
d184077 to
6b65c0a
Compare
Added unregisterAppender and unregisterCategoryAppender methods to Logger class to allow proper cleanup of appender registrations. These methods remove appenders from the logger's internal lists and transfer ownership back to the caller, who becomes responsible for managing the appender's lifetime and preventing memory leaks. This is necessary for dynamic appender management scenarios where appenders need to be removed during runtime, such as when reconfiguring logging systems or shutting down components that use dedicated appenders. feat: 添加日志输出器注销方法 为 Logger 类新增 unregisterAppender 和 unregisterCategoryAppender 方法, 以支持正确清理已注册的日志输出器。这些方法将输出器从日志记录器的内部列表 中移除,并将所有权交还给调用方,由调用方负责管理输出器的生命周期并防止内 存泄漏。这对于需要动态管理输出器的场景是必要的,例如在运行时重新配置日志 系统或关闭使用专用输出器的组件时。
BLumia
approved these changes
Feb 27, 2026
deepin pr auto review这段代码主要包含两部分修改:一是更新了许可证声明,从传统的版权声明格式改为更现代的 SPDX 标识符;二是为 1. 许可证声明更新 (SPDX 标识符)审查意见:
改进建议:
2. 新增功能:注销 Appender (
|
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.
Added unregisterAppender and unregisterCategoryAppender methods to Logger class to allow proper cleanup of appender registrations. These methods remove appenders from the logger's internal lists and transfer ownership back to the caller, who becomes responsible for managing the appender's lifetime and preventing memory leaks. This is necessary for dynamic appender management scenarios where appenders need to be removed during runtime, such as when reconfiguring logging systems or shutting down components that use dedicated appenders.
feat: 添加日志输出器注销方法
为 Logger 类新增 unregisterAppender 和 unregisterCategoryAppender 方法, 以支持正确清理已注册的日志输出器。这些方法将输出器从日志记录器的内部列表
中移除,并将所有权交还给调用方,由调用方负责管理输出器的生命周期并防止内
存泄漏。这对于需要动态管理输出器的场景是必要的,例如在运行时重新配置日志
系统或关闭使用专用输出器的组件时。