[3.0] 21335dc Don't abbreviate panic message output.

Tollef Fog Heen tfheen at varnish-cache.org
Mon Apr 16 10:20:34 CEST 2012


commit 21335dcd3390af13634da92f78dcd4f9ccc48083
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 f63a9d8..a126b48 100644
--- a/bin/varnishtest/vtc_log.c
+++ b/bin/varnishtest/vtc_log.c
@@ -169,7 +169,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;
 
@@ -186,10 +186,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 6871b5f..dec9754 100644
--- a/bin/varnishtest/vtc_varnish.c
+++ b/bin/varnishtest/vtc_varnish.c
@@ -319,7 +319,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