X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Flogfile.c;h=ef75052a522b32f446dfbdc1e61b01ae77a45014;hb=d93c31e59d1bbb5ed8c2ef624ef8ffa800bc5961;hp=2b7fbaebdbdd11d677b262137d3863aabdc15783;hpb=a396da422740caf336a6d594515e8d80de6f440a;p=collectd.git diff --git a/src/logfile.c b/src/logfile.c index 2b7fbaeb..ef75052a 100644 --- a/src/logfile.c +++ b/src/logfile.c @@ -28,8 +28,8 @@ #include "collectd.h" -#include "common.h" #include "plugin.h" +#include "utils/common/common.h" #if COLLECT_DEBUG static int log_level = LOG_DEBUG; @@ -41,7 +41,7 @@ static pthread_mutex_t file_lock = PTHREAD_MUTEX_INITIALIZER; static char *log_file; static int print_timestamp = 1; -static int print_severity = 0; +static int print_severity; static const char *config_keys[] = {"LogLevel", "File", "Timestamp", "PrintSeverity"}; @@ -52,8 +52,8 @@ static int logfile_config(const char *key, const char *value) { log_level = parse_log_severity(value); if (log_level < 0) { log_level = LOG_INFO; - ERROR("logfile: invalid loglevel [%s] defaulting to 'info'", value); - return 1; + WARNING("logfile: invalid loglevel [%s] defaulting to 'info'", value); + return 0; } } else if (0 == strcasecmp(key, "File")) { sfree(log_file);