summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2011-11-25 16:09:16 +0100
committerantirez <antirez@gmail.com>2011-11-25 16:09:16 +0100
commit7558b1fe4d416de237ee24034282f5a37eb75e33 (patch)
tree392ab1953056d73413e10e3ec56558873c3f7d21
parentfcf5783632a8d0fa4fef62da6c6ed0a43a2e21c4 (diff)
downloadredis-7558b1fe4d416de237ee24034282f5a37eb75e33.tar.gz
log client protocol errors for log level >= verbose
-rw-r--r--src/networking.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/networking.c b/src/networking.c
index c434714be..1bf7a04b4 100644
--- a/src/networking.c
+++ b/src/networking.c
@@ -698,6 +698,12 @@ int processInlineBuffer(redisClient *c) {
/* Helper function. Trims query buffer to make the function that processes
* multi bulk requests idempotent. */
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->querybuf = sdsrange(c->querybuf,pos,-1);
}