const char *name; /* User-visible name. */
int levels[VLF_N_FACILITIES]; /* Minimum log level for each facility. */
int min_level; /* Minimum log level for any facility. */
+ bool honor_rate_limits; /* Set false to ignore rate limits. */
};
/* Creates and initializes a global instance of a module named MODULE. */
void vlog_fatal_valist(const struct vlog_module *, const char *format, va_list)
PRINTF_FORMAT (2, 0) NO_RETURN;
+void vlog_abort(const struct vlog_module *, const char *format, ...)
+ PRINTF_FORMAT (2, 3) NO_RETURN;
+void vlog_abort_valist(const struct vlog_module *, const char *format, va_list)
+ PRINTF_FORMAT (2, 0) NO_RETURN;
+
void vlog_rate_limit(const struct vlog_module *, enum vlog_level,
struct vlog_rate_limit *, const char *, ...)
PRINTF_FORMAT (4, 5);
* Guaranteed to preserve errno.
*/
#define VLOG_FATAL(...) vlog_fatal(THIS_MODULE, __VA_ARGS__)
+#define VLOG_ABORT(...) vlog_abort(THIS_MODULE, __VA_ARGS__)
#define VLOG_EMER(...) VLOG(VLL_EMER, __VA_ARGS__)
#define VLOG_ERR(...) VLOG(VLL_ERR, __VA_ARGS__)
#define VLOG_WARN(...) VLOG(VLL_WARN, __VA_ARGS__)
extern struct vlog_module VLM_##MODULE; \
struct vlog_module VLM_##MODULE = \
{ \
- #MODULE, /* name */ \
+ #MODULE, /* name */ \
{ [ 0 ... VLF_N_FACILITIES - 1] = VLL_INFO }, /* levels */ \
- VLL_INFO, /* min_level */ \
+ VLL_INFO, /* min_level */ \
+ true /* honor_rate_limits */ \
};
#ifdef __cplusplus