提交 eddf5deb 编写于 作者: A antirez

More verbose logging when slave sends errors to master.

See #3832.
上级 c09cc0a9
......@@ -376,8 +376,12 @@ 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);
if (c->flags & CLIENT_MASTER) {
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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册