Mon 16 Mar 11:09:06 CET 2026
This commit is contained in:
parent
d3142c63e7
commit
e9a642eb1b
22
src/log.h
Normal file
22
src/log.h
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
#ifndef _LOG_H
|
||||||
|
#define _LOG_H
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
LOGDEBUG3,
|
||||||
|
LOGDEBUG2,
|
||||||
|
LOGDEBUG1,
|
||||||
|
LOGINFO,
|
||||||
|
LOGUSER,
|
||||||
|
LOGERROR
|
||||||
|
} log_level_t;
|
||||||
|
|
||||||
|
extern int log_level;
|
||||||
|
|
||||||
|
// Wrapper for vLog with debug level selection
|
||||||
|
#ifdef DEBUG
|
||||||
|
#define log(level,format, ...) if (level>=log_level) vLog(format,__VA_ARGS__)
|
||||||
|
#else
|
||||||
|
#define log(level,format, ...)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
Loading…
Reference in New Issue
Block a user