docs: update core and debug API docs

This commit is contained in:
2026-03-20 02:35:07 +08:00
parent 0c073db4e8
commit e165dbea1c
73 changed files with 743 additions and 391 deletions

View File

@@ -1,10 +1,10 @@
# Logger::Warning
```cpp
void Warning(LogCategory category, const Containers::String& message)
void Warning(LogCategory category, const Containers::String& message);
```
记录一条 Warning3日志。Warning 级别用于指示潜在问题但程序仍继续运行的情况,如资源即将耗尽、配置值超出建议范围等
记录 Warning 级日志。用于记录警告信息,表示可能存在问题但程序仍继续运行。
**参数:**
- `category` - 日志分类
@@ -12,19 +12,21 @@ void Warning(LogCategory category, const Containers::String& message)
**返回:**
**复杂度** O(n)n 为注册的 Sink 数量
**线程安全**
**示例:**
```cpp
#include <XCEngine/Debug/Logger.h>
#include "XCEngine/Debug/Logger.h"
XCEngine::Debug::Logger::Get().Warning(
XCEngine::Debug::LogCategory::Memory,
"Memory usage exceeds 80% of available heap"
);
using namespace XCEngine::Debug;
Logger& logger = Logger::Get();
logger.Warning(LogCategory::Memory, "High memory usage detected");
logger.Warning(LogCategory::Rendering, "Low GPU memory");
```
## 相关文档
- [Logger 总览](logger.md) - 返回类总览
- [Logger](logger.md) - 返回类总览
- [LogLevel](../loglevel/loglevel.md) - 日志级别说明