diff --git a/src/log.c b/src/log.c index bda4220..11ce891 100644 --- a/src/log.c +++ b/src/log.c @@ -15,7 +15,11 @@ int log_level_init() if (env) { return atoi(env); } +#ifdef DEBUG + return DEFAULT_LOG_LEVEL | debug; +#else return DEFAULT_LOG_LEVEL; +#endif } void diff --git a/src/log.h b/src/log.h index bcac877..687814b 100644 --- a/src/log.h +++ b/src/log.h @@ -1,7 +1,6 @@ #ifndef LOG_H #define LOG_H -#define DEBUG 0 /** * \brief Log types */ @@ -10,7 +9,7 @@ typedef enum { error = 1 << 1, warning = 1 << 2, info = 1 << 3, - debug = DEBUG << 4, + debug = 1 << 4, link_lock_debug = 1 << 5, network_lock_debug = 1 << 6, cache_lock_debug = 1 << 7, @@ -21,7 +20,7 @@ typedef enum { /** * \brief The default log level */ -#define DEFAULT_LOG_LEVEL fatal | error | warning | info | debug +#define DEFAULT_LOG_LEVEL fatal | error | warning | info /** * \brief Get the log level from the environment.