[master] a0db44f Don't abbreviate panic message output.
Poul-Henning Kamp
phk at varnish-cache.org
Mon Oct 31 09:09:16 CET 2011
commit a0db44fdc2ea7b361dce9f17e54a3233ab1886ca
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Mon Oct 31 08:09:01 2011 +0000
Don't abbreviate panic message output.
diff --git a/bin/varnishtest/vtc_log.c b/bin/varnishtest/vtc_log.c
index 651bd89..57fa27a 100644
--- a/bin/varnishtest/vtc_log.c
+++ b/bin/varnishtest/vtc_log.c
@@ -164,7 +164,7 @@ vtc_log(struct vtclog *vl, int lvl, const char *fmt, ...)
void
vtc_dump(struct vtclog *vl, int lvl, const char *pfx, const char *str, int len)
{
- int nl = 1;
+ int nl = 1, olen;
unsigned l;
double tx;
@@ -181,10 +181,11 @@ vtc_dump(struct vtclog *vl, int lvl, const char *pfx, const char *str, int len)
VSB_printf(vl->vsb, "%s %-4s %4.1f %s(null)\n",
lead[lvl], vl->id, tx, pfx);
else {
- if (len == -1)
+ olen = len;
+ if (len < 0)
len = strlen(str);
for (l = 0; l < len; l++, str++) {
- if (l > 512) {
+ if (l > 512 && olen != -2) {
VSB_printf(vl->vsb, "...");
break;
}
diff --git a/bin/varnishtest/vtc_varnish.c b/bin/varnishtest/vtc_varnish.c
index 87b9423..cf1742d 100644
--- a/bin/varnishtest/vtc_varnish.c
+++ b/bin/varnishtest/vtc_varnish.c
@@ -316,7 +316,7 @@ varnish_thread(void *priv)
if (i <= 0)
break;
buf[i] = '\0';
- vtc_dump(v->vl, 3, "debug", buf, -1);
+ vtc_dump(v->vl, 3, "debug", buf, -2);
}
return (NULL);
}
More information about the varnish-commit
mailing list