Commit ae29bcd8 authored by antirez's avatar antirez
Browse files

More verbose logging when slave sends errors to master.

See #3832.
parent 756df191
...@@ -388,8 +388,12 @@ void addReplyErrorLength(client *c, const char *s, size_t len) { ...@@ -388,8 +388,12 @@ void addReplyErrorLength(client *c, const char *s, size_t len) {
addReplyString(c,"-ERR ",5); addReplyString(c,"-ERR ",5);
addReplyString(c,s,len); addReplyString(c,s,len);
addReplyString(c,"\r\n",2); addReplyString(c,"\r\n",2);
if (c->flags & CLIENT_MASTER) if (c->flags & CLIENT_MASTER) {
serverLog(LL_WARNING,"Error sent to master: %s", s); char *cmdname = c->lastcmd ? c->lastcmd->name : "<unknown>";
serverLog(LL_WARNING,"== CRITICAL == This slave is sending an error "
"to its master: '%s' after processing the command "
"'%s'", s, cmdname);
}
} }
void addReplyError(client *c, const char *err) { void addReplyError(client *c, const char *err) {
......
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