From: Florian Klink Date: Thu, 2 Jul 2015 10:35:41 +0000 (+0200) Subject: (read|append)_config_file: log open errors as LOG_DEBUG X-Git-Tag: release-1.1pre12~118 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=91355b9ac5a80d6d7da6951a72ea0c22651bdfa8;p=oweals%2Ftinc.git (read|append)_config_file: log open errors as LOG_DEBUG In a "decentrally managed vpn" it is very likely that host config files for some reachable nodes do not exist. Currently, tinc fills the logs with "Cannot open config file" messages. This commit changes the log level to LOG_DEBUG so syslog doesn't get filled by default. --- diff --git a/src/conf.c b/src/conf.c index 2b32359..7756247 100644 --- a/src/conf.c +++ b/src/conf.c @@ -298,7 +298,7 @@ bool read_config_file(splay_tree_t *config_tree, const char *fname) { fp = fopen(fname, "r"); if(!fp) { - logger(DEBUG_ALWAYS, LOG_ERR, "Cannot open config file %s: %s", fname, strerror(errno)); + logger(DEBUG_ALWAYS, LOG_DEBUG, "Cannot open config file %s: %s", fname, strerror(errno)); return false; } @@ -423,7 +423,7 @@ bool append_config_file(const char *name, const char *key, const char *value) { FILE *fp = fopen(fname, "a"); if(!fp) { - logger(DEBUG_ALWAYS, LOG_ERR, "Cannot open config file %s: %s", fname, strerror(errno)); + logger(DEBUG_ALWAYS, LOG_DEBUG, "Cannot open config file %s: %s", fname, strerror(errno)); return false; }