Files
XCSDD/docs/api/debug/consolelogsink/log.md
ssdfasd 58a83f445a 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
2026-03-19 12:44:08 +08:00

764 B
Raw Blame History

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");

相关文档