summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormymilkbottles <javaxz@163.com>2020-04-06 19:34:07 +0800
committerGitHub <noreply@github.com>2020-04-06 19:34:07 +0800
commit7bd5ccaad0bd3af18a220c9cebbfbd5c0f645815 (patch)
tree9290ab31aa5bea68e5096ae94d33b246d7a82425
parentaf5c11874c4e534db0ca1c44c2ca20fec1ab2700 (diff)
parent25063f75d73a4c40b9cd7b0229fc63d6cec15e9a (diff)
downloadredis-7bd5ccaad0bd3af18a220c9cebbfbd5c0f645815.tar.gz
Merge pull request #1 from mymilkbottles/mymilkbottles-log-level-judge
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();