Selective logging

Andrew Kelly akelly at snafu.de
Thu May 19 11:47:38 CEST 2016


Viktor, Dridi,

Thank you both for your tips, much appreciated.

Passing a query filter to varnishncsa from the command
line seems to work like a charm. But I can't seem to 
make it work from the init script. The shell seems to
choke on the various quoted bits, no matter how things
get escaped. Not a worry, though, I'm happy to use my
own scripts to start things.

Andy


On Mi, 2016-05-18 at 16:54 +0200, Viktor Gunnarson wrote:
> Hi,
> 
> You can easily add a VSL query to your varnishncsa to filter what get
> logged like this:
> 
>         varnishncsa -q 'reqHeader:host !~ "foo.com"'
> At least on Varnish 4 and 4.1, not sure about Varnish 3...
> 
> Best regards,
> Viktor
> 
> On 18/05/16 14:22, Andrew Kelly wrote:
> 
> > Hi all,
> > 
> > I've just run into an issue where somebody out there has
> > a domain pointing at an IP address on one of my servers
> > where Varnish is listening. It's a fairly new server, so 
> > this is probably an old entry that got orphaned or something.
> > No big deal, I'm sure we'll get it cleared up.
> > 
> > But in the mean time, it's filling my varnishncsa.log with
> > false entries. Is there any way to selectively NOT log
> > certain traffic?
> > 
> > Many thanks in advance,
> > 
> > Andy
> > 
> > 
> > _______________________________________________
> > varnish-misc mailing list
> > varnish-misc at varnish-cache.org
> > https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
> 
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at varnish-cache.org
> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc





More information about the varnish-misc mailing list