Logging for multiple sites
Marcus Smith
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
something like:
varnishlog -c -o RxHeader "Host: (www\.)?example1\.com" >
/path/to/logs/example1.log &
varnishlog -c -o RxHeader "Host: (www\.)?example2\.com" >
/path/to/logs/example2.log &
...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.
Many thanks,
Marcus
--
Marcus Smith
Information Officer
The Council for British Archaeology
More information about the varnish-misc
mailing list