- 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
764 B
764 B
ConsoleLogSink::Log
void Log(const LogEntry& entry) override
将日志输出到控制台。根据 LogEntry 的级别和分类格式化输出内容,并根据 m_colorOutput 设置决定是否使用 Windows 控制台颜色 API。如果日志级别低于设置的最小级别,则不输出。
参数:
entry- 日志条目
复杂度: O(1)
示例:
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 总览 - 返回类总览