Skip to content

Commit

Permalink
Dump non-printable chars as hex instead of octal
Browse files Browse the repository at this point in the history
  • Loading branch information
fgsch committed Aug 2, 2019
1 parent 87b335b commit 63bb0b4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bin/varnishtest/vtc_log.c
Expand Up @@ -227,7 +227,8 @@ vtc_dump(struct vtclog *vl, int lvl, const char *pfx, const char *str, int len)
if (len < 0)
len = strlen(str);
VSB_quote_pfx(vl->vsb, buf, str,
len > MAX_DUMP ? MAX_DUMP : len, VSB_QUOTE_UNSAFE);
len > MAX_DUMP ? MAX_DUMP : len,
VSB_QUOTE_UNSAFE | VSB_QUOTE_ESCHEX);
if (len > MAX_DUMP)
VSB_printf(vl->vsb, "%s [...] (%d)\n",
buf, len - MAX_DUMP);
Expand Down

0 comments on commit 63bb0b4

Please sign in to comment.