ACL: show client's user

This commit is contained in:
zhaozhao.zz 2019-02-12 16:03:58 +08:00
parent 85cadafabf
commit 0f42447a0e

View File

@ -1781,7 +1781,7 @@ sds catClientInfoString(sds s, client *client) {
if (emask & AE_WRITABLE) *p++ = 'w';
*p = '\0';
return sdscatfmt(s,
"id=%U addr=%s fd=%i name=%s age=%I idle=%I flags=%s db=%i sub=%i psub=%i multi=%i qbuf=%U qbuf-free=%U obl=%U oll=%U omem=%U events=%s cmd=%s",
"id=%U addr=%s fd=%i name=%s age=%I idle=%I flags=%s db=%i sub=%i psub=%i multi=%i qbuf=%U qbuf-free=%U obl=%U oll=%U omem=%U events=%s cmd=%s user=%s",
(unsigned long long) client->id,
getClientPeerId(client),
client->fd,
@ -1799,7 +1799,8 @@ sds catClientInfoString(sds s, client *client) {
(unsigned long long) listLength(client->reply),
(unsigned long long) getClientOutputBufferMemoryUsage(client),
events,
client->lastcmd ? client->lastcmd->name : "NULL");
client->lastcmd ? client->lastcmd->name : "NULL",
client->user ? client->user->name : "");
}
sds getAllClientsInfoString(int type) {