<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(11,83,148)">Thank you Guillaume, this is OK but I'm having trouble with custom format in varnishncsa. I have it installed on Ubuntu 15.10.</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(11,83,148)"><br></div><div class="gmail_default" style=""><font color="#0b5394" face="verdana, sans-serif">To setup a custom format string I have edited /etc/systemd/system/varnishncsa.service to the following:</font></div><div class="gmail_default" style=""><div class="gmail_default" style=""><font color="#0b5394" face="verdana, sans-serif"><br></font></div><div class="gmail_default" style=""><font color="#0b5394" face="verdana, sans-serif">[Unit]</font></div><div class="gmail_default" style=""><font color="#0b5394" face="verdana, sans-serif">Description=Varnish HTTP accelerator log daemon</font></div><div class="gmail_default" style=""><font color="#0b5394" face="verdana, sans-serif">After=varnish.service</font></div><div class="gmail_default" style=""><font color="#0b5394" face="verdana, sans-serif"><br></font></div><div class="gmail_default" style=""><font color="#0b5394" face="verdana, sans-serif">[Service]</font></div><div class="gmail_default" style=""><font color="#0b5394" face="verdana, sans-serif">User=varnishlog</font></div><div class="gmail_default" style=""><font color="#0b5394" face="verdana, sans-serif">ExecStart=/usr/bin/varnishncsa -a -w /var/log/varnish/varnishncsa.log -F "%h %l %u"</font></div><div class="gmail_default" style=""><font color="#0b5394" face="verdana, sans-serif">ExecReload=/bin/kill -HUP $MAINPID</font></div><div class="gmail_default" style=""><font color="#0b5394" face="verdana, sans-serif"><br></font></div><div class="gmail_default" style=""><font color="#0b5394" face="verdana, sans-serif">[Install]</font></div><div class="gmail_default" style=""><font color="#0b5394" face="verdana, sans-serif">WantedBy=multi-user.target</font></div><div style="color:rgb(11,83,148);font-family:verdana,sans-serif;font-size:small"><br></div><div style="color:rgb(11,83,148);font-family:verdana,sans-serif;font-size:small">However if I try to use "-F" I get an error like </div><div style="color:rgb(11,83,148);font-family:verdana,sans-serif;font-size:small"><br></div><div style=""><font color="#0b5394" face="verdana, sans-serif">Job for varnishncsa.service failed because a configured resource limit was exceeded. See "systemctl status varnishncsa.service" and "journalctl -xe" for details.</font><br></div><div style=""><font color="#0b5394" face="verdana, sans-serif"><br></font></div><div style=""><font color="#0b5394" face="verdana, sans-serif">How can I use a cusom format string?</font></div><div style=""><font color="#0b5394" face="verdana, sans-serif"><br></font></div><div style=""><font color="#0b5394" face="verdana, sans-serif">Thanx,</font></div><div style=""><font color="#0b5394" face="verdana, sans-serif">Albert</font></div><div style=""><font color="#0b5394" face="verdana, sans-serif"><br></font></div></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(11,83,148)"><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 24, 2016 at 5:53 PM, Guillaume Quintard <span dir="ltr"><<a href="mailto:guillaume@varnish-software.com" target="_blank">guillaume@varnish-software.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">My bad, you don't need std.log at all (sorry, I was distracted)</p>
<p dir="ltr">It boils down to:</p>
<p dir="ltr">sub vcl_hit {<br>
set req.http.x-state = "HIT";<br>
}<br>
sub vcl_miss {<br>
set req.http.x-state = "MISS";<br>
}<br>
sub vcl_pass {<br>
set req.http.x-state = "PASS";<br>
}</p>
<p dir="ltr">And getting that x-state header in varnishncsa.</p>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div><span style="font-size:small;color:rgb(61,133,198);font-family:'trebuchet ms',sans-serif">Web: </span><a href="http://www.tollkuci.com/" style="font-size:small;font-family:'trebuchet ms',sans-serif" target="_blank">http://www.tollkuci.com</a><br></div><div><span style="color:rgb(61,133,198);font-family:'trebuchet ms',sans-serif;font-size:small">Follow me on: </span><a href="http://www.linkedin.com/in/alberttollkuci" style="font-family:Arial,Verdana,sans-serif;font-size:12px;margin:0px;padding:0px;color:rgb(31,162,225);text-decoration:none" target="_blank"><img alt="" height="24" src="http://www.tollkuci.com/blog/IMAGES%2f2014%2f02%2flinkedin_icon.png.jpgx" width="24" style="margin:2px;padding:0px;vertical-align:middle">LinkedIn</a> <a href="https://plus.google.com/+AlbertTollku%C3%A7i/posts" style="font-family:Arial,Verdana,sans-serif;font-size:12px;margin:0px;padding:0px;color:rgb(31,162,225);text-decoration:none" target="_blank"><img alt="" height="24" src="http://www.tollkuci.com/blog/IMAGES%2f2014%2f02%2fgoogleplus-icon.png.jpgx" width="24" style="margin:2px;padding:0px;vertical-align:middle">Google+</a> <a href="https://www.facebook.com/albert.tollkuci" style="font-family:Arial,Verdana,sans-serif;font-size:12px;margin:0px;padding:0px;color:rgb(31,162,225);text-decoration:none" target="_blank"><img alt="" height="24" src="http://www.tollkuci.com/blog/IMAGES%2f2014%2f02%2fFacebook_Icon.png.jpgx" width="24" style="margin:2px;padding:0px;vertical-align:middle">Facebook</a> <a href="https://twitter.com/AlbertTollkuci" style="font-family:Arial,Verdana,sans-serif;font-size:12px;margin:0px;padding:0px;color:rgb(31,162,225);text-decoration:none" target="_blank"><img alt="" height="24" src="http://www.tollkuci.com/blog/IMAGES%2f2014%2f02%2fTwitterIcon.png.jpgx" width="24" style="margin:2px;padding:0px;vertical-align:middle">Twitter</a> <a href="http://careers.stackoverflow.com/atollkuci" style="font-family:Arial,Verdana,sans-serif;font-size:12px;margin:0px;padding:0px;color:rgb(31,162,225);text-decoration:none" target="_blank"><img alt="" height="24" src="http://www.tollkuci.com/blog/IMAGES%2f2014%2f02%2fcareers-icon.png.jpgx" width="24" style="margin:2px;padding:0px;vertical-align:middle">Career 2.0</a></div><font style="font-family:'trebuchet ms',sans-serif;color:rgb(102,102,102)"><hr style="color:rgb(34,34,34);font-family:Arial,Verdana,sans-serif;font-size:12px"></font></div><br></div></div>
</div></div>