Logging for multiple sites
Dag-Erling Smørgrav
des at des.no
Wed Nov 26 15:12:44 CET 2008
Marcus Smith <marcussmith at britarch.ac.uk> writes:
> So you mean set varnishncsa to output everything to one log file (or
> pipe), and then use something like sed or perl to split the log by
> domain? If that's really the best way, then that's fine by me. I was
> just hoping there might be a way of writing to separate log files from
> the start, rather than chopping them up after the fact.
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
DES
--
Dag-Erling Smørgrav - des at des.no
More information about the varnish-misc
mailing list