Logging for multiple sites
marcussmith at britarch.ac.uk
Wed Nov 26 16:25:07 CET 2008
Dag-Erling Smørgrav wrote:
> Actually varnishncsa uses the same log filtering / selection code as
> varnishlog, which *can* select requests based on URL. Extending
> varnishncsa to do the same should not be too hard.
> Other issues with varnishncsa / varnishlog: varnishlog doesn't allow -o
> and -w to be used at the same time. There is no reason why it
> shouldn't. If it did, you could play tricks like this:
> varnishlog -w /dev/stdout -c -o RxURL foo | varnishncsa -r /dev/stdin
Ah, I see! Hmmm.
Well in that case, is there any reason why I shouldn't simply do
varnishlog -c -o RxHeader "Host: (www\.)?example1\.com" >
varnishlog -c -o RxHeader "Host: (www\.)?example2\.com" >
...etc for each site, logging each to a separate varnish log file?
I could then use varnishncsa's '-r' option to convert them into NCSA
format once the logs are rotated out. It seems like that would do
pretty much what I want.
The Council for British Archaeology
More information about the varnish-misc