plugin_dispatch_values() used to fail, if no write callbacks had been
registered. As that function is used to update the cache and check
threshold as well, this limited the flexibility of collectd setups. Thus,
the error message has been downgraded to a one-time complaint.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
**/
#include "collectd.h"
+#include "utils_complain.h"
#include <ltdl.h>
int plugin_dispatch_values (value_list_t *vl)
{
+ static c_complain_t no_write_complaint = C_COMPLAIN_INIT;
+
int (*callback) (const data_set_t *, const value_list_t *);
data_set_t *ds;
llentry_t *le;
}
if (list_write == NULL)
- {
- ERROR ("plugin_dispatch_values: No write callback has been "
- "registered. Please load at least one plugin "
- "that provides a write function.");
- return (-1);
- }
+ c_complain_once (LOG_WARNING, &no_write_complaint,
+ "plugin_dispatch_values: No write callback has been "
+ "registered. Please load at least one output plugin, "
+ "if you want the collected data to be stored.");
if (data_sets == NULL)
{