diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-08-27 17:57:06 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-08-27 17:57:06 +0200 |
commit | 81bff2df037a218cb973559a2bfbfbd259b1cbad (patch) | |
tree | baeeeb599991e6de736e91f3b9e80f8603fd7bb0 /src/config.c | |
parent | e91f17de87175d822ae7e3d3238e7a0021a645ad (diff) | |
download | fastd-81bff2df037a218cb973559a2bfbfbd259b1cbad.tar fastd-81bff2df037a218cb973559a2bfbfbd259b1cbad.zip |
Introduce new log level debug2 for potentially very frequent messages
Diffstat (limited to 'src/config.c')
-rw-r--r-- | src/config.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/config.c b/src/config.c index 7dd3e7f..d5165dd 100644 --- a/src/config.c +++ b/src/config.c @@ -87,8 +87,6 @@ static const fastd_crypto_ghash_t *fastd_crypto_ghash_default = &fastd_crypto_gh static void default_config(fastd_config_t *conf) { memset(conf, 0, sizeof(fastd_config_t)); - conf->log_stderr_level = -1; - conf->log_syslog_level = -1; conf->log_syslog_ident = strdup("fastd"); conf->keepalive_interval = 20; @@ -294,7 +292,7 @@ static bool has_peer_group_peer_dirs(const fastd_peer_group_config_t *group) { return false; } -bool fastd_config_add_log_file(fastd_context_t *ctx, fastd_config_t *conf, const char *name, int level) { +bool fastd_config_add_log_file(fastd_context_t *ctx, fastd_config_t *conf, const char *name, fastd_loglevel_t level) { char *name2 = strdup(name); char *name3 = strdup(name); @@ -612,7 +610,7 @@ void fastd_configure(fastd_context_t *ctx, fastd_config_t *conf, int argc, char fastd_config_handle_options(ctx, conf, argc, argv); - if (conf->log_stderr_level < 0 && conf->log_syslog_level < 0 && !conf->log_files) + if (!conf->log_stderr_level && !conf->log_syslog_level && !conf->log_files) conf->log_stderr_level = FASTD_DEFAULT_LOG_LEVEL; if (!conf->methods[0]) |