Replace all syslog-calls with one of the new logging-macros.
[collectd.git] / src / vserver.c
index 00a1e6a..fef4558 100644 (file)
 #include "plugin.h"
 
 #include <dirent.h>
-#include <errno.h>
-#include <stdio.h>
-#include <string.h>
-#include <syslog.h>
 #include <sys/types.h>
-#include <unistd.h>
 
 #define BUFSIZE 512
 
@@ -218,7 +213,7 @@ static int vserver_read (void)
                        continue;
 
                if (NULL == (fh = fopen (file, "r")))
-                       syslog (LOG_ERR, "Cannot open '%s': %s", file, strerror (errno));
+                       ERROR ("Cannot open '%s': %s", file, strerror (errno));
 
                while ((fh != NULL) && (NULL != fgets (buffer, BUFSIZE, fh)))
                {
@@ -261,7 +256,7 @@ static int vserver_read (void)
                        continue;
 
                if (NULL == (fh = fopen (file, "r")))
-                       syslog (LOG_ERR, "Cannot open '%s': %s", file, strerror (errno));
+                       ERROR ("Cannot open '%s': %s", file, strerror (errno));
 
                while ((fh != NULL) && (NULL != fgets (buffer, BUFSIZE, fh)))
                {
@@ -309,7 +304,7 @@ static int vserver_read (void)
                        continue;
 
                if (NULL == (fh = fopen (file, "r")))
-                       syslog (LOG_ERR, "Cannot open '%s': %s", file, strerror (errno));
+                       ERROR ("Cannot open '%s': %s", file, strerror (errno));
 
                while ((fh != NULL) && (NULL != fgets (buffer, BUFSIZE, fh)))
                {