Files
XCEngine/docs/api/debug/logger/shutdown.md

29 lines
631 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Logger::Shutdown
```cpp
void Shutdown();
```
关闭日志系统并清理资源。调用此方法后会停止所有日志记录操作并释放相关资源。在程序退出前应调用此方法。
**线程安全:** ❌(应在单线程退出阶段调用)
**复杂度:** O(n)n 为注册的 Sink 数量
**示例:**
```cpp
#include "XCEngine/Debug/Logger.h"
using namespace XCEngine::Debug;
Logger& logger = Logger::Get();
logger.Info(LogCategory::General, "Shutting down...");
logger.Shutdown();
```
## 相关文档
- [Logger](logger.md) - 返回类总览
- [Initialize](initialize.md) - 初始化日志系统