W3C like format logging

Albert Tollkuçi albert.tollkuci at gmail.com
Wed May 25 17:35:43 CEST 2016


Thank you Guillaume, this is OK but I'm having trouble with custom format
in varnishncsa. I have it installed on Ubuntu 15.10.

To setup a custom format string I have edited
/etc/systemd/system/varnishncsa.service to the following:

[Unit]
Description=Varnish HTTP accelerator log daemon
After=varnish.service

[Service]
User=varnishlog
ExecStart=/usr/bin/varnishncsa -a -w /var/log/varnish/varnishncsa.log -F
"%h %l %u"
ExecReload=/bin/kill -HUP $MAINPID

[Install]
WantedBy=multi-user.target

However if I try to use "-F" I get an error like

Job for varnishncsa.service failed because a configured resource limit was
exceeded. See "systemctl status varnishncsa.service" and "journalctl -xe"
for details.

How can I use a cusom format string?

Thanx,
Albert



On Tue, May 24, 2016 at 5:53 PM, Guillaume Quintard <
guillaume at varnish-software.com> wrote:

> My bad, you don't need std.log at all (sorry, I was distracted)
>
> It boils down to:
>
> sub vcl_hit {
> set req.http.x-state = "HIT";
> }
> sub vcl_miss {
> set req.http.x-state = "MISS";
> }
> sub vcl_pass {
> set req.http.x-state = "PASS";
> }
>
> And getting that x-state header in varnishncsa.
>



-- 
Web: http://www.tollkuci.com
Follow me on: LinkedIn <http://www.linkedin.com/in/alberttollkuci> Google+
<https://plus.google.com/+AlbertTollku%C3%A7i/posts> Facebook
<https://www.facebook.com/albert.tollkuci> Twitter
<https://twitter.com/AlbertTollkuci> Career 2.0
<http://careers.stackoverflow.com/atollkuci>
------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20160525/13836731/attachment.html>


More information about the varnish-misc mailing list