Catch "req.restarts" in logs

Cédric Jeanneret varnish at tengu.ch
Thu Jun 5 07:41:25 CEST 2014


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.



More information about the varnish-misc mailing list