diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-05-22 03:34:59 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2014-05-22 03:34:59 +0200 |
commit | 1c8d382fac3101fbaa89950d0a19f65761b08d26 (patch) | |
tree | 8d06536b1c6cdc7dadcd3e8dd5f9d56708dd45ff | |
parent | 0e3407d9aa912ef6e110f3326de17744af9e0ad6 (diff) | |
download | fastd-1c8d382fac3101fbaa89950d0a19f65761b08d26.tar fastd-1c8d382fac3101fbaa89950d0a19f65761b08d26.zip |
Move fastd_loglevel_t to log.h
-rw-r--r-- | src/config.c | 2 | ||||
-rw-r--r-- | src/config.y | 2 | ||||
-rw-r--r-- | src/log.h | 12 | ||||
-rw-r--r-- | src/types.h | 11 |
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; } @@ -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; |