Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][tlug] Re: Apache: Logging: how-to pipe logs or log toanothermachine (was Disk
- Date: Sun, 8 Sep 2002 18:17:04 +0200
- From: Tobias Diedrich <td@example.com>
- Subject: [tlug] Re: Apache: Logging: how-to pipe logs or log toanothermachine (was Disk
- References: <F59z02H67yRLVbNDN4C00000100@example.com>
- User-agent: Mutt/1.4i
Jean-Christian Imbeault wrote: > I was hoping to have apache logs be compressed "on-the-fly" as they were > being written to disk. I.e. as apache is appending to it's log file have > the entries are zipped before being added to the log file. > > I guess it just isn't possible? It would be possible, but it isn't feasible to gzip single log entries. (Which such a directive would do I assume) However, you could do something along the lines of this, which would yield usable compression factors: mkfifo /var/log/apachelog.fifo (while [ ! -f /tmp/stop_apachelog ]; do cat /var/log/apache.fifo; done; rm -f /tmp/stop_apachelog) | gzip -c > /var/log/apachelog.gz Now when you want to rotate the logfile, you create /tmp/stop_apachelog, wait until it no longer exists, rotate the gzipped logfile and restart... -- Tobias PGP: 0x9AC7E0BC This mail is made of 100% recycled bits Now playing: iwasuinoriyuki (IWADARE Noriyuki) - Lucia vs. ZopharAttachment: pgp00092.pgp
Description: PGP signature
- References:
- Re: [tlug] Apache: Logging: how-to pipe logs or log toanothermachine (was Disk
- From: Jean-Christian Imbeault
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] KMail and kinput2
- Next by Date: [tlug] Re: KMail and kinput2
- Previous by thread: Re: [tlug] Apache: Logging: how-to pipe logs or log toanothermachine (was Disk
- Next by thread: Re: [tlug] Apache: Logging: how-to pipe logs or log to another machine (was Disk
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links