src/utils_threshold.c: Added creation of a notification.
[collectd.git] / src / plugin.h
index 8c5acab..96eb0cb 100644 (file)
@@ -45,7 +45,7 @@
 # define LOG_DEBUG 7
 #endif
 
-#define NOTIF_MAX_MSG_LEN 128
+#define NOTIF_MAX_MSG_LEN 256
 
 #define NOTIF_FAILURE 1
 #define NOTIF_WARNING 2
@@ -212,7 +212,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, ...);