You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Dave Morrow <da...@autodata.net> on 2006/04/13 15:57:49 UTC

[users@httpd] CustomLog Help ? Somebody?

Hi all.  
 
I have an issue which, I am sure someone out there has encountered in
the past.  
 
I have a website, whose authors have written some of the URLs in a
format which contains characters which are not well liked by my log
analysis tools (Deepmetrix Livestats).
 
I would like to simply strip off the bad characters using a CustomLog
directive by piping to sed and then piping to rotatelogs, but cannot
seem to make it work.
 
CustomLog "|/bin/sed 's/;variable/?variable' | /usr/sbin/rotatelogs
/etc/httpd/logs/mysite.%Y-%m-%d-%H_%M_%S 5M" combined
 
The result is the entire line not getting logged.
 
Any help would be greatly appreciated.
 
David Morrow
Technical Systems Lead
Autodata Solutions Company
David.Morrow@Autodata.net
http://www.autodatasolutions.com <http://www.autodatasolutions.com/> 
 
Tel: (519) 963-3020
Fax: (519) 451-6615
 
< Lead, follow or get out of the way! >
 
This message has originated from Autodata Solutions. The attached
material is the Confidential and Proprietary Information of Autodata
Solutions. This email and any files transmitted with it are confidential
and intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please delete
this message and notify the Autodata system administrator at
Administrator@autodata.net <mailto:Administrator@autodata.net
<ma...@autodata.net> >

 

[users@httpd] Re: CustomLog Help ? Somebody?

Posted by Joost de Heer <sa...@xs4all.nl>.
> CustomLog "|/bin/sed 's/;variable/?variable' | /usr/sbin/rotatelogs
> /etc/httpd/logs/mysite.%Y-%m-%d-%H_%M_%S 5M" combined

- Instead of writing to a sed pipe, parsing the logfile before sending it
to Livestats is much better IMO.
- Does this command run fine from the command line? I.e. does 'echo
some_string|/bin/sed 's/;variable/?variable' | /usr/sbin/rotatelogs
/etc/httpd/logs/mysite.%Y-%m-%d-%H_%M_%S 5M' work fine?

Joost


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org