summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authororanagra <oran@redislabs.com>2017-02-23 03:44:42 -0800
committeroranagra <oran@redislabs.com>2017-02-23 03:44:42 -0800
commit161a3a174b477fa95003765b682325604327074c (patch)
treeebbae75f404133bc0157bfce476c18b599cfd940
parent95883313b5a405916fabed34c3af290d6072c817 (diff)
downloadredis-161a3a174b477fa95003765b682325604327074c.tar.gz
when a slave experiances an error on commands that come from master, print to the log
since slave isn't replying to it's master, these errors go unnoticed. since we don't expect the master to send garbadge to the slave, this should be safe. (as long as we don't log OOM errors there)
-rw-r--r--src/networking.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/networking.c b/src/networking.c
index 343a910e2..1ef27815a 100644
--- a/src/networking.c
+++ b/src/networking.c
@@ -371,6 +371,8 @@ void addReplyErrorLength(client *c, const char *s, size_t len) {
addReplyString(c,"-ERR ",5);
addReplyString(c,s,len);
addReplyString(c,"\r\n",2);
+ if (c->flags & CLIENT_MASTER)
+ serverLog(LL_WARNING,"Error sent to master: %s", s);
}
void addReplyError(client *c, const char *err) {