From d5dffabfb1bd68681fae6ad97be4b46ede50ad1c Mon Sep 17 00:00:00 2001
From: unknown <胡重阳>
Date: 星期四, 03 七月 2025 16:19:36 +0800
Subject: [PATCH] Merge branch 'master' of ssh://115.28.86.8:29418/~admin/智能网联_25-0305_617_v1

---
 Client/于文龙/code/project_client_permission_management.rar |    0 
 Server/刘斌/log/日志_刘斌_20250629.doc                         |    0 
 Client/杨高权/document/项目总结_杨高权.doc                         |    0 
 Server/刘斌/code/video-management-system-vs-project.zip    |    0 
 Client/Qt_ZNWL_0702_Client.7z                            |    0 
 Client/王国壮/log/日志_王国壮_0701.doc                           |    0 
 Client/魏强/log/日志_魏强_0702.doc                             |    0 
 Client/王国壮/document/项目总结.md                              |   33 ++++
 Server/王鹏哲/log/日志_王鹏哲_20250701.doc                       |    0 
 Server/王鹏哲/log/日志_王鹏哲_20250630.doc                       |    0 
 Server/王鹏哲/code/logger.h                                 |  334 +++++++++++++++++++++++++++++++++++++++++++++++
 Client/于文龙/log/日志-于文龙-250702.doc                         |    0 
 Server/林余杰/log/日志_林余杰_20250701.doc                       |    0 
 Server/刘斌/log/~$_刘斌_20250701.doc                         |    0 
 Server/刘斌/log/日志_刘斌_20250701.doc                         |    0 
 Server/王鹏哲/document/项目总结.docx                            |    0 
 Client/徐蔓云/log/日志_徐蔓云_0701.doc                           |    0 
 Server/王鹏哲/log/日志_王鹏哲_20250629.doc                       |    0 
 Server/刘斌/log/~WRL0001.tmp                               |    0 
 19 files changed, 367 insertions(+), 0 deletions(-)

diff --git a/Client/Qt_ZNWL_0702_Client.7z b/Client/Qt_ZNWL_0702_Client.7z
new file mode 100644
index 0000000..5102ad0
--- /dev/null
+++ b/Client/Qt_ZNWL_0702_Client.7z
Binary files differ
diff --git "a/Client/\344\272\216\346\226\207\351\276\231/code/project_client_permission_management.rar" "b/Client/\344\272\216\346\226\207\351\276\231/code/project_client_permission_management.rar"
new file mode 100644
index 0000000..a011c02
--- /dev/null
+++ "b/Client/\344\272\216\346\226\207\351\276\231/code/project_client_permission_management.rar"
Binary files differ
diff --git "a/Client/\346\235\250\351\253\230\346\235\203/document/\346\227\245\345\277\227_\346\235\250\351\253\230\346\235\203_250625 .doc" "b/Client/\344\272\216\346\226\207\351\276\231/log/\346\227\245\345\277\227-\344\272\216\346\226\207\351\276\231-250702.doc"
similarity index 68%
rename from "Client/\346\235\250\351\253\230\346\235\203/document/\346\227\245\345\277\227_\346\235\250\351\253\230\346\235\203_250625 .doc"
rename to "Client/\344\272\216\346\226\207\351\276\231/log/\346\227\245\345\277\227-\344\272\216\346\226\207\351\276\231-250702.doc"
index c5c09ee..6cc925c 100644
--- "a/Client/\346\235\250\351\253\230\346\235\203/document/\346\227\245\345\277\227_\346\235\250\351\253\230\346\235\203_250625 .doc"
+++ "b/Client/\344\272\216\346\226\207\351\276\231/log/\346\227\245\345\277\227-\344\272\216\346\226\207\351\276\231-250702.doc"
Binary files differ
diff --git "a/Client/\345\276\220\350\224\223\344\272\221/log/\346\227\245\345\277\227_\345\276\220\350\224\223\344\272\221_0701.doc" "b/Client/\345\276\220\350\224\223\344\272\221/log/\346\227\245\345\277\227_\345\276\220\350\224\223\344\272\221_0701.doc"
new file mode 100644
index 0000000..4231518
--- /dev/null
+++ "b/Client/\345\276\220\350\224\223\344\272\221/log/\346\227\245\345\277\227_\345\276\220\350\224\223\344\272\221_0701.doc"
Binary files differ
diff --git "a/Client/\346\235\250\351\253\230\346\235\203/document/\351\241\271\347\233\256\346\200\273\347\273\223_\346\235\250\351\253\230\346\235\203.doc" "b/Client/\346\235\250\351\253\230\346\235\203/document/\351\241\271\347\233\256\346\200\273\347\273\223_\346\235\250\351\253\230\346\235\203.doc"
new file mode 100644
index 0000000..7894242
--- /dev/null
+++ "b/Client/\346\235\250\351\253\230\346\235\203/document/\351\241\271\347\233\256\346\200\273\347\273\223_\346\235\250\351\253\230\346\235\203.doc"
Binary files differ
diff --git "a/Client/\347\216\213\345\233\275\345\243\256/document/\351\241\271\347\233\256\346\200\273\347\273\223.md" "b/Client/\347\216\213\345\233\275\345\243\256/document/\351\241\271\347\233\256\346\200\273\347\273\223.md"
new file mode 100644
index 0000000..55c581e
--- /dev/null
+++ "b/Client/\347\216\213\345\233\275\345\243\256/document/\351\241\271\347\233\256\346\200\273\347\273\223.md"
@@ -0,0 +1,33 @@
+### 1. **瀹炴椂鐜淇℃伅灞曠ず妯″潡**
+
+#### **瀹炵幇鏂瑰紡锛�**
+
+- **纭欢涓庢暟鎹敹闆嗭細** 閫氳繃鐜板満浼犳劅鍣紙濡傛俯搴︺�佹箍搴︺�佺矇灏樻祿搴︾瓑锛夊疄鏃堕噰闆嗙幆澧冩暟鎹�傝繖浜涙暟鎹紶杈撳埌鏈嶅姟鍣ㄧ锛岄�氳繃鎺ュ彛杩涜杞彂銆�
+- **澶у睆灞曠ず锛�** 鏁版嵁閫氳繃鍓嶇鐣岄潰灞曠ず鍦ㄥぇ灞忎笂锛屽尯鍩熷垝鍒嗘樉绀轰笉鍚屼俊鎭紝鍖呮嫭鐜淇℃伅銆佹柦宸ヨ繘搴︺�佸皬鍦板浘銆佽�冨嫟鎯呭喌鍜岀洃鎺ф憚鍍忓ご鐨勫姩鎬佽疆鎾��
+- **鏁版嵁浼犺緭锛�** 鏁版嵁涓婁紶鍚庨�氳繃鏈嶅姟绔浆鍙戠粰鎵�鏈夊湪绾垮鎴风锛屽疄鐜板疄鏃跺悓姝ャ��
+
+#### **瑙e喅闂锛�**
+
+- **鏁版嵁鍑嗙‘鎬э細** 鐢变簬浼犳劅鍣ㄦ湰韬殑璇樊锛屽疄鏃舵暟鎹彲鑳戒細鍑虹幇娉㈠姩锛屽鑷村睍绀轰笉绋冲畾銆傞�氳繃绠楁硶浼樺寲銆�
+
+- **寮傛鏇存柊锛�** 灏嗘暟鎹洿鏂扮殑鎿嶄綔涓庣晫闈㈡覆鏌撹В鑰︼紝閬垮厤闃诲涓荤嚎绋嬶紝纭繚澶у睆灞曠ず娴佺晠銆�
+- **MSVC2015涓嶹indows SDK鐗堟湰鍏煎闂**锛氬皬鍦板浘闇�瑕佷娇鐢╳ebenginewidgets妯″潡锛屾墍浠ュ垏鎹㈠埌MSVC2015缂栬瘧鍣紝鍙堜骇鐢熷吋瀹归棶棰橈紝 閫氳繃**浠呭崌绾t Creator**瑙e喅锛屾柊鐗圦t Creator鍙寚瀹歋DK鐗堟湰銆�
+
+------
+
+### 2. **璀︽姤绠$悊妯″潡**
+
+#### **瀹炵幇鏂瑰紡锛�**
+
+- **璀︽姤鍒ゆ柇锛�** 閽堝鐜鏁版嵁涓殑娓╁害銆佹箍搴︺�佺矇灏樻祿搴︾瓑璁剧疆闃堝�硷紝瓒呭嚭鑼冨洿鏃惰Е鍙戣鎶ャ��
+- **闃堝�肩鐞嗭細** 绯荤粺鍏佽绠$悊鍛樺姩鎬佽皟鏁撮槇鍊硷紝纭繚绯荤粺鍦ㄤ笉鍚屾儏鍐典笅浠嶈兘鏈夋晥鎶ヨ銆�
+- **璀︽姤鍝嶅簲锛�** 褰撹鎶ヨЕ鍙戞椂锛岀‖浠剁浼氬彂鍑哄0鍏夎鎶ワ紝杞欢绔細閫氳繃鏈嶅姟绔帹閫佽鎶ヤ俊鎭埌鎵�鏈夊湪绾垮鎴风銆傝嫢闂鏈В鍐筹紝鑷姩娲惧崟鍒板�肩彮瀹ゅ鐞嗐��
+- **璀︽姤鏁版嵁搴擄細** 璁剧疆鈥滈槇鍊间俊鎭〃鈥濆拰鈥滆鎶ヤ俊鎭〃鈥濓紝鍒嗗埆瀛樺偍姣忎釜璀︽姤椤圭殑闃堝�间互鍙婂彂鐢熺殑鍏蜂綋璀︽姤璁板綍銆�
+
+#### **瑙e喅闂锛�**
+
+- **瀹炴椂鎬т笌绋冲畾鎬э細** 璀︽姤闇�瑕佸湪鍙戠敓寮傚父鐨勭灛闂磋Е鍙戯紝濡傛灉绯荤粺鍝嶅簲寤惰繜鎴栧彂鐢熼敊璇紝鍙兘閿欒繃鏈�浣冲鐞嗘椂鏈恒��
+- **鐣岄潰璁捐锛�** 纭繚璀︽姤淇℃伅鑳藉瀹炴椂銆佹竻鏅板湴灞曠ず缁欑鐞嗗憳锛岄伩鍏嶄俊鎭繃杞藉拰鏄剧ず涓嶄竴鑷淬��
+
+- **骞跺彂澶勭悊锛�** 閫氳繃骞跺彂鍜屽紓姝ユ妧鏈紝淇濊瘉璀︽姤澶勭悊鍜屾暟鎹洿鏂拌兘澶熷悓鏃惰繘琛岋紝鎻愰珮鍝嶅簲閫熷害銆�
+- **鍔ㄦ�佺晫闈紭鍖栵細** 璀︽姤淇℃伅搴斿湪涓荤晫闈㈢獊鍑烘樉绀猴紝骞剁‘淇濈晫闈㈣兘澶熷揩閫熸洿鏂帮紝閬垮厤鍥犱俊鎭繃杞藉鑷寸鐞嗕汉鍛橀仐婕忛噸瑕佷俊鎭��
\ No newline at end of file
diff --git "a/Client/\347\216\213\345\233\275\345\243\256/log/\346\227\245\345\277\227_\347\216\213\345\233\275\345\243\256_0701.doc" "b/Client/\347\216\213\345\233\275\345\243\256/log/\346\227\245\345\277\227_\347\216\213\345\233\275\345\243\256_0701.doc"
new file mode 100644
index 0000000..ee1838d
--- /dev/null
+++ "b/Client/\347\216\213\345\233\275\345\243\256/log/\346\227\245\345\277\227_\347\216\213\345\233\275\345\243\256_0701.doc"
Binary files differ
diff --git "a/Client/\351\255\217\345\274\272/log/\346\227\245\345\277\227_\351\255\217\345\274\272_0702.doc" "b/Client/\351\255\217\345\274\272/log/\346\227\245\345\277\227_\351\255\217\345\274\272_0702.doc"
new file mode 100644
index 0000000..e4c62b7
--- /dev/null
+++ "b/Client/\351\255\217\345\274\272/log/\346\227\245\345\277\227_\351\255\217\345\274\272_0702.doc"
Binary files differ
diff --git "a/Server/\345\210\230\346\226\214/code/video-management-system-vs-project.zip" "b/Server/\345\210\230\346\226\214/code/video-management-system-vs-project.zip"
new file mode 100644
index 0000000..2aef533
--- /dev/null
+++ "b/Server/\345\210\230\346\226\214/code/video-management-system-vs-project.zip"
Binary files differ
diff --git "a/Server/\345\210\230\346\226\214/log/~$_\345\210\230\346\226\214_20250701.doc" "b/Server/\345\210\230\346\226\214/log/~$_\345\210\230\346\226\214_20250701.doc"
new file mode 100644
index 0000000..b8a4629
--- /dev/null
+++ "b/Server/\345\210\230\346\226\214/log/~$_\345\210\230\346\226\214_20250701.doc"
Binary files differ
diff --git "a/Server/\345\210\230\346\226\214/log/~WRL0001.tmp" "b/Server/\345\210\230\346\226\214/log/~WRL0001.tmp"
new file mode 100644
index 0000000..7f52a79
--- /dev/null
+++ "b/Server/\345\210\230\346\226\214/log/~WRL0001.tmp"
Binary files differ
diff --git "a/Server/\345\210\230\346\226\214/log/\346\227\245\345\277\227_\345\210\230\346\226\214_20250629.doc" "b/Server/\345\210\230\346\226\214/log/\346\227\245\345\277\227_\345\210\230\346\226\214_20250629.doc"
new file mode 100644
index 0000000..219fbd0
--- /dev/null
+++ "b/Server/\345\210\230\346\226\214/log/\346\227\245\345\277\227_\345\210\230\346\226\214_20250629.doc"
Binary files differ
diff --git "a/Server/\345\210\230\346\226\214/log/\346\227\245\345\277\227_\345\210\230\346\226\214_20250701.doc" "b/Server/\345\210\230\346\226\214/log/\346\227\245\345\277\227_\345\210\230\346\226\214_20250701.doc"
new file mode 100644
index 0000000..c859c7a
--- /dev/null
+++ "b/Server/\345\210\230\346\226\214/log/\346\227\245\345\277\227_\345\210\230\346\226\214_20250701.doc"
Binary files differ
diff --git "a/Server/\346\236\227\344\275\231\346\235\260/log/\346\227\245\345\277\227_\346\236\227\344\275\231\346\235\260_20250701.doc" "b/Server/\346\236\227\344\275\231\346\235\260/log/\346\227\245\345\277\227_\346\236\227\344\275\231\346\235\260_20250701.doc"
new file mode 100644
index 0000000..61a95c1
--- /dev/null
+++ "b/Server/\346\236\227\344\275\231\346\235\260/log/\346\227\245\345\277\227_\346\236\227\344\275\231\346\235\260_20250701.doc"
Binary files differ
diff --git "a/Server/\347\216\213\351\271\217\345\223\262/code/logger.h" "b/Server/\347\216\213\351\271\217\345\223\262/code/logger.h"
new file mode 100644
index 0000000..10cf437
--- /dev/null
+++ "b/Server/\347\216\213\351\271\217\345\223\262/code/logger.h"
@@ -0,0 +1,334 @@
+#pragma once
+#include "common.h"
+#include <cstring> // 用于strerror
+#include <cstdio>  // 用于std::rename, std::remove
+#include <utility> // 用于std::forward
+// 日志级别枚举
+enum class LogLevel {
+	TRACE,   // 最详细的跟踪信息
+	DEBUG,   // 调试信息
+	INFO,    // 常规信息
+	WARNING, // 警告信息
+	ERRORL,  // 错误信息
+	FATAL    // 严重错误
+};
+
+// 将日志级别转换为字符串
+inline const char* levelToString(LogLevel level) {
+	switch (level) {
+	case LogLevel::TRACE:   return "TRACE";
+	case LogLevel::DEBUG:   return "DEBUG";
+	case LogLevel::INFO:    return "INFO";
+	case LogLevel::WARNING: return "WARNING";
+	case LogLevel::ERRORL:  return "ERROR";
+	case LogLevel::FATAL:   return "FATAL";
+	default:                return "UNKNOWN";
+	}
+}
+
+// 日志配置结构
+struct LogConfig {
+	LogLevel minLevel = LogLevel::INFO; // 最小日志级别
+	bool consoleOutput = true;          // 是否输出到控制台
+	bool fileOutput = false;            // 是否输出到文件
+	std::string logFilePath = "temp.log";// 日志文件路径
+	bool includeTimestamp = true;       // 是否包含时间戳
+	bool includeThreadId = false;       // 是否包含线程ID
+	size_t maxFileSize = 10 * 1024 * 1024; // 最大文件大小 (10MB)
+	int maxBackupFiles = 5;             // 最大备份文件数
+};
+
+class Logger {
+public:
+	// 获取日志实例 
+	static Logger& instance() {
+		static Logger instance;
+		return instance;
+	}
+
+	// 配置日志系统 
+	void configure(const LogConfig& config) {
+		std::lock_guard<std::mutex> lock(configMutex_);
+		config_ = config;
+
+		// 如果启用文件输出,确保文件已打开
+		if (config.fileOutput) {
+			openLogFile();
+		}
+	}
+
+	// 记录日志 (模板方法,支持任何可流式输出的类型)
+	template<typename... Args>
+	void log(LogLevel level, Args&&... args) {
+		if (shutdown_) return;
+
+		// 复制配置以最小化锁范围
+		LogConfig currentConfig;
+		{
+			std::lock_guard<std::mutex> lock(configMutex_);
+			if (level < config_.minLevel) return;
+			currentConfig = config_;
+		}
+
+		// 构造日志消息
+		std::ostringstream oss;
+		formatLogPrefix(oss, level, currentConfig);
+
+		using expander = int[];
+		(void)expander {
+			0, (void(oss << std::forward<Args>(args)), 0)...
+		};
+
+		// 添加换行符
+		oss << '\n';
+		std::string message = oss.str();
+
+		// 直接写入日志
+		/*writeLog(message);*/
+
+		// 将日志消息加入队列
+		{
+			std::lock_guard<std::mutex> lock(queueMutex_);
+			logQueue_.push(std::move(message));
+		}
+
+		// 通知日志线程有新消息
+		queueCond_.notify_one();
+	}
+	// 便捷日志方法
+	template<typename... Args> void trace(Args&&... args) {
+		log(LogLevel::TRACE, std::forward<Args>(args)...);
+	}
+
+	template<typename... Args> void debug(Args&&... args) {
+		log(LogLevel::DEBUG, std::forward<Args>(args)...);
+	}
+
+	template<typename... Args> void info(Args&&... args) {
+		log(LogLevel::INFO, std::forward<Args>(args)...);
+	}
+
+	template<typename... Args> void warning(Args&&... args) {
+		log(LogLevel::WARNING, std::forward<Args>(args)...);
+	}
+
+	template<typename... Args> void error(Args&&... args) {
+		log(LogLevel::ERRORL, std::forward<Args>(args)...);
+	}
+
+	template<typename... Args> void fatal(Args&&... args) {
+		log(LogLevel::FATAL, std::forward<Args>(args)...);
+		flush();
+		std::exit(EXIT_FAILURE);
+	}
+
+	// 刷新日志缓冲区
+	void flush() {
+		std::lock_guard<std::mutex> lock(fileMutex_);
+		if (logFile_.is_open()) {
+			logFile_.flush();
+		}
+	}
+
+	// 析构函数
+	~Logger() {
+		shutdown();
+		flush();
+	}
+	// 安全关闭日志系统
+	void shutdown() {
+		if (shutdown_) return;
+
+		shutdown_ = true;
+		queueCond_.notify_all();  // 唤醒线程以处理退出
+
+		if (workerThread_.joinable()) {
+			workerThread_.join(); // 等待线程结束
+		}
+
+		flush();  // 最终刷新
+	}
+	// 删除拷贝构造函数和赋值运算符
+	Logger(const Logger&) = delete;
+	Logger& operator=(const Logger&) = delete;
+
+private:
+	LogConfig config_;                      // 日志配置
+	std::ofstream logFile_;                 // 日志文件流
+	std::mutex configMutex_;                // 配置互斥锁
+	std::mutex fileMutex_;                  // 文件操作互斥锁
+	std::atomic<bool> shutdown_{ false };   // 关闭标志
+	// 新增线程安全队列相关成员
+	std::queue<std::string> logQueue_;      // 日志消息队列
+	std::mutex queueMutex_;                 // 队列互斥锁
+	std::condition_variable queueCond_;     // 队列条件变量
+	std::thread workerThread_;              // 日志写入线程
+
+	// 私有构造函数
+	Logger() {
+		// 启动日志写入线程
+		workerThread_ = std::thread(&Logger::processLogs, this);
+	};
+	// 日志处理线程函数
+	void processLogs() {
+		while (true) {
+			std::unique_lock<std::mutex> lock(queueMutex_);
+
+			// 等待新日志或关闭信号
+			queueCond_.wait(lock, [this] {
+				return !logQueue_.empty() || shutdown_;
+				});
+
+			// 处理关闭信号
+			if (shutdown_ && logQueue_.empty()) {
+				break;
+			}
+
+			// 取出所有待处理日志
+			std::queue<std::string> tempQueue;
+			std::swap(logQueue_, tempQueue);
+			lock.unlock();
+
+			// 处理所有取出的日志
+			while (!tempQueue.empty()) {
+				writeLog(tempQueue.front());
+				tempQueue.pop();
+			}
+		}
+	}
+
+	// 格式化日志前缀
+	void formatLogPrefix(std::ostringstream& oss, LogLevel level, const LogConfig& config) {
+		// 日志级别标签
+		oss << "[" << levelToString(level) << "] ";
+
+		// 时间戳
+		if (config.includeTimestamp) {
+			auto now = std::chrono::system_clock::now();
+			auto in_time_t = std::chrono::system_clock::to_time_t(now);
+			auto ms = std::chrono::duration_cast<std::chrono::milliseconds>(
+				now.time_since_epoch()) % 1000;
+
+			std::tm tm;
+#ifdef _WIN32
+			localtime_s(&tm, &in_time_t);
+#else
+			localtime_r(&in_time_t, &tm);
+#endif
+
+			oss << std::put_time(&tm, "%Y-%m-%d %H:%M:%S");
+			oss << '.' << std::setfill('0') << std::setw(3) << ms.count() << " ";
+		}
+
+		// 线程ID
+		if (config.includeThreadId) {
+			oss << "[Thread:" << std::this_thread::get_id() << "] ";
+		}
+	}
+
+	// 打开日志文件
+	void openLogFile() {
+		// 关闭当前文件(如果已打开)
+		if (logFile_.is_open()) {
+			logFile_.close();
+		}
+
+		// 检查文件大小,必要时轮转
+		std::ifstream in(config_.logFilePath, std::ios::binary | std::ios::ate);
+		if (in) {
+			auto size = in.tellg();
+			if (static_cast<size_t>(size) >= config_.maxFileSize) {
+				rotateLogFiles();
+			}
+		}
+		in.close();
+
+		// 打开新日志文件
+		logFile_.open(config_.logFilePath, std::ios::out | std::ios::app);
+		if (!logFile_.is_open()) {
+			std::cerr << "Failed to open log file: "
+				<< config_.logFilePath << " - "
+				<< errno << std::endl;
+		}
+	}
+
+	// 轮转日志文件
+	void rotateLogFiles() {
+		// 删除最旧的备份文件
+		if (config_.maxBackupFiles > 0) {
+			std::string oldestFile = config_.logFilePath + "." + std::to_string(config_.maxBackupFiles);
+			std::remove(oldestFile.c_str());
+
+			// 重命名现有备份文件
+			for (int i = config_.maxBackupFiles - 1; i >= 1; i--) {
+				std::string oldName = config_.logFilePath + "." + std::to_string(i);
+				std::string newName = config_.logFilePath + "." + std::to_string(i + 1);
+
+				if (fileExists(oldName)) {
+					std::rename(oldName.c_str(), newName.c_str());
+				}
+			}
+
+			// 重命名当前日志文件为备份1
+			if (fileExists(config_.logFilePath)) {
+				std::string newName = config_.logFilePath + ".1";
+				std::rename(config_.logFilePath.c_str(), newName.c_str());
+			}
+		}
+	}
+
+	// 检查文件是否存在
+	bool fileExists(const std::string& path) {
+		std::ifstream f(path);
+		return f.good();
+	}
+
+	// 实际写入日志
+	void writeLog(const std::string& message) {
+		LogConfig currentConfig;
+		{
+			std::lock_guard<std::mutex> configLock(configMutex_);
+			currentConfig = config_;
+		}
+
+		// 输出到控制台
+		if (currentConfig.consoleOutput) {
+			if (message.find("[ERROR]") != std::string::npos ||
+				message.find("[FATAL]") != std::string::npos) {
+				std::cerr << message;
+			}
+			else {
+				std::cout << message;
+			}
+		}
+
+		// 输出到文件
+		if (currentConfig.fileOutput) {
+			std::lock_guard<std::mutex> fileLock(fileMutex_);
+			if (!logFile_.is_open() || !logFile_.good()) {
+				openLogFile();
+			}
+
+			if (logFile_.good()) {
+				logFile_ << message;
+				logFile_.flush(); // 实时刷新到磁盘
+
+				// 检查文件大小
+				auto pos = logFile_.tellp();
+				if (static_cast<size_t>(pos) >= currentConfig.maxFileSize) {
+					logFile_.close();
+					rotateLogFiles();
+					logFile_.open(currentConfig.logFilePath, std::ios::out | std::ios::app);
+				}
+			}
+		}
+	}
+};
+
+// 日志宏定义 - 提供文件名和行号信息
+#define LOG_TRACE(...)   Logger::instance().trace("(", __FILE__, ":", __LINE__, ") ", __VA_ARGS__)
+#define LOG_DEBUG(...)   Logger::instance().debug("(", __FILE__, ":", __LINE__, ") ", __VA_ARGS__)
+#define LOG_INFO(...)    Logger::instance().info(__VA_ARGS__)
+#define LOG_WARN(...)    Logger::instance().warning("(", __FILE__, ":", __LINE__, ") ", __VA_ARGS__)
+#define LOG_ERROR(...)   Logger::instance().error("(", __FILE__, ":", __LINE__, ") ", __VA_ARGS__)
+#define LOG_FATAL(...)   Logger::instance().fatal("(", __FILE__, ":", __LINE__, ") ", __VA_ARGS__)
\ No newline at end of file
diff --git "a/Server/\347\216\213\351\271\217\345\223\262/document/\351\241\271\347\233\256\346\200\273\347\273\223.docx" "b/Server/\347\216\213\351\271\217\345\223\262/document/\351\241\271\347\233\256\346\200\273\347\273\223.docx"
new file mode 100644
index 0000000..625faff
--- /dev/null
+++ "b/Server/\347\216\213\351\271\217\345\223\262/document/\351\241\271\347\233\256\346\200\273\347\273\223.docx"
Binary files differ
diff --git "a/Server/\347\216\213\351\271\217\345\223\262/log/\346\227\245\345\277\227_\347\216\213\351\271\217\345\223\262_20250629.doc" "b/Server/\347\216\213\351\271\217\345\223\262/log/\346\227\245\345\277\227_\347\216\213\351\271\217\345\223\262_20250629.doc"
new file mode 100644
index 0000000..25b1c97
--- /dev/null
+++ "b/Server/\347\216\213\351\271\217\345\223\262/log/\346\227\245\345\277\227_\347\216\213\351\271\217\345\223\262_20250629.doc"
Binary files differ
diff --git "a/Server/\347\216\213\351\271\217\345\223\262/log/\346\227\245\345\277\227_\347\216\213\351\271\217\345\223\262_20250630.doc" "b/Server/\347\216\213\351\271\217\345\223\262/log/\346\227\245\345\277\227_\347\216\213\351\271\217\345\223\262_20250630.doc"
new file mode 100644
index 0000000..78def34
--- /dev/null
+++ "b/Server/\347\216\213\351\271\217\345\223\262/log/\346\227\245\345\277\227_\347\216\213\351\271\217\345\223\262_20250630.doc"
Binary files differ
diff --git "a/Server/\347\216\213\351\271\217\345\223\262/log/\346\227\245\345\277\227_\347\216\213\351\271\217\345\223\262_20250701.doc" "b/Server/\347\216\213\351\271\217\345\223\262/log/\346\227\245\345\277\227_\347\216\213\351\271\217\345\223\262_20250701.doc"
new file mode 100644
index 0000000..61462ad
--- /dev/null
+++ "b/Server/\347\216\213\351\271\217\345\223\262/log/\346\227\245\345\277\227_\347\216\213\351\271\217\345\223\262_20250701.doc"
Binary files differ

--
Gitblit v1.8.0