Commit 7549b68f authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Only dump up to 512 bytes.



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@4756 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 966b4bf2
......@@ -172,6 +172,7 @@ void
vtc_dump(struct vtclog *vl, unsigned lvl, const char *pfx, const char *str)
{
int nl = 1;
unsigned l;
CHECK_OBJ_NOTNULL(vl, VTCLOG_MAGIC);
assert(lvl < NLEAD);
......@@ -183,7 +184,12 @@ vtc_dump(struct vtclog *vl, unsigned lvl, const char *pfx, const char *str)
vsb_printf(vl->vsb, "%s %-4s %s(null)\n",
lead[lvl], vl->id, pfx);
else
l = 0;
for(; *str != '\0'; str++) {
if (++l > 512) {
vsb_printf(vl->vsb, "...");
break;
}
if (nl) {
vsb_printf(vl->vsb, "%s %-4s %s| ",
lead[lvl], vl->id, pfx);
......
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