X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fvserver.c;h=3a77961bbb3089ff6bb259593c671f46f81a1592;hb=2cea8075c666a6c6c7d6e1b4f95e1bee6f3803ac;hp=694b6d02b44bf0ab51e4a6fd75ac40b2146e7469;hpb=c87194194948fec81eb7ead8b7d9615efc7778e1;p=collectd.git diff --git a/src/vserver.c b/src/vserver.c index 694b6d02..3a77961b 100644 --- a/src/vserver.c +++ b/src/vserver.c @@ -343,11 +343,17 @@ static void vserver_read (void) DIR *proc; struct dirent *dent; /* 42 */ + static complain_t complain_obj; + errno = 0; - if (NULL == (proc = opendir (PROCDIR))) { - syslog (LOG_ERR, "Cannot open '%s': %s", PROCDIR, strerror (errno)); + if (NULL == (proc = opendir (PROCDIR))) + { + plugin_complain (LOG_ERR, &complain_obj, "vserver plugin: " + "fopen (%s) failed: %s", PROCDIR, strerror (errno)); return; } + plugin_relief (LOG_NOTICE, &complain_obj, "vserver plugin: " + "fopen (%s) succeeded.", PROCDIR); while (NULL != (dent = readdir (proc))) { int len;