fix: improve doc link navigation and tree display
- Fix link resolution with proper relative/absolute path handling - Improve link styling with underline decoration - Hide leaf nodes from tree, only show directories - Fix log file path for packaged app
This commit is contained in:
25
docs/api/debug/consolelogsink/log.md
Normal file
25
docs/api/debug/consolelogsink/log.md
Normal file
@@ -0,0 +1,25 @@
|
||||
# ConsoleLogSink::Log
|
||||
|
||||
```cpp
|
||||
void Log(const LogEntry& entry) override
|
||||
```
|
||||
|
||||
将日志输出到控制台。根据 `LogEntry` 的级别和分类格式化输出内容,并根据 `m_colorOutput` 设置决定是否使用 Windows 控制台颜色 API。如果日志级别低于设置的最小级别,则不输出。
|
||||
|
||||
**参数:**
|
||||
- `entry` - 日志条目
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
auto sink = std::make_unique<XCEngine::Debug::ConsoleLogSink>();
|
||||
// Log 方法由 Logger 在内部调用,用户无需直接调用
|
||||
XCEngine::Debug::Logger::Get().AddSink(std::move(sink));
|
||||
XCEngine::Debug::Logger::Get().Info(XCEngine::Debug::LogCategory::General, "Hello console");
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [ConsoleLogSink 总览](consolelogsink.md) - 返回类总览
|
||||
Reference in New Issue
Block a user