-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Refactoring using the Adapter design pattern
* 采用适配器设计模式重构 logger handle、sink handle * 修复 Logger.Get() 可能泄露 handle 的问题 * 修复 Logger.AddSink(), Logger.DropSink(), Logger.SetErrorHandler() 的线程安全问题 * Logger.DropSink() 返回值由 bool -> void * 重构 Logger 的错误处理器 Logger.SetErrorHandler(Log4spErrorCallback callback); -> Logger.SetErrorHandler(LoggerErrorHandler handler); Log4spErrorCallback -> LoggerErrorHandler function void (const char[] msg); -> function void (Logger logger, const char[] msg); * 恢复了 Logger.***AmxTpl() API 与之前相同,依然使用 SM 提供的 format 会中断 sourcepawn 代码 长度超过 2048 会被截断 格式化存在 BUG(alliedmodders/sourcemod#2221) 但是性能应该稍快一点 (5~8%) * 增强宏 LOG4SP_NO_EXT * 更新注释文档 * 重命名 sink 构造函数参数 async -> multiThread * 重构 Sink 过滤器 ClientChatSinkFilter -> SinkClientFilter * 移除 Sink 多余的记录日志 API(只保留一个记录原始日志的API)
- Loading branch information
Showing
52 changed files
with
2,149 additions
and
2,254 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.