Files
XCSDD/docs/api/debug/logger/error.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

693 B
Raw Blame History

Logger::Error

void Error(LogCategory category, const Containers::String& message)

记录一条 Error4 级日志。Error 级别用于表示程序执行中发生的错误,如文件读取失败、网络连接中断等。程序通常可以继续运行但功能可能受限。

参数:

  • category - 日志分类
  • message - 日志消息内容

返回:

复杂度: O(n)n 为注册的 Sink 数量

示例:

#include <XCEngine/Debug/Logger.h>

XCEngine::Debug::Logger::Get().Error(
    XCEngine::Debug::LogCategory::Network,
    "Failed to connect to game server"
);

相关文档