# Logger::Warning 以 `Warning` 级别记录一条日志。 ```cpp void Warning(LogCategory category, const Containers::String& message); ``` ## 行为说明 这是 `Logger::Log` 的便捷封装,等价于: ```cpp Log(LogLevel::Warning, category, message); ``` 它适合记录“当前还能继续运行,但状态值得关注”的情况。 ## 参数 - `category` - 日志分类。 - `message` - 警告文本。 ## 返回值 - 无。 ## 线程语义 - 与 [Log](Log.md) 相同。 ## 示例 ```cpp XCEngine::Debug::Logger::Get().Warning( XCEngine::Debug::LogCategory::General, "Created OpenGL context without debug bit" ); ``` ## 相关文档 - [返回类型总览](Logger.md) - [Log](Log.md) - [Error](Error.md)