#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"};
static void logfile_print(const char *msg, int severity,
cdtime_t timestamp_time) {
FILE *fh;
- _Bool do_close = 0;
+ bool do_close = false;
char timestamp_str[64];
char level_str[16] = "";
fh = stdout;
else {
fh = fopen(log_file, "a");
- do_close = 1;
+ do_close = true;
}
if (fh == NULL) {