Skip to content

Commit

Permalink
Add newline to argv in crash report when doing redact (valkey-io#993)
Browse files Browse the repository at this point in the history
Minor cleanup, introduced in valkey-io#877.

Signed-off-by: Binbin <binloveplay1314@qq.com>
  • Loading branch information
enjoy-binbin authored Sep 5, 2024
1 parent 2d1eca5 commit 9033734
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -1062,7 +1062,7 @@ void _serverAssertPrintClientInfo(const client *c) {
serverLog(LL_WARNING, "client->argc = %d", c->argc);
for (j = 0; j < c->argc; j++) {
if (shouldRedactArg(c, j)) {
serverLog(LL_WARNING, "client->argv[%d]: %zu bytes ", j, sdslen((sds)c->argv[j]->ptr));
serverLog(LL_WARNING, "client->argv[%d]: %zu bytes", j, sdslen((sds)c->argv[j]->ptr));
continue;
}
char buf[128];
Expand Down Expand Up @@ -1885,7 +1885,7 @@ void logCurrentClient(client *cc, const char *title) {
serverLog(LL_WARNING | LL_RAW, "argc: '%d'\n", cc->argc);
for (j = 0; j < cc->argc; j++) {
if (shouldRedactArg(cc, j)) {
serverLog(LL_WARNING | LL_RAW, "client->argv[%d]: %zu bytes ", j, sdslen((sds)cc->argv[j]->ptr));
serverLog(LL_WARNING | LL_RAW, "argv[%d]: %zu bytes\n", j, sdslen((sds)cc->argv[j]->ptr));
continue;
}
robj *decoded;
Expand Down

0 comments on commit 9033734

Please sign in to comment.