On 8/16/06, Joshua Slive <[EMAIL PROTECTED]> wrote:
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.
>
>
> 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 >> /var/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.

Good point on why straight out "cat" didn't work, but I just tried
using your mini cat script and that doesn't write anything to the log
either.

Thinking maybe python was causing me trouble, I also tried this perl script:
(copied from http://www.sudleyplace.com/pipederrorlogs.html)
-------------
#!/usr/bin/perl

$|=1; # Use unbuffered output
print while <STDIN>;
-------------
I don't get any output from that either.

Note that having apache write the logs directly works fine, it is only
a problem when I try to use a pipe.

Any other ideas?

---------------------------------------------------------------------
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]

Reply via email to