From: Christopher Faulet Date: Thu, 29 Feb 2024 14:37:43 +0000 (+0100) Subject: BUG/MINOR: hlua: Fix log level to the right value when set via TXN:set_loglevel X-Git-Tag: v3.0-dev5~40 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=75fb0afde4b77c947f2357af3c45bc3a7688b31c;p=thirdparty%2Fhaproxy.git BUG/MINOR: hlua: Fix log level to the right value when set via TXN:set_loglevel When the log level is changed in lua, by calling TXN:set_loglevel function, it must be incremented by one because it is decremented in strm_log() function. This patch must be backport to all stable versions. --- diff --git a/src/hlua.c b/src/hlua.c index dffccd4f37..fdbd2cbc2f 100644 --- a/src/hlua.c +++ b/src/hlua.c @@ -8246,7 +8246,7 @@ __LJMP static int hlua_txn_set_loglevel(lua_State *L) if (ll < 0 || ll > 7) WILL_LJMP(luaL_argerror(L, 2, "Bad log level. It must be between 0 and 7")); - htxn->s->logs.level = ll; + htxn->s->logs.level = ll + 1; return 0; }