12345678910111213141516171819202122232425262728 |
- /*
- * log.h
- *
- * Created on: Nov 7, 2022
- * Author: tangm
- */
- #ifndef INC_LOG_H_
- #define INC_LOG_H_
- #include <stdarg.h>
- #define LOG_LEN_MAX 256
- typedef enum LOG_LEVEL_U
- {
- LOG_NONE = 0,
- LOG_INFO,
- LOG_DEBUG,
- LOG_WARN,
- LOG_ERROR,
- LOG_MAX,
- }logLevel_t;
- void LogPrint(logLevel_t logLevel, const char *func, const int line, char * fmt, ...);
- #define LOG_PRINT(logLevel, fmt, ...) LogPrint(logLevel, __FUNCTION__, __LINE__, fmt, ##__VA_ARGS__)
- #endif /* INC_LOG_H_ */
|