r4756 - trunk/varnish-cache/bin/varnishtest
phk at varnish-cache.org
phk at varnish-cache.org
Tue May 4 15:55:35 CEST 2010
Author: phk
Date: 2010-05-04 15:55:35 +0200 (Tue, 04 May 2010)
New Revision: 4756
Modified:
trunk/varnish-cache/bin/varnishtest/vtc_log.c
Log:
Only dump up to 512 bytes.
Modified: trunk/varnish-cache/bin/varnishtest/vtc_log.c
===================================================================
--- trunk/varnish-cache/bin/varnishtest/vtc_log.c 2010-05-03 11:49:15 UTC (rev 4755)
+++ trunk/varnish-cache/bin/varnishtest/vtc_log.c 2010-05-04 13:55:35 UTC (rev 4756)
@@ -172,6 +172,7 @@
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 @@
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);
More information about the varnish-commit
mailing list