if (status != 0)
{
char errbuf[1024];
- DEBUG ("getaddrinfo failed: %s",
+ INFO ("getaddrinfo failed: %s",
(status == EAI_SYSTEM)
? sstrerror (errno, errbuf, sizeof (errbuf))
: gai_strerror (status));
if (status != 0) /* `connect(2)' failed */
{
char errbuf[1024];
- DEBUG ("connect failed: %s",
+ INFO ("connect failed: %s",
sstrerror (errno, errbuf, sizeof (errbuf)));
close (sd);
return (-1);
if (connect (fd, (struct sockaddr *) ai_ptr->ai_addr, ai_ptr->ai_addrlen))
{
char errbuf[1024];
- DEBUG ("hddtemp: connect (%s, %s): %s", host, port,
+ INFO ("hddtemp: connect (%s, %s): %s", host, port,
sstrerror (errno, errbuf, sizeof (errbuf)));
close (fd);
fd = -1;
if (connect (fd, (struct sockaddr *) ai_ptr->ai_addr, ai_ptr->ai_addrlen))
{
char errbuf[1024];
- DEBUG ("mbmon: connect (%s, %s): %s", host, port,
+ INFO ("mbmon: connect (%s, %s): %s", host, port,
sstrerror (errno, errbuf,
sizeof (errbuf)));
close (fd);
if (status < 0)
{
char errbuf[1024];
- DEBUG ("recv(2) failed: %s",
+ INFO ("recv(2) failed: %s",
sstrerror (errno, errbuf, sizeof (errbuf)));
DEBUG ("Closing socket #%i", sd);
close (sd);
#define WARNING(...) plugin_log (LOG_WARNING, __VA_ARGS__)
#define NOTICE(...) plugin_log (LOG_NOTICE, __VA_ARGS__)
#define INFO(...) plugin_log (LOG_INFO, __VA_ARGS__)
-#define DEBUG(...) plugin_log (LOG_DEBUG, __VA_ARGS__)
+#if COLLECT_DEBUG
+# define DEBUG(...) plugin_log (LOG_DEBUG, __VA_ARGS__)
+#else /* COLLECT_DEBUG */
+# define DEBUG(...) /* noop */
+#endif /* ! COLLECT_DEBUG */
/* TODO: Move plugin_{complain,relief} into `utils_complain.[ch]'. -octo */
void plugin_complain (int level, complain_t *c, const char *format, ...);