#include "collectd.h"
-#include "common.h"
#include "plugin.h"
+#include "utils/common/common.h"
#if COLLECT_DEBUG
static int log_level = LOG_DEBUG;
static pthread_mutex_t file_lock = PTHREAD_MUTEX_INITIALIZER;
-static char *log_file = NULL;
+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"};
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);