You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Bastiaan van der Put <ba...@web4friends.com> on 2003/04/21 19:51:36 UTC

resolver apache 1.3.27 -> 2.0.45

Hi,

I am doing some tests to go from version 1.3.27 to 2.0.45
Allmost everything works fine except this command for resolving the logs :

CustomLog "|/usr/local/apache2/bin/logresolve >> 
/location_of_the_access_log" combined

It runs ok on apache 1.3.27, on 2.0.45 it gives :

piped log program '/usr/local/apache2/bin/logresolve >> 
/location_of_the_access_log' failed unexpectedly
Usage: logresolve [-s statfile] [-c] < input > output

Just copied the command from conf 1.3.27 -> conf 2.0.45

not sure if its a bug...running on linux

Greetings, Bas 


Re: resolver apache 1.3.27 -> 2.0.45

Posted by Bastiaan van der Put <ba...@web4friends.com>.
ok, works

thx

Bas
At 05:09 4/23/2003 -0400, you wrote:
>Bastiaan van der Put wrote:
>>Could use a script temporary for testing..
>>thx,
>>Bas
>
>This two-liner seems to do the trick:
>
>#!/bin/sh
>exec /path/to/bin/logresolve >>/tmp/lr.out
>


Re: resolver apache 1.3.27 -> 2.0.45

Posted by Jeff Trawick <tr...@attglobal.net>.
Bastiaan van der Put wrote:
> Could use a script temporary for testing..
> 
> thx,
> 
> Bas

This two-liner seems to do the trick:

#!/bin/sh
exec /path/to/bin/logresolve >>/tmp/lr.out


Re: resolver apache 1.3.27 -> 2.0.45

Posted by Bastiaan van der Put <ba...@web4friends.com>.
Could use a script temporary for testing..

thx,

Bas
At 16:07 4/21/2003 -0400, you wrote:
>Bastiaan van der Put wrote:
>>Hi,
>>I am doing some tests to go from version 1.3.27 to 2.0.45
>>Allmost everything works fine except this command for resolving the logs :
>>CustomLog "|/usr/local/apache2/bin/logresolve >> 
>>/location_of_the_access_log" combined
>>It runs ok on apache 1.3.27, on 2.0.45 it gives :
>>piped log program '/usr/local/apache2/bin/logresolve >> 
>>/location_of_the_access_log' failed unexpectedly
>>Usage: logresolve [-s statfile] [-c] < input > output
>
>It would appear to be a bug in 2.0!  Thanks for pointing this out.
>
>The ugly OS-specific code in 1.3 (which worked) was moved into a nice 
>abstraction in APR which supported more ways of running a program.  The 
>logging code neglected to tell APR to use the shell to run the piped 
>logger, so redirection doesn't currently work.  Clear as mud?
>
>Unfortunately, turning on the flag that tells APR to use the shell doesn't 
>bring happiness yet.  My initial reaction is that APR needs some tweaking 
>as well.
>
>Stay tuned.
>
>I suspect that you could use a simple shell script as a work-around. Tell 
>Apache to use the shell script as the piped logger, and have the shell 
>script invoke logresolve using redirected stdout.
>


Re: resolver apache 1.3.27 -> 2.0.45

Posted by Jeff Trawick <tr...@attglobal.net>.
Bastiaan van der Put wrote:
> Hi,
> 
> I am doing some tests to go from version 1.3.27 to 2.0.45
> Allmost everything works fine except this command for resolving the logs :
> 
> CustomLog "|/usr/local/apache2/bin/logresolve >> 
> /location_of_the_access_log" combined
> 
> It runs ok on apache 1.3.27, on 2.0.45 it gives :
> 
> piped log program '/usr/local/apache2/bin/logresolve >> 
> /location_of_the_access_log' failed unexpectedly
> Usage: logresolve [-s statfile] [-c] < input > output

It would appear to be a bug in 2.0!  Thanks for pointing this out.

The ugly OS-specific code in 1.3 (which worked) was moved into a nice 
abstraction in APR which supported more ways of running a program.  The 
logging code neglected to tell APR to use the shell to run the piped 
logger, so redirection doesn't currently work.  Clear as mud?

Unfortunately, turning on the flag that tells APR to use the shell 
doesn't bring happiness yet.  My initial reaction is that APR needs some 
tweaking as well.

Stay tuned.

I suspect that you could use a simple shell script as a work-around. 
Tell Apache to use the shell script as the piped logger, and have the 
shell script invoke logresolve using redirected stdout.