Re: [users@httpd] piped log not getting any stdin

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 8/16/06, Joshua Slive <joshua@xxxxxxxx> wrote:
On 8/16/06, Tim Wood <twwood@xxxxxxxxx> 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: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux