docs: update core and debug API docs
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
# Logger::Debug
|
||||
|
||||
```cpp
|
||||
void Debug(LogCategory category, const Containers::String& message)
|
||||
void Debug(LogCategory category, const Containers::String& message);
|
||||
```
|
||||
|
||||
记录一条 Debug(1 级)日志。Debug 级别用于一般调试信息,比 Verbose 简洁但比 Info 详细。
|
||||
记录 Debug 级别日志。用于记录调试目的的信息,比 Verbose 级别稍简略。
|
||||
|
||||
**参数:**
|
||||
- `category` - 日志分类
|
||||
@@ -12,19 +12,21 @@ void Debug(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().Debug(
|
||||
XCEngine::Debug::LogCategory::Rendering,
|
||||
"Draw call batch size: 512"
|
||||
);
|
||||
using namespace XCEngine::Debug;
|
||||
|
||||
Logger& logger = Logger::Get();
|
||||
logger.Debug(LogCategory::Rendering, "Frame rendered in 16ms");
|
||||
logger.Debug(LogCategory::Physics, "Collision detected");
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [Logger 总览](logger.md) - 返回类总览
|
||||
- [Logger](logger.md) - 返回类总览
|
||||
- [LogLevel](../loglevel/loglevel.md) - 日志级别说明
|
||||
|
||||
Reference in New Issue
Block a user