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:
37
docs/api/debug/filelogsink/filelogsink.md
Normal file
37
docs/api/debug/filelogsink/filelogsink.md
Normal file
@@ -0,0 +1,37 @@
|
||||
# FileLogSink
|
||||
|
||||
**命名空间**: `XCEngine::Debug`
|
||||
|
||||
**类型**: `class`
|
||||
|
||||
**头文件**: `XCEngine/Debug/FileLogSink.h`
|
||||
|
||||
**描述**: 文件日志输出目标,将日志写入到指定文件。
|
||||
|
||||
## 概述
|
||||
|
||||
`FileLogSink` 是日志系统的文件输出实现。它将日志条目写入到指定的文件,支持追加写入模式。
|
||||
|
||||
## 公共方法
|
||||
|
||||
| 方法 | 描述 |
|
||||
|------|------|
|
||||
| `FileLogSink(const Containers::String& filePath)` | [构造函数](construct.md) |
|
||||
| `~FileLogSink()` | [析构函数](~filelogsink.md) |
|
||||
| `void Log(const LogEntry& entry)` | [输出日志到文件](log.md) |
|
||||
| `void Flush()` | [刷新缓冲区](flush.md) |
|
||||
|
||||
## 使用示例
|
||||
|
||||
```cpp
|
||||
#include <XCEngine/Debug/FileLogSink.h>
|
||||
|
||||
auto fileSink = std::make_unique<XCEngine::Debug::FileLogSink>("logs/app.log");
|
||||
XCEngine::Debug::Logger::Get().AddSink(std::move(fileSink));
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [Debug 模块总览](../debug.md) - 返回模块总览
|
||||
- [Logger](../logger/logger.md) - 日志记录器
|
||||
- [ILogSink](../ilogsink/ilogsink.md) - 日志输出接口
|
||||
Reference in New Issue
Block a user