From a953c6e55b234072b2b5cc95ef867826a89b4009 Mon Sep 17 00:00:00 2001 From: mymilkbottles Date: Mon, 6 Apr 2020 19:27:06 +0800 Subject: [PATCH] Judge the log level in advance --- src/scripting.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/scripting.c b/src/scripting.c index 32a511e13..bccbcf637 100644 --- a/src/scripting.c +++ b/src/scripting.c @@ -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();