summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/config.c2
-rw-r--r--src/config.y2
-rw-r--r--src/log.h12
-rw-r--r--src/types.h11
4 files changed, 13 insertions, 14 deletions
diff --git a/src/config.c b/src/config.c
index 6360475..82a57ba 100644
--- a/src/config.c
+++ b/src/config.c
@@ -496,7 +496,7 @@ void fastd_configure(int argc, char *const argv[]) {
fastd_config_handle_options(argc, argv);
if (!conf.log_stderr_level && !conf.log_syslog_level)
- conf.log_stderr_level = FASTD_DEFAULT_LOG_LEVEL;
+ conf.log_stderr_level = LL_DEFAULT;
}
static void config_check_base(void) {
diff --git a/src/config.y b/src/config.y
index a448a00..88d6f53 100644
--- a/src/config.y
+++ b/src/config.y
@@ -277,7 +277,7 @@ hide: TOK_IP TOK_ADDRESSES boolean {
maybe_log_level:
TOK_LEVEL log_level { $$ = $2; }
- | { $$ = FASTD_DEFAULT_LOG_LEVEL; }
+ | { $$ = LL_DEFAULT; }
;
log_level: TOK_FATAL { $$ = LL_FATAL; }
diff --git a/src/log.h b/src/log.h
index 0fe6b67..b64971e 100644
--- a/src/log.h
+++ b/src/log.h
@@ -32,7 +32,17 @@
#include <string.h>
-#define FASTD_DEFAULT_LOG_LEVEL LL_VERBOSE
+typedef enum fastd_loglevel {
+ LL_UNSPEC = 0,
+ LL_FATAL,
+ LL_ERROR,
+ LL_WARN,
+ LL_INFO,
+ LL_VERBOSE,
+ LL_DEBUG,
+ LL_DEBUG2,
+ LL_DEFAULT = LL_VERBOSE,
+} fastd_loglevel_t;
void fastd_logf(const fastd_loglevel_t level, const char *format, ...);
diff --git a/src/types.h b/src/types.h
index 7ad2e0b..7d5bf90 100644
--- a/src/types.h
+++ b/src/types.h
@@ -68,17 +68,6 @@ typedef enum fastd_drop_caps {
DROP_CAPS_EARLY,
} fastd_drop_caps_t;
-typedef enum fastd_loglevel {
- LL_UNSPEC = 0,
- LL_FATAL,
- LL_ERROR,
- LL_WARN,
- LL_INFO,
- LL_VERBOSE,
- LL_DEBUG,
- LL_DEBUG2,
-} fastd_loglevel_t;
-
typedef struct fastd_buffer fastd_buffer_t;