fix msvc 不支持中文注释,删除中文注释

This commit is contained in:
2024-11-02 20:20:30 +08:00
parent 34f818196e
commit 668f88f8af
10 changed files with 26 additions and 111 deletions

View File

@@ -8,7 +8,7 @@
#include "logging/logging-handler.h"
#include "logging/logging-interceptor.h"
// 日志操作器
typedef struct Logger {
log_level level;
log_Handler *handler;
@@ -24,7 +24,7 @@ typedef struct Logger {
void (*addInterceptor)(log_Interceptor *Interceptor);
} Logger;
// 日志类对象
typedef struct Logging {
Logger *(*getLogger)(const char *name, log_level level);
log_status (*setLevel)(Logger *logger, log_level level);
@@ -32,6 +32,6 @@ typedef struct Logging {
log_status (*destroyLogging)(struct Logging *logging);
} Logging;
Logging *newLogging(); // 创建日志类对象
Logging *newLogging();
#endif // __LOGGING_H__

View File

@@ -14,5 +14,4 @@ typedef enum {
L_OK,
} log_status;
#endif // __LOGGING_CORE_H__

View File

@@ -4,14 +4,13 @@
#include <stdbool.h>
typedef struct log_Handler {
void* stream;
bool apply_color;
void (*_free)(struct log_Handler* handler);//释放资源
void (*output)(struct log_Handler* handler,const char* message);
void *stream;
bool apply_color;
void (*_free)(struct log_Handler *handler);
void (*output)(struct log_Handler *handler, const char *message);
} log_Handler;
log_Handler *loggingFileHandler(const char *name);
log_Handler *loggingConsoleHandler();
log_Handler* loggingFileHandler(const char* name);
log_Handler* loggingConsoleHandler();
#endif //__LOGGING_HANDLER_H__
#endif //__LOGGING_HANDLER_H__

View File

@@ -5,10 +5,10 @@
#include "logging-handler.h"
typedef struct log_Interceptor {
log_level level; // 拦截级别
log_Handler *handler; // 拦截目标处理器
bool (*_dispose)(char *level, const char *message, ...); // 拦截触发器
void (*_free)(struct log_Interceptor *Interceptor); // 释放资源
log_level level;
log_Handler *handler;
bool (*_dispose)(char *level, const char *message, ...);
void (*_free)(struct log_Interceptor *Interceptor);
} log_Interceptor;