Logging for multiple sites

David (Kitai) Cruz cidcampeador at gmail.com
Wed Nov 26 17:09:04 CET 2008


So, if i've got 900 domains, do i have to start 900 varnishlog processes?

Interesting....:;-)

Kitai


2008/11/26 Marcus Smith <marcussmith at britarch.ac.uk>:
> 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
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at projects.linpro.no
> http://projects.linpro.no/mailman/listinfo/varnish-misc
>



More information about the varnish-misc mailing list