#else
if (ksp == NULL)
{
- fprintf (stderr, "ERROR: %s:%i: ksp == NULL\n", __FILE__, __LINE__);
+ ERROR ("ERROR: %s:%i: ksp == NULL\n", __FILE__, __LINE__);
return (-1LL);
}
else if (ksp->ks_type != KSTAT_TYPE_NAMED)
{
- fprintf (stderr, "ERROR: %s:%i: ksp->ks_type != KSTAT_TYPE_NAMED\n", __FILE__, __LINE__);
+ ERROR ("ERROR: %s:%i: ksp->ks_type != KSTAT_TYPE_NAMED\n", __FILE__, __LINE__);
return (-1LL);
}
#endif
fprintf (stderr, "email plugin: `MaxConns' was set to invalid "
"value %li, will use default %i.\n",
tmp, MAX_CONNS);
+ ERROR ("email plugin: `MaxConns' was set to invalid "
+ "value %li, will use default %i.\n",
+ tmp, MAX_CONNS);
max_conns = MAX_CONNS;
}
else if (tmp > MAX_CONNS_LIMIT) {
fprintf (stderr, "email plugin: `MaxConns' was set to invalid "
"value %li, will use hardcoded limit %i.\n",
tmp, MAX_CONNS_LIMIT);
+ ERROR ("email plugin: `MaxConns' was set to invalid "
+ "value %li, will use hardcoded limit %i.\n",
+ tmp, MAX_CONNS_LIMIT);
max_conns = MAX_CONNS_LIMIT;
}
else {
{
int status;
- printf ("domain_connection_change_handler (domain = %p, err = %i, "
+ DEBUG ("domain_connection_change_handler (domain = %p, err = %i, "
"conn_num = %u, port_num = %u, still_connected = %i, "
"user_data = %p);\n",
(void *) domain, err, conn_num, port_num, still_connected, user_data);
status = thread_init (&os_handler);
if (status != 0)
{
- fprintf (stderr, "ipmi plugin: thread_init failed.\n");
+ ERROR ("ipmi plugin: thread_init failed.\n");
return ((void *) -1);
}
{
fprintf (stderr, "rrdtool: `CacheTimeout' must "
"be greater than 0.\n");
+ ERROR ("rrdtool: `CacheTimeout' must "
+ "be greater than 0.\n");
return (1);
}
cache_timeout = tmp;
{
fprintf (stderr, "rrdtool: `CacheFlush' must "
"be greater than 0.\n");
+ ERROR ("rrdtool: `CacheFlush' must "
+ "be greater than 0.\n");
return (1);
}
cache_flush_timeout = tmp;
{
fprintf (stderr, "rrdtool: `RRARows' must "
"be greater than 0.\n");
+ ERROR ("rrdtool: `RRARows' must "
+ "be greater than 0.\n");
return (1);
}
rrarows = tmp;
if (tmp_alloc == NULL)
{
fprintf (stderr, "rrdtool: realloc failed.\n");
+ ERROR ("rrdtool: realloc failed.\n");
free (value_copy);
return (1);
}
{
fprintf (stderr, "rrdtool: `XFF' must "
"be in the range 0 to 1 (exclusive).");
+ ERROR ("rrdtool: `XFF' must "
+ "be in the range 0 to 1 (exclusive).");
return (1);
}
xff = tmp;
*/
#include "collectd.h"
+#include "plugin.h"
#if HAVE_NETINET_IN_SYSTM_H
# include <netinet/in_systm.h>
memcpy(&us, buf + 2, 2);
us = ntohs(us);
- fprintf (stderr, "Bytes 0, 1: 0x%04hx\n", us);
qh.qr = (us >> 15) & 0x01;
qh.opcode = (us >> 11) & 0x0F;
qh.aa = (us >> 10) & 0x01;
{
int status;
- fprintf (stderr, "handle_pcap (udata = %p, hdr = %p, pkt = %p): hdr->caplen = %i\n",
+ DEBUG ("handle_pcap (udata = %p, hdr = %p, pkt = %p): hdr->caplen = %i\n",
(void *) udata, (void *) hdr, (void *) pkt,
hdr->caplen);
break;
default:
- fprintf (stderr, "unsupported data link type %d\n",
+ ERROR ("handle_pcap: unsupported data link type %d\n",
pcap_datalink(pcap_obj));
status = 0;
break;