BUG/MINOR: config: check the proper variable when parsing log minlvl

logsrv->minlvl gets the numeric log level from the equivalent string.
Upon error, ->level was checked due to a wrong copy-paste. The effect
is that a wrong name will silently be ignored and due to minlvl=-1,
will act as if the option was not set.

No backport is needed, this is 1.5-specific.

Reported-by: Dinko Korunic <dkorunic@reflected.net>
This commit is contained in:
Willy Tarreau 2013-01-24 00:31:24 +01:00
parent 846257ecec
commit f7f057bab9

View File

@ -4785,7 +4785,7 @@ stats_error_parsing:
logsrv->minlvl = 0; /* limit syslog level to this level (emerg) */
if (*(args[4])) {
logsrv->minlvl = get_log_level(args[4]);
if (logsrv->level < 0) {
if (logsrv->minlvl < 0) {
Alert("parsing [%s:%d] : unknown optional minimum log level '%s'\n", file, linenum, args[4]);
err_code |= ERR_ALERT | ERR_FATAL;
goto out;