Home > Archive > Slony1 PostgreSQL Replication > August 2005 > Re: Re: Slony log rotation









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: Re: Slony log rotation
Scott Marlowe

2005-08-22, 8:25 pm

On Sat, 2005-08-13 at 13:08, Mischa Sandberg wrote:
> Message-ID: <1123877471.5149.35.camel- cqFLHhBanuCnJLXTTsSY
+Q@public.gmane.org>


> Since you're happy with logging by redirecting output to a file, I'll
> assume the following is acceptable ...
>
> If you want, you can implement log rotation with a one-line shell
> script. Something like this (I have no Unix box at the moment to test
> this first, so bear with me on typos):
>
> $ (slon ... | while read; do echo $REPLY >mylog.$(date +%W); done) &
>
> (If I recall correctly, "date +%W" returns the day-of-the-week. Choose
> your granularity and cycle as you will; a new log every hour, for the
> last 30 days.
> slon doesn't log so much stuff (at -d0) that opening a file per line is
> a real kill. If you feel that's a concern, post again, and I'll post a
> small "C" program that does the rotation.


Note that apaches log rotator should work too, and I've been using it to
rotate postgresql logs for quite some time. Dirt simple, fast, and easy
to configure.
Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com