From 75fb0afde4b77c947f2357af3c45bc3a7688b31c Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Thu, 29 Feb 2024 15:37:43 +0100 Subject: [PATCH] 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. --- src/hlua.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hlua.c b/src/hlua.c index dffccd4f3..fdbd2cbc2 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; }