Files
XCEngine/docs/api/XCEngine/Debug/Logger/Debug.md

47 lines
803 B
Markdown
Raw Normal View History

2026-03-26 16:45:24 +08:00
# Logger::Debug
2026-03-26 17:21:44 +08:00
`Debug` 级别记录一条日志。
2026-03-26 16:45:24 +08:00
```cpp
void Debug(LogCategory category, const Containers::String& message);
```
2026-03-26 17:21:44 +08:00
## 行为说明
2026-03-26 16:45:24 +08:00
2026-03-26 17:21:44 +08:00
这是 `Logger::Log` 的便捷封装,等价于:
2026-03-26 16:45:24 +08:00
2026-03-26 17:21:44 +08:00
```cpp
Log(LogLevel::Debug, category, message);
```
2026-03-26 16:45:24 +08:00
2026-03-26 17:21:44 +08:00
它不会自动填充 `file``line``function`。如果你需要源码位置,请改用 `XE_LOG` 宏或直接调用 `Log` 的完整签名。
2026-03-26 16:45:24 +08:00
2026-03-26 17:21:44 +08:00
## 参数
- `category` - 日志分类。
- `message` - 日志文本。
## 返回值
2026-03-26 16:45:24 +08:00
2026-03-26 17:21:44 +08:00
- 无。
## 线程语义
- 与 [Log](Log.md) 相同。
## 示例
```cpp
XCEngine::Debug::Logger::Get().Debug(
XCEngine::Debug::LogCategory::Rendering,
"Pipeline state updated"
);
2026-03-26 16:45:24 +08:00
```
## 相关文档
2026-03-26 17:21:44 +08:00
- [返回类型总览](Logger.md)
- [Log](Log.md)
- [Verbose](Verbose.md)
- [Info](Info.md)