You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by ma...@ratp.fr on 2004/11/26 15:41:27 UTC
Trouble with Loglevel and log generation
Hi everyone,
I have trouble with the LogLevel parameter in Apache Configuration and
generation of undesired log entries.
More precisely, if I set (for example) the LogLevel to "error", I only get
error and more critical logs AND also "notice" logs (but not warn logs).
If I set to anything more critical than notice, I still get notice logs.
For more details :
Some versions :
Red Hat Entreprise Linux 3
Apache 2.0.46 (rpm : 2.0.46-44.ent)
Mod_perl 1.99_09 (rpm : 1.99_09-10.ent)
I'm using a PerlTransHandler module in a SSL-enabled VirtualHost.
My module code begins with the following :
--------- Code Extract
sub handler {
my $r = shift;
$rlog = $r->log ;
$r->handler("perl-script"); #ok, let's do it
$r->push_handlers(PerlHandler => \&proxy_handler);
return OK;
}
sub proxy_handler {
#my($r)= @_;
my $r = shift;
$rlog = $r->log ;
[snip]
$rlog->notice("This message is always printed despite the
Loglevel\n");
$rlog->error("This message is printed only if the Loglevel is error
or lower\n");
}
1
----------- End of code extract
Does somebody have an idea about this ?
Thanks in advance for any answer.
Sincerely yours, Mathieu MILLET.
--
Mathieu MILLET - RATP SIT/IST/EPR
mailto:mathieu.millet@ratp.fr
----
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html
Re: Trouble with Loglevel and log generation
Posted by Stas Bekman <st...@stason.org>.
Rici Lake wrote:
>
> On 26-Nov-04, at 11:14 AM, Stas Bekman wrote:
>
>> mathieu.millet@ratp.fr wrote:
>> [...]
>>
>>> More precisely, if I set (for example) the LogLevel to "error", I
>>> only get
>>> error and more critical logs AND also "notice" logs (but not warn logs).
>>
>>
>> I can reproduce that problem. I'll keep you posted when I get a chance
>> to debug it.
>>
>>> If I set to anything more critical than notice, I still get notice logs.
>>> For more details :
>>> Some versions : Red Hat Entreprise Linux 3
>>> Apache 2.0.46 (rpm : 2.0.46-44.ent)
>>> Mod_perl 1.99_09 (rpm : 1.99_09-10.ent)
>>
>>
>> Unrelated, you are using very old versions of component. Please
>> consider upgrading to mp 1.99_17 and Apache 2.0.52. (though I can
>> still see the problem with the latest ones)
>
>
> This behaviour, although not well documented, is by design. Notice logs
> are (apparently) supposed to be used for startup messages and are never
> masked *unless* you set the error log to use syslog.
>
> You can see this behaviour clearly in httpd/server/log.c, line 375
Thanks Rici, I'll document that.
--
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html
Re: Trouble with Loglevel and log generation
Posted by Rici Lake <ri...@ricilake.net>.
On 26-Nov-04, at 11:14 AM, Stas Bekman wrote:
> mathieu.millet@ratp.fr wrote:
> [...]
>> More precisely, if I set (for example) the LogLevel to "error", I
>> only get
>> error and more critical logs AND also "notice" logs (but not warn
>> logs).
>
> I can reproduce that problem. I'll keep you posted when I get a chance
> to debug it.
>
>> If I set to anything more critical than notice, I still get notice
>> logs.
>> For more details :
>> Some versions : Red Hat Entreprise Linux 3
>> Apache 2.0.46 (rpm : 2.0.46-44.ent)
>> Mod_perl 1.99_09 (rpm : 1.99_09-10.ent)
>
> Unrelated, you are using very old versions of component. Please
> consider upgrading to mp 1.99_17 and Apache 2.0.52. (though I can
> still see the problem with the latest ones)
This behaviour, although not well documented, is by design. Notice logs
are (apparently) supposed to be used for startup messages and are never
masked *unless* you set the error log to use syslog.
You can see this behaviour clearly in httpd/server/log.c, line 375
R.
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html
Re: Trouble with Loglevel and log generation
Posted by Stas Bekman <st...@stason.org>.
mathieu.millet@ratp.fr wrote:
[...]
> More precisely, if I set (for example) the LogLevel to "error", I only get
> error and more critical logs AND also "notice" logs (but not warn logs).
I can reproduce that problem. I'll keep you posted when I get a chance to
debug it.
> If I set to anything more critical than notice, I still get notice logs.
>
> For more details :
>
> Some versions :
> Red Hat Entreprise Linux 3
> Apache 2.0.46 (rpm : 2.0.46-44.ent)
> Mod_perl 1.99_09 (rpm : 1.99_09-10.ent)
Unrelated, you are using very old versions of component. Please consider
upgrading to mp 1.99_17 and Apache 2.0.52. (though I can still see the
problem with the latest ones)
--
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html