You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Michael Michalowski <mi...@interred.de> on 2004/03/03 21:21:41 UTC

Re[2]: [users@httpd] difference of piped logs in Apache 1.3x and 2.x

JS> Michael Michalowski wrote:
>> So, here is an example which worked in Apache 1.3x:
>> 
>> CustomLog "| program1 | program2" format
>> 
>> It gives the logstream to the first program "program1" and this
>> programm pipes it's output to the second program "program2". This
>> definitely worked in Apache 1.3x, but an Apache 2 makes '| program2'
>> to a simple parameter list of program1 (no more shell interpolation).

JS> Yes, I have seen other similar reports about not having a full shell on 
JS> the piped loggers in apache 2.  I have some recollection of this being 
JS> fixed at some point, but I'm not sure.

Any idea, where I can find these reports? I searched the inet before I
postet to this mailinglist and found nothing. I also scanned the
apache changes-file for fixes, but nothing found.

JS> In any case, you can always create a small shell script that simply does
JS> #!/bin/sh
JS> program1 | program2

JS> and call that shell script as your piped logger.

yes, I thought about this solution too, but it's not the same. If I
use a shell skript, I have to read the STDIN and start the pipe
process for each log line. This is not the same behaviour, as piping
the whole log stream.

best regards,
Michael Michalowski



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


Re: [users@httpd] difference of piped logs in Apache 1.3x and 2.x

Posted by Joshua Slive <jo...@slive.ca>.

Michael Michalowski wrote:
> JS> Yes, I have seen other similar reports about not having a full shell on 
> JS> the piped loggers in apache 2.  I have some recollection of this being 
> JS> fixed at some point, but I'm not sure.
> 
> Any idea, where I can find these reports? I searched the inet before I
> postet to this mailinglist and found nothing. I also scanned the
> apache changes-file for fixes, but nothing found.

Sorry.  I looked around a little in the bug database, but couldn't find 
a reference.

> 
> JS> In any case, you can always create a small shell script that simply does
> JS> #!/bin/sh
> JS> program1 | program2
> 
> JS> and call that shell script as your piped logger.
> 
> yes, I thought about this solution too, but it's not the same. If I
> use a shell skript, I have to read the STDIN and start the pipe
> process for each log line. This is not the same behaviour, as piping
> the whole log stream.

I don't believe that is true.  Apache should pipe log lines through the 
shell script just as it does for any other piped log program.

You might even be able to get away with
CustomLog "/bin/sh program1 | program2" ...

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: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org