<div dir="ltr"><div>Thank you.  This can work.<br><br></div>(yes, syslog is slow.  It's only triggered for certain kinds of errors)<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Aug 4, 2015 at 1:59 AM, Andreas Plesner <span dir="ltr"><<a href="mailto:apj@mutt.dk" target="_blank">apj@mutt.dk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Mon, Aug 03, 2015 at 06:16:17PM -0400, Jason Price wrote:<br>
<br>
> In varnish 3, I did the following to log odd errors to syslog:<br>
><br>
>         std.syslog((3*8)+5, "returning backend error page. client.ip is " +<br>
> client.ip +<br>
>                " req.xid is " + req.xid +<br>
</span>[...]<br>
> Am I missing something?<br>
<br>
You're right that client is not accessible in backend functions (for IMS there<br>
may not even be a client), however bereq.* should be a fine replacement for<br>
req.*.<br>
You could also just put the log in the client side of things, i.e. in<br>
vcl_deliver, where you have access to req.* and client.*<br>
<br>
Also, syslog is a poor choice performance-wise. The correct solution is, and<br>
has always been, to monitor the shared memory log.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Andreas<br>
<br>
_______________________________________________<br>
varnish-misc mailing list<br>
<a href="mailto:varnish-misc@varnish-cache.org">varnish-misc@varnish-cache.org</a><br>
<a href="https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc" rel="noreferrer" target="_blank">https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc</a><br>
</font></span></blockquote></div><br></div>