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.
This commit is contained in:
Christopher Faulet 2024-02-29 15:37:43 +01:00
parent 573ed242e3
commit 75fb0afde4
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}