httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Langhoff <martin.langh...@gmail.com>
Subject [users@httpd] compresslog: pipe log through gzip without the headaches
Date Sat, 14 Sep 2013 15:07:15 GMT
[ 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


Mime
View raw message