How to rotate varnish log files with cronolog?

2009-02-24 Thread
Does Varnish support cronolog? I have searched over Google and the
archived maillist for a whole day, but find nothing useful. My Varnish
is the lastest 2.0.3.

I have tried this:

/opt/varnish203/bin/varnishncsa -a -w |/usr/bin/cronolog
/logs/mysite_access_%Y%m%d.log
/opt/varnish203/bin/varnishncsa: option requires an argument -- w
usage: varnishncsa [-bCcd] [-i tag] [-I regexp] [-k keep] [-r file]
[-s skip] [-X regexp] [-x tag] [-aDV] [-n varnish_name] [-P file] [-w
file]


Thanks in advance for any help,

Louis
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: How to rotate varnish log files with cronolog?

2009-02-26 Thread
It works. thank you, it really help me out!

On Tue, Feb 24, 2009 at 7:25 PM, Tollef Fog Heen
tfh...@redpill-linpro.com wrote:

 ]] 刘开玄

 | Does Varnish support cronolog? I have searched over Google and the
 | archived maillist for a whole day, but find nothing useful. My Varnish
 | is the lastest 2.0.3.

 I'm not sure how cronolog works, but it seems like it takes log files
 from stdin and handles the rotation automatically.

 Just use /opt/varnish203/bin/varnishncsa |/usr/bin/cronolog 
 /logs/mysite_access_%Y%m%d.log
 and you should be fine.

 --
 Tollef Fog Heen
 Redpill Linpro -- Changing the game!
 t: +47 21 54 41 73
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc