[master] aab5dda more details to fetcherror

Nils Goroll nils.goroll at uplex.de
Tue Apr 3 09:33:13 UTC 2018


commit aab5dda67d83bf0f4999e1718aaedbb810c1ead7
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Sun Apr 1 14:45:34 2018 +0200

    more details to fetcherror
    
    Ref #2622

diff --git a/bin/varnishd/cache/cache_backend.c b/bin/varnishd/cache/cache_backend.c
index 392baba..acef648 100644
--- a/bin/varnishd/cache/cache_backend.c
+++ b/bin/varnishd/cache/cache_backend.c
@@ -33,6 +33,7 @@
 #include "config.h"
 
 #include <stdlib.h>
+#include <errno.h>
 
 #include "cache_varnishd.h"
 
@@ -116,7 +117,8 @@ vbe_dir_getfd(struct worker *wrk, struct backend *bp, struct busyobj *bo,
 	pfd = VTP_Get(bp->tcp_pool, tmod, wrk, force_fresh);
 	if (pfd == NULL) {
 		VSLb(bo->vsl, SLT_FetchError,
-		     "backend %s: fail", bp->director->display_name);
+		     "backend %s: fail errno %d (%s)",
+		     bp->director->display_name, errno, strerror(errno));
 		// XXX: Per backend stats ?
 		VSC_C_main->backend_fail++;
 		bo->htc = NULL;


More information about the varnish-commit mailing list