fix log realdata send funtion

This commit is contained in:
lnk
2025-02-26 16:39:10 +08:00
parent c597ee5b9b
commit f167d705a9
9 changed files with 126 additions and 38 deletions

View File

@@ -4,9 +4,11 @@
#include <stdio.h>
#include <stdarg.h>
#ifdef __cplusplus
#include <list>
#include <string>
// 假设这些是你管理输出的列表
extern std::list<std::string> errorList;
extern std::list<std::string> warnList;
@@ -17,8 +19,19 @@ extern bool errorOutputEnabled;
extern bool warnOutputEnabled;
extern bool normalOutputEnabled;
void redirectErrorOutput(bool enabled);
void redirectWarnOutput(bool enabled);
void redirectNormalOutput(bool enabled);
extern "C"
{
#endif
// 自定义的 printf 函数
int customPrintf(const char* format, ...);
#ifdef __cplusplus
}
#endif
// 使用宏将 printf 替换为 customPrintf
#define printf customPrintf