|
|
@ -13,26 +13,26 @@ extern bool g_enable_log; |
|
|
|
if (g_enable_log) { \ |
|
|
|
zos_log(TAG "" fmt "\n", ##__VA_ARGS__); \ |
|
|
|
} |
|
|
|
#define ZLOGI(TAG, fmt, ...) \
|
|
|
|
if (g_enable_log) { \ |
|
|
|
#define ZLOGI(TAG, fmt, ...) \
|
|
|
|
if (g_enable_log) { \ |
|
|
|
zos_log("%08lu INFO [%-10s] " fmt "\n", zchip_clock_get_ticket(), TAG, ##__VA_ARGS__); \ |
|
|
|
} |
|
|
|
#define ZLOGI_NOT_END_LINE(TAG, fmt, ...) \
|
|
|
|
if (g_enable_log) { \ |
|
|
|
#define ZLOGI_NOT_END_LINE(TAG, fmt, ...) \
|
|
|
|
if (g_enable_log) { \ |
|
|
|
zos_log("%08lu INFO [%-10s] " fmt "", zchip_clock_get_ticket(), TAG, ##__VA_ARGS__); \ |
|
|
|
} |
|
|
|
|
|
|
|
#define ZLOGD(TAG, fmt, ...) \
|
|
|
|
if (g_enable_log) { \ |
|
|
|
#define ZLOGD(TAG, fmt, ...) \
|
|
|
|
if (g_enable_log) { \ |
|
|
|
zos_log("%08lu DEBU [%-10s] " fmt "\n", zchip_clock_get_ticket(), TAG, ##__VA_ARGS__); \ |
|
|
|
} |
|
|
|
#define ZLOGE(TAG, fmt, ...) \
|
|
|
|
if (g_enable_log) { \ |
|
|
|
#define ZLOGE(TAG, fmt, ...) \
|
|
|
|
if (g_enable_log) { \ |
|
|
|
zos_log("%08lu ERRO [%-10s] " fmt "\n", zchip_clock_get_ticket(), TAG, ##__VA_ARGS__); \ |
|
|
|
} |
|
|
|
|
|
|
|
#define ZLOGW(TAG, fmt, ...) \
|
|
|
|
if (g_enable_log) { \ |
|
|
|
#define ZLOGW(TAG, fmt, ...) \
|
|
|
|
if (g_enable_log) { \ |
|
|
|
zos_log("%08lu WARN [%-10s] " fmt "\n", zchip_clock_get_ticket(), TAG, ##__VA_ARGS__); \ |
|
|
|
} |
|
|
|
|
|
|
@ -43,6 +43,16 @@ extern bool g_enable_log; |
|
|
|
zchip_clock_early_delayus(1000 * 1000); \ |
|
|
|
} \ |
|
|
|
} |
|
|
|
#define ZASSERT_INFO(cond, info) \
|
|
|
|
if (!(cond)) { \ |
|
|
|
while (1) { \ |
|
|
|
zos_log("ASSERT: %s [%s:%d] %s\n", #cond, __FILE__, __LINE__, info); \ |
|
|
|
zchip_clock_early_delayus(1000); \ |
|
|
|
} \ |
|
|
|
} |
|
|
|
|
|
|
|
void zlog_raw(const char* info); |
|
|
|
|
|
|
|
void zos_log(const char* fmt, ...); |
|
|
|
void zos_loggger_init(); |
|
|
|
} |