From 9af9cd09f9e85419362ca4e7442c840be2c666f8 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 7 Dec 2012 11:13:44 +0100 Subject: [PATCH] --not-alarm-log is the only condition that need to break --- core/alarm.c | 4 +++- core/uwsgi.c | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/core/alarm.c b/core/alarm.c index ec76287d..3df689ff 100644 --- a/core/alarm.c +++ b/core/alarm.c @@ -243,7 +243,9 @@ void uwsgi_alarm_log_check(char *msg, size_t len) { if (!ual->negate) { uwsgi_alarm_log_run(ual, msg, len); } - break; + else { + break; + } } ual = ual->next; } diff --git a/core/uwsgi.c b/core/uwsgi.c index 4015e89f..1c653dfb 100644 --- a/core/uwsgi.c +++ b/core/uwsgi.c @@ -399,7 +399,9 @@ static struct uwsgi_option uwsgi_base_options[] = { {"alarm", required_argument, 0, "create a new alarm, syntax: ", uwsgi_opt_add_string_list, &uwsgi.alarm_list, UWSGI_OPT_MASTER | UWSGI_OPT_LOG_MASTER}, {"alarm-freq", required_argument, 0, "tune the anti-loop alam system (default 3 seconds)", uwsgi_opt_set_int, &uwsgi.alarm_freq, 0}, {"log-alarm", required_argument, 0, "raise the specified alarm when a log line matches the specified regexp, syntax: [,alarm...] ", uwsgi_opt_add_string_list, &uwsgi.alarm_logs_list, UWSGI_OPT_MASTER | UWSGI_OPT_LOG_MASTER}, + {"alarm-log", required_argument, 0, "raise the specified alarm when a log line matches the specified regexp, syntax: [,alarm...] ", uwsgi_opt_add_string_list, &uwsgi.alarm_logs_list, UWSGI_OPT_MASTER | UWSGI_OPT_LOG_MASTER}, {"not-log-alarm", required_argument, 0, "skip the specified alarm when a log line matches the specified regexp, syntax: [,alarm...] ", uwsgi_opt_add_string_list_custom, &uwsgi.alarm_logs_list, UWSGI_OPT_MASTER | UWSGI_OPT_LOG_MASTER}, + {"not-alarm-log", required_argument, 0, "skip the specified alarm when a log line matches the specified regexp, syntax: [,alarm...] ", uwsgi_opt_add_string_list_custom, &uwsgi.alarm_logs_list, UWSGI_OPT_MASTER | UWSGI_OPT_LOG_MASTER}, {"alarm-list", no_argument, 0, "list enabled alarms", uwsgi_opt_true, &uwsgi.alarms_list, 0}, {"alarms-list", no_argument, 0, "list enabled alarms", uwsgi_opt_true, &uwsgi.alarms_list, 0}, #endif