Files
XCEngine/docs/api/debug/logger/debug.md

33 lines
681 B
Markdown
Raw Normal View History

# Logger::Debug
```cpp
2026-03-20 02:35:07 +08:00
void Debug(LogCategory category, const Containers::String& message);
```
2026-03-20 02:35:07 +08:00
记录 Debug 级别日志。用于记录调试目的的信息,比 Verbose 级别稍简略。
**参数:**
- `category` - 日志分类
- `message` - 日志消息内容
**返回:** 无
2026-03-20 02:35:07 +08:00
**线程安全:** ✅
**示例:**
```cpp
2026-03-20 02:35:07 +08:00
#include "XCEngine/Debug/Logger.h"
2026-03-20 02:35:07 +08:00
using namespace XCEngine::Debug;
Logger& logger = Logger::Get();
logger.Debug(LogCategory::Rendering, "Frame rendered in 16ms");
logger.Debug(LogCategory::Physics, "Collision detected");
```
## 相关文档
2026-03-20 02:35:07 +08:00
- [Logger](logger.md) - 返回类总览
- [LogLevel](../loglevel/loglevel.md) - 日志级别说明