Logging for multiple sites

Dag-Erling Smørgrav des at des.no
Wed Nov 26 18:41:56 CET 2008


Marcus Smith <marcussmith at britarch.ac.uk> writes:
> 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.

No, -r can only read binary log files that were previously written with
-w, and you can't use -w with -o.  Both varnishlog and varnishncsa could
use some attention: the former to support combining -w with -o, and the
latter to support request filtering.

DES
-- 
Dag-Erling Smørgrav - des at des.no



More information about the varnish-misc mailing list