28 行
634 B
C
28 行
634 B
C
#ifndef PAZE_LOG_H
|
|
#define PAZE_LOG_H
|
|
#include "paze/paze_types.h"
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
typedef enum {
|
|
PAZE_LOG_DEBUG = 0,
|
|
PAZE_LOG_INFO,
|
|
PAZE_LOG_WARN,
|
|
PAZE_LOG_ERROR,
|
|
PAZE_LOG_QUIET = 99
|
|
} paze_log_level_t;
|
|
|
|
void paze_log_set_level(paze_log_level_t lv);
|
|
void paze_log(paze_log_level_t lv, const char *fmt, ...);
|
|
|
|
#define PAZE_LOGD(...) paze_log(PAZE_LOG_DEBUG, __VA_ARGS__)
|
|
#define PAZE_LOGI(...) paze_log(PAZE_LOG_INFO, __VA_ARGS__)
|
|
#define PAZE_LOGW(...) paze_log(PAZE_LOG_WARN, __VA_ARGS__)
|
|
#define PAZE_LOGE(...) paze_log(PAZE_LOG_ERROR, __VA_ARGS__)
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
#endif
|