You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "Corey M. Ellis" <co...@comcast.net> on 2002/09/27 21:32:27 UTC

[users@httpd] CustomLog script won't write to the log

Hi,
 
I wrote a script that I want to use to filter the logs before they are
written.
 
CustomLog “|/tmp/apacheLogFilter.pl >> /usr/local/apache/access_log”
combined
 
When I use this script the output won’t write to the log, all my print
statements in the script are to STDOUT which I thought should get
redirected to the file because of the >>.
 
Also when I test it 
 
./apacheLogGenerator | ./apacheLogFilter >> /tmp/access_log
 
I get the same behavior, the generator script just reads an old apache
log file and prints it to STDOUT, so I can simulate the logs coming in
on STDIN
 
I tried to add the $|=0;  thinking the buffer is not flushing, but still
I can’t get output in the log.  When I remove the >> /tmp/access_log,
and just let it print to STDOUT it works:
 
./apacheLogGenerator | ./apacheLogFilter
 
I see all lines that I want written to the logfile, I see it on STDOUT
 
Can someone tell me why this behavior is happening, and how to fix it.
Any ideas are greatly appreciated.
 
Thanks in advance
 
 
 
=======================================
Corey M. Ellis
Senior Network Engineer, Comverse ICD
11 Broadway Ste 365, New York, NY 10004
Office: 212.809.2002 x16
Mobile: 856.278.0550
Fax:    212.809.2092
Email: corey.ellis@comverse.com
=======================================
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.391 / Virus Database: 222 - Release Date: 9/19/2002