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

@@ -4,13 +4,30 @@
void Log(const LogEntry& entry) override
```
将日志输出到控制台。根据 `LogEntry` 的级别和分类格式化输出内容,并根据 `m_colorOutput` 设置决定是否使用 Windows 控制台颜色 API。如果日志级别低于设置的最小级别则不输出
将日志输出到控制台。输出格式为 `[LEVEL] [CATEGORY] message\n`
根据 `m_colorOutput` 设置决定是否使用 Windows 控制台颜色 API`_WIN32` 平台)。各日志级别颜色映射:
| 级别 | 颜色 |
|------|------|
| Verbose | 灰色(低亮度) |
| Debug | 青色(蓝+绿) |
| Info | 绿色 |
| Warning | 黄色(红+绿) |
| Error | 红色(高亮度) |
| Fatal | 洋红色(红+蓝+高亮度) |
如果日志级别低于设置的最小级别,则不输出。
**参数:**
- `entry` - 日志条目
- `entry` - 日志条目(参见 [LogEntry](../logentry/logentry.md)
**线程安全:**
**复杂度:** O(1)
**返回值:**
**示例:**
```cpp