Commit 3e0a975e authored by antirez's avatar antirez
Browse files

log client protocol errors for log level >= verbose

parent 674df1ee
...@@ -695,6 +695,12 @@ int processInlineBuffer(redisClient *c) { ...@@ -695,6 +695,12 @@ int processInlineBuffer(redisClient *c) {
/* Helper function. Trims query buffer to make the function that processes /* Helper function. Trims query buffer to make the function that processes
* multi bulk requests idempotent. */ * multi bulk requests idempotent. */
static void setProtocolError(redisClient *c, int pos) { static void setProtocolError(redisClient *c, int pos) {
if (server.verbosity >= REDIS_VERBOSE) {
sds client = getClientInfoString(c);
redisLog(REDIS_VERBOSE,
"Protocol error from client: %s", client);
sdsfree(client);
}
c->flags |= REDIS_CLOSE_AFTER_REPLY; c->flags |= REDIS_CLOSE_AFTER_REPLY;
c->querybuf = sdsrange(c->querybuf,pos,-1); c->querybuf = sdsrange(c->querybuf,pos,-1);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment