Tollef Fog Heen's blog

tfheen Wed, 17 Dec 2008 - varnishlog's poor man's filtering language

Currently, varnishlog does not support very advanced filtering. If you run it with -o, you can also do a regular expression match on tag

While in Brazil, I needed something a bit more expressive. I needed something that would tell me if I had vcl_recv call pass and the URL ended in .jpg.

varnishlog -o -c | perl -ne 'BEGIN { $/ = "";} print if
(/RxURL.*jpg$/m and /VCL_call.*recv pass/);'

fixed this for me.

[10:14] | varnish | varnishlog's poor man's filtering language

Tollef Fog Heen <tfheen@err.no>