logging errors in varnish 4

Jason Price japrice at gmail.com
Tue Aug 4 00:16:17 CEST 2015


In varnish 3, I did the following to log odd errors to syslog:

        std.syslog((3*8)+5, "returning backend error page. client.ip is " +
client.ip +
               " req.xid is " + req.xid +
               " req.url is " + req.url +
               " original url is " + req.http.originalurl +
               " beresp.status is " + beresp.status);

In varnish 4, vcl_backend_error does not have access to client.* or req.*,
making this problematic at best.

The 'go to' solution seems to be an external log monitor... a daemonized
version of varnishlog which filters out stuff like this.  Certainly doable,
but this feels like a poor solution, compared with the above.

Am I missing something?

-Jason
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20150803/e2a20904/attachment.html>


More information about the varnish-misc mailing list