On 8/16/06, Tim Wood <[EMAIL PROTECTED]> wrote:
Hi,
I'm trying to pipe my Apache 2.0.54 logs to a script, but never seem
to get any logs sent through the pipe.
Apache starts my script (actually a python program) which runs fine
until it tries to read a log from stdin. At that point the script
hangs and never gets any input.
My script works correctly for other sources, ie: "cat access.log |
script.py" works correctly.
Also, I tried just piping apache logs to cat, ie:
CustomLog "|/bin/cat >> /var/log/apache2/test.log" common
I get this is my error.log:
piped log program ' /bin/cat >> /var/log/apache2/test.log' failed unexpectedly
/bin/cat: >>: No such file or directory
The piped log program must be an executable command with possible
arguments, not something that you would pass to the shell. So if you
made a shell script containing
#!/bin/sh
/bin/cat >> /bar/log/apache2/test.log
and then used the shell script as the target, you would have more luck.
Have you tried the python equivalent of a trivial program that simply
pipes the log entries to a file? What does it look like?
Joshua.
---------------------------------------------------------------------
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: [EMAIL PROTECTED]
" from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]