GeekIMU/4.Software/GeekIMU Manager GUI 1.2/GeekIMUDriver 1.2/Src/Utils/log.h

31 lines
493 B
C
Raw Normal View History

#ifndef LOG_H
#define LOG_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stdio.h>
// <20><>־<EFBFBD><D6BE><EFBFBD><EFBFBD>ö<EFBFBD><C3B6>
typedef enum {
Info,
Warn,
Error,
Debug
} LogLevel;
// <20><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>־<EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD><EFBFBD>־<EFBFBD>ļ<EFBFBD>·<EFBFBD><C2B7><EFBFBD><EFBFBD>
void InitLog(const char* logFilePath);
// д<><D0B4>־<EFBFBD>ĺ<EFBFBD><C4BA>ĺ<EFBFBD><C4BA><EFBFBD>
void WriteLog(LogLevel level, const char* format, ...);
// <20>ر<EFBFBD><D8B1><EFBFBD>־<EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͷ<EFBFBD><CDB7><EFBFBD>Դ<EFBFBD><D4B4>
void CloseLog();
#ifdef __cplusplus
}
#endif
#endif // LOG_H