fix: improve doc link navigation and tree display
- Fix link resolution with proper relative/absolute path handling - Improve link styling with underline decoration - Hide leaf nodes from tree, only show directories - Fix log file path for packaged app
This commit is contained in:
36
docs/api/debug/logger/setcategoryenabled.md
Normal file
36
docs/api/debug/logger/setcategoryenabled.md
Normal file
@@ -0,0 +1,36 @@
|
||||
# Logger::SetCategoryEnabled
|
||||
|
||||
```cpp
|
||||
void SetCategoryEnabled(LogCategory category, bool enabled)
|
||||
```
|
||||
|
||||
启用或禁用指定分类的日志输出。当分类被禁用时,该分类的所有日志都不会分发给 Sink,但级别过滤仍然适用。
|
||||
|
||||
**参数:**
|
||||
- `category` - 要设置的日志分类
|
||||
- `enabled` - true 表示启用,false 表示禁用
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
#include <XCEngine/Debug/Logger.h>
|
||||
|
||||
// 禁用网络模块日志(减少日志噪音)
|
||||
XCEngine::Debug::Logger::Get().SetCategoryEnabled(
|
||||
XCEngine::Debug::LogCategory::Network,
|
||||
false
|
||||
);
|
||||
|
||||
// 稍后重新启用
|
||||
XCEngine::Debug::Logger::Get().SetCategoryEnabled(
|
||||
XCEngine::Debug::LogCategory::Network,
|
||||
true
|
||||
);
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [Logger 总览](logger.md) - 返回类总览
|
||||
- [LogCategory](../logcategory/logcategory.md) - 日志分类枚举
|
||||
Reference in New Issue
Block a user