You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Martin Langhoff <ma...@gmail.com> on 2013/09/14 17:07:15 UTC

[users@httpd] compresslog: pipe log through gzip without the headaches

[ Using piped logs with gzip is rather painful. Here is what I came up
with to improve the "user experience". Getting the scripts right so
that no data was lost in normal operation is non-trivial, so I thought
I'd share. ]

=compresslog README=

Save a ton of disk IO (or SAN traffic) in your webserver setups, not
losing any log entries and retaining ease of debugging and
diagnostics.

Piped logs to gzip unfortunately loses significant amounts of log data upon stop
and restart; and prevents use of tail, which complicates diagnostics
of live systems.

With compresslog:

 * Use piped logs to compress your Apache logs with zlib compression.
 * Resulting files are valid gzip files.
 * The compression process adds significant buffering.
 * Buffering does not lose data in the event of stops and restarts.
 * Includes ztail utility -- equivalent to tail -n 10 -f yourlog
   which flushes buffers appropriately.

Find it at:

  http://repo.or.cz/w/compresslog.git/

Patches, comments and beers welcome.

cheers,



m
ps: I am subscribed to digest -- please CC me in replies :-)
--
 martin.langhoff@gmail.com
 -  ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 ~ http://docs.moodle.org/en/User:Martin_Langhoff

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org