X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fplugin.h;h=7692ebdb0377eb3212a4c3a2da9931c837202d46;hb=f71467d9c2097ddd9eb772a4fdb985663168ec71;hp=72d8adb67953d944bab02d08d61901088247588f;hpb=7ff716579c6ed159366ef3dfd3132efb6f744ce0;p=collectd.git diff --git a/src/plugin.h b/src/plugin.h index 72d8adb6..7692ebdb 100644 --- a/src/plugin.h +++ b/src/plugin.h @@ -63,6 +63,7 @@ struct value_list_s value_t *values; int values_len; time_t time; + int interval; char host[DATA_MAX_NAME_LEN]; char plugin[DATA_MAX_NAME_LEN]; char plugin_instance[DATA_MAX_NAME_LEN]; @@ -70,7 +71,8 @@ struct value_list_s }; typedef struct value_list_s value_list_t; -#define VALUE_LIST_INIT { NULL, 0, 0, "localhost", "", "", "" } +#define VALUE_LIST_INIT { NULL, 0, 0, interval_g, "localhost", "", "", "" } +#define VALUE_LIST_STATIC { NULL, 0, 0, 0, "localhost", "", "", "" } struct data_source_s { @@ -191,7 +193,11 @@ void plugin_log (int level, const char *format, ...); #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, ...);