summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_log_moderation.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/nxt_log_moderation.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/nxt_log_moderation.h b/src/nxt_log_moderation.h
index ebef7fd5..0a53594d 100644
--- a/src/nxt_log_moderation.h
+++ b/src/nxt_log_moderation.h
@@ -24,6 +24,17 @@ typedef struct {
#define \
+nxt_log_alert_moderate(_mod, _log, ...) \
+ do { \
+ nxt_log_t *_log_ = _log; \
+ \
+ if (nxt_log_moderate_allow(_mod)) { \
+ _log_->handler(NXT_LOG_ALERT, _log_, __VA_ARGS__); \
+ } \
+ } while (0)
+
+
+#define \
nxt_log_moderate(_mod, _level, _log, ...) \
do { \
nxt_log_t *_log_ = _log; \