summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_log_moderation.h
diff options
context:
space:
mode:
authorValentin Bartenev <vbart@nginx.com>2018-03-05 17:32:50 +0300
committerValentin Bartenev <vbart@nginx.com>2018-03-05 17:32:50 +0300
commit912a49c6091c1fd9b630d2e0966f0fe1b97a3e42 (patch)
tree5581735807436384796dfd9deff336865c8372e4 /src/nxt_log_moderation.h
parentf2090bce21e4fb47d11f992a76ef5c4da74c3233 (diff)
downloadunit-912a49c6091c1fd9b630d2e0966f0fe1b97a3e42.tar.gz
unit-912a49c6091c1fd9b630d2e0966f0fe1b97a3e42.tar.bz2
Reduced number of critical log levels.
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; \