[Spread-users] Updated error_log_spread.pl for mod_log_spread
Rob Bloodgood
rob at exitexchange.com
Thu Aug 23 22:36:01 EDT 2007
I found that error_log_spread.pl in the mod_log_spread distribution
(1.0.4), dated 2000, needed a little work.
When I tried it, it turned out my spread-based error_log lacked
newlines. (?)
Since I speak perl, I looked and this was a simple fix, one line.
So while I was at it, I added a small feature: -h will already include
the hostname that sent the message in the log message. I added -a to
include (instead) the _short_ hostname, eg www1 instead of
www1.myfullyqualifieddommainname.com.
This works *great* in production, and I have this apache ErrorLog directive:
ErrorLog "|/usr/local/bin/error_log_spread.pl -a -h -g www_error_log"
This gives me log entries like (sorry if it wraps):
www1 [Thu Aug 23 19:26:45 2007] [error] [client ###.###.###.###] File
does not exist: /var/www/_vti_bin/owssvr.dll
Attached is a diff.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: error_log_spread.diff
Url: http://lists.spread.org/pipermail/spread-users/attachments/20070823/73a1e8b2/attachment.pl
More information about the Spread-users
mailing list