From 7c35ff8d9a626f69a8a8b7de3d73dc9d73de9dd7 Mon Sep 17 00:00:00 2001
From: mrDarker <mr.darker@163.com>
Date: 星期六, 13 九月 2025 10:51:32 +0800
Subject: [PATCH] 1. 解决读取报警文件错误的问题,提高兼容性(可能文件是在MacOS编辑的,导致换行符不一样)
---
SourceCode/Bond/SGMeasurement/Logger.h | 30 +++++++++++++++---------------
1 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/SourceCode/Bond/SGMeasurement/Logger.h b/SourceCode/Bond/SGMeasurement/Logger.h
index aec95af..2b9f84d 100644
--- a/SourceCode/Bond/SGMeasurement/Logger.h
+++ b/SourceCode/Bond/SGMeasurement/Logger.h
@@ -1,28 +1,28 @@
-#pragma once
+锘�#pragma once
#include <afx.h>
class CLogger
{
public:
- static CLogger& Instance(); // 获取单例
- void WriteLine(CString str); // 写一行日志
- void CloseLogFile(); // 关闭日志文件
+ static CLogger& Instance(); // 鑾峰彇鍗曚緥
+ void WriteLine(CString str); // 鍐欎竴琛屾棩蹇�
+ void CloseLogFile(); // 鍏抽棴鏃ュ織鏂囦欢
private:
- CLogger();
- ~CLogger();
- void OpenLogFile(); // 内部打开文件
+ CLogger();
+ ~CLogger();
+ void OpenLogFile(); // 鍐呴儴鎵撳紑鏂囦欢
- CCriticalSection m_csLogLock;
- CString m_strCurrentLogPath;
- CStdioFile m_logFile;
+ CCriticalSection m_csLogLock;
+ CString m_strCurrentLogPath;
+ CStdioFile m_logFile;
};
#define LOG_LINE(x) CLogger::Instance().WriteLine(x)
#define LOG_LINEF(fmt, ...) \
- do { \
- CString __log__; \
- __log__.Format(fmt, __VA_ARGS__); \
- CLogger::Instance().WriteLine(__log__); \
- } while (0)
\ No newline at end of file
+ do { \
+ CString __log__; \
+ __log__.Format(fmt, __VA_ARGS__); \
+ CLogger::Instance().WriteLine(__log__); \
+ } while (0)
\ No newline at end of file
--
Gitblit v1.9.3