Judge the log level in advance

This commit is contained in:
mymilkbottles
2020-04-07 16:53:13 +02:00
committed by antirez
parent 35c64b898c
commit 2437455f27
+1
View File
@@ -959,6 +959,7 @@ int luaLogCommand(lua_State *lua) {
lua_pushstring(lua, "Invalid debug level.");
return lua_error(lua);
}
if (level < server.verbosity) return 0;
/* Glue together all the arguments */
log = sdsempty();