Catch "req.restarts" in logs

Dridi Boukelmoune dridi.boukelmoune at zenika.com
Thu Jun 5 08:02:53 CEST 2014


Hi Cédric,

If you want this information in varnishncsa, use std.log and catch it
with an extended variable in your format pattern (it's described in
the man).

Cheers,
Dridi

On Thu, Jun 5, 2014 at 7:41 AM, Cédric Jeanneret <varnish at tengu.ch> wrote:
> Hello,
>
> I'm wondering if there's a way to catch the req.restarts in the logs. We
> currently have a bloc telling Varnish the following:
>
> sub vcl_error {
> […]
>   if (obj.status >= 500 && obj.status <= 504 && req.restarts < 1) {
>     return(restart);
>   }
> […]
> }
>
> Is there a way to send the req.restarts in logs? I guess this would be
> done in the vcl_recv routine though, maybe through std.log()? How to
> catch it in varnishncsa?
>
> We're currently running varnish 3.0.5
>
> Thanks!
>
> Cheers,
>
> C.
>
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at varnish-cache.org
> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc



More information about the varnish-misc mailing list