From 1c8d382fac3101fbaa89950d0a19f65761b08d26 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Thu, 22 May 2014 03:34:59 +0200 Subject: Move fastd_loglevel_t to log.h --- src/config.c | 2 +- src/config.y | 2 +- src/log.h | 12 +++++++++++- src/types.h | 11 ----------- 4 files changed, 13 insertions(+), 14 deletions(-) (limited to 'src') 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 -#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; -- cgit v1.2.3