Patch adding more Apache LogFormat support to varnishncsa ( based on previous patch )

Javier Frias jfrias at gmail.com
Tue Oct 27 18:42:14 CET 2009


Figured some people will find this useful, until varnishncsa gets full
LogFormat support.

I've expanded Emil Isberg's initial path on the following items:

List of what I added/fixed:

- Fixed segfault in %s,%>s, when these where not found in shmlog
- Fixed segfault in %{VarnishR}i, when df_H, Protocol version, was not
found, http defaults to HTTP/1.0
- Added %D, ( proc_time + xmit_time ) in microseconds
- Added $T, same as above, but in seconds
- Added %V, faked as %{Host}i ( different meaning in apache, but usually
meant as vhost )
- Added %{Age}i, age of object being served. Quite useful, as you can graph
things like average age of served pages, cache hit ratios, etc etc.

I attach a diff against stock 2.0.4 varnish, I've tested this against
several multi-gigabyte varnish native logs, as well as have it run for a few
days now, with no issues.

-Javier
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-dev/attachments/20091027/f4ead28b/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: varnishncsa-logformat-newfullpatch.diff
Type: text/x-patch
Size: 9305 bytes
Desc: not available
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-dev/attachments/20091027/f4ead28b/attachment-0003.bin>


More information about the varnish-dev mailing list