summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSalvatore Sanfilippo <antirez@gmail.com>2020-04-06 17:34:14 +0200
committerGitHub <noreply@github.com>2020-04-06 17:34:14 +0200
commite93dcba46e7b2229f3f507e01289ff98164d24b4 (patch)
tree8612436052c55ff55f1a1cbd57cbf6a69f2d900d
parent9a9109431b31a46da9c45fc1fd8c91b4f7bb9dc6 (diff)
parent7bd5ccaad0bd3af18a220c9cebbfbd5c0f645815 (diff)
downloadredis-e93dcba46e7b2229f3f507e01289ff98164d24b4.tar.gz
Merge pull request #7064 from mymilkbottles/unstable
Optimize lua log level judgment
-rw-r--r--src/scripting.c1
1 files changed, 1 insertions, 0 deletions
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();