docs: update core and debug API docs
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
# Logger::Info
|
||||
|
||||
```cpp
|
||||
void Info(LogCategory category, const Containers::String& message)
|
||||
void Info(LogCategory category, const Containers::String& message);
|
||||
```
|
||||
|
||||
记录一条 Info(2 级)日志。Info 级别用于一般性信息,如启动提示、配置加载等用户可见的正常运行消息。
|
||||
记录 Info 级别日志。用于记录一般信息性消息,表示程序正常运行状态。
|
||||
|
||||
**参数:**
|
||||
- `category` - 日志分类
|
||||
@@ -12,19 +12,21 @@ void Info(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().Info(
|
||||
XCEngine::Debug::LogCategory::General,
|
||||
"Application initialized successfully"
|
||||
);
|
||||
using namespace XCEngine::Debug;
|
||||
|
||||
Logger& logger = Logger::Get();
|
||||
logger.Info(LogCategory::General, "Application started");
|
||||
logger.Info(LogCategory::Network, "Connected to server");
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [Logger 总览](logger.md) - 返回类总览
|
||||
- [Logger](logger.md) - 返回类总览
|
||||
- [LogLevel](../loglevel/loglevel.md) - 日志级别说明
|
||||
|
||||
Reference in New Issue
Block a user