mirror of
http://github.com/valkey-io/valkey
synced 2024-11-23 11:51:01 +00:00
Fix for wrong error level detection in redis.log()
This commit is contained in:
parent
288f811fea
commit
e927a24610
@ -209,11 +209,11 @@ int luaLogCommand(lua_State *lua) {
|
||||
luaPushError(lua, "redis.log() requires two arguments or more.");
|
||||
return 1;
|
||||
} else if (!lua_isnumber(lua,-argc)) {
|
||||
luaPushError(lua, "First argument must be a number.");
|
||||
luaPushError(lua, "First argument must be a number (log level).");
|
||||
return 1;
|
||||
}
|
||||
level = lua_tonumber(lua,-argc);
|
||||
if (level < REDIS_DEBUG && level > REDIS_WARNING) {
|
||||
if (level < REDIS_DEBUG || level > REDIS_WARNING) {
|
||||
luaPushError(lua, "Invalid debug level.");
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user