add LOG_LV1, LOG_LV2
This commit is contained in:
1 parent
69d541b9eb
commit
64174a7ff9
1 file changed
+20
@@ -117,6 +117,26 @@ int cprintf(const char * format, ...);
|
||||
cprintf("\n");\
|
||||
}while(0)
|
||||
|
||||
#if CFG_DEBUG
|
||||
#define LOG_LV1(...) ADALOG(__VA_ARGS__)
|
||||
#else
|
||||
#define LOG_LV1(...)
|
||||
#endif
|
||||
|
||||
#if CFG_DEBUG >= 2
|
||||
#define LOG_LV2(...) ADALOG(__VA_ARGS__)
|
||||
#else
|
||||
#define LOG_LV2(...)
|
||||
#endif
|
||||
|
||||
#define ADALOG(tag, ...) \
|
||||
do { \
|
||||
cprintf("[" #tag "] ");\
|
||||
cprintf(__VA_ARGS__);\
|
||||
cprintf("\n");\
|
||||
}while(0)
|
||||
|
||||
|
||||
#else
|
||||
|
||||
#define PRINT_LOCATION()
|
||||
|
||||
Reference in new issue
Block a user