You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Shibi NS <sh...@gmail.com> on 2009/11/15 19:02:11 UTC

[users@httpd] STDERR issue with Apache 2.0.4 under mod_perl

The configuration in httpd.conf look like this

<Perl>
    my $app_home     = $ENV{APPS_HOME};
    my $config            =
ConfigLoader::include("$app_home/conf/myapp.pl<http://ursforms.pl/>");

    my $elog               = '"| rotatelogs '. $config->{log_file} . '%y%m%d
1M "';
    $ErrorLog              = $elog ;
  </Perl>
Where the $config->{log_file}  is
/nfs/private/user/sns/log/myapps.myserver-44088.log

But when I checked up the fd 1 of my request process(i suppose this is
STDERR) it points to /nfs/private/user/sns/log/
ursforms.myserver-44088.log . Why so in httpd.conf i configured $ErrorLog to
a pipe and never configured STDERR  how  STDERR automatically picks up
/nfs/private/user/sns/log/myapps.myserver-44088.log for STDERR

--Shibi Ns--

Re: [users@httpd] STDERR issue with Apache 2.0.4 under mod_perl

Posted by Shibi NS <sh...@gmail.com>.
Thanks . Is there is any api/function for getting the current ErrorLog.

Shibi Ns

On Mon, Nov 16, 2009 at 7:37 PM, Tom Evans <te...@googlemail.com> wrote:

> On Sun, Nov 15, 2009 at 6:02 PM, Shibi NS <sh...@gmail.com> wrote:
>
>>
>> The configuration in httpd.conf look like this
>>
>> <Perl>
>>     my $app_home     = $ENV{APPS_HOME};
>>     my $config            = ConfigLoader::include("$app_home/conf/
>> myapp.pl <http://ursforms.pl/>");
>>     my $elog               = '"| rotatelogs '. $config->{log_file} .
>> '%y%m%d 1M "';
>>     $ErrorLog              = $elog ;
>>   </Perl>
>> Where the $config->{log_file}  is
>> /nfs/private/user/sns/log/myapps.myserver-44088.log
>>
>> But when I checked up the fd 1 of my request process(i suppose this is
>> STDERR) it points to /nfs/private/user/sns/log/
>> ursforms.myserver-44088.log . Why so in httpd.conf i configured $ErrorLog
>> to a pipe and never configured STDERR  how  STDERR automatically picks up
>> /nfs/private/user/sns/log/myapps.myserver-44088.log for STDERR
>>
>> --Shibi Ns--
>>
>
> stderr is connected to the error log in apache. If you configure the error
> log to be something else, apache connects stderr to your something else.
>
> See http://httpd.apache.org/docs/2.2/logs.html#errorlog
>
> Cheers
>
> Tom
>



-- 
--Shibi Ns--

Re: [users@httpd] STDERR issue with Apache 2.0.4 under mod_perl

Posted by Tom Evans <te...@googlemail.com>.
On Sun, Nov 15, 2009 at 6:02 PM, Shibi NS <sh...@gmail.com> wrote:

>
> The configuration in httpd.conf look like this
>
> <Perl>
>     my $app_home     = $ENV{APPS_HOME};
>     my $config            = ConfigLoader::include("$app_home/conf/myapp.pl<http://ursforms.pl/>");
>
>     my $elog               = '"| rotatelogs '. $config->{log_file} .
> '%y%m%d 1M "';
>     $ErrorLog              = $elog ;
>   </Perl>
> Where the $config->{log_file}  is
> /nfs/private/user/sns/log/myapps.myserver-44088.log
>
> But when I checked up the fd 1 of my request process(i suppose this is
> STDERR) it points to /nfs/private/user/sns/log/
> ursforms.myserver-44088.log . Why so in httpd.conf i configured $ErrorLog
> to a pipe and never configured STDERR  how  STDERR automatically picks up
> /nfs/private/user/sns/log/myapps.myserver-44088.log for STDERR
>
> --Shibi Ns--
>

stderr is connected to the error log in apache. If you configure the error
log to be something else, apache connects stderr to your something else.

See http://httpd.apache.org/docs/2.2/logs.html#errorlog

Cheers

Tom