You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Swen Schillig <SC...@de.ibm.com> on 2003/05/08 13:59:19 UTC
Beginners question
Hi all
As said in the subject I'm just starting to use mod_perl.
My problem is that I can't see any information about the file and the line
numbers
printed into the log-file using the log_rerror, log_serror methods.
I'm using mod_perl-1.99_09 with Apache 2.0.45 !
So the code looks like this
package MyApache::Test01;
use Apache::Reload;
use Apache::Log;
sub handler{
my $r = shift;
my $s = $r->server;
$r->log_rerror(Apache::LOG_MARK,
Apache::LOG_DEBUG,APR::ENOTIME,
"REQ-ERROR with all parameters");
$s->log_serror(Apache::LOG_MARK, Apache::LOG_INFO,
APR::ENOTIME,
"SRV-ERROR with all parameters");
$r->log_rerror('','',Apache::LOG_DEBUG,0,
"REQ-ERROR with no parameters");
$s->log_serror('','',Apache::LOG_INFO,0,
"SRV-ERROR with no parameters");
$r->log_error("REQ-ERROR FLAT");
$s->log_error("SRV-ERROR FLAT");
}
1;
The dump in the log-file is
[Thu May 08 13:40:04 2003] [emerg] [client ::1] REQ-ERROR with all
parameters
[Thu May 08 13:40:04 2003] [emerg] SRV-ERROR with all parameters
[Thu May 08 13:40:04 2003] [emerg] [client ::1] REQ-ERROR with no
parameters
[Thu May 08 13:40:04 2003] [emerg] SRV-ERROR with no parameters
[Thu May 08 13:40:04 2003] [error] REQ-ERROR FLAT
[Thu May 08 13:40:04 2003] [error] SRV-ERROR FLAT
For the first two method calls I would have expected to see any information
about the file and the line in which the error occured
and something for APR::ENOTIME !
Oh, btw, the method Apache::LOG_MARK is returning decent values !
Am I doing something wrong here ? Or is there a special format I've to
setup for the Apache-Error-Logging ?
Any help would be appreciated !
Swen
Re: Beginners question
Posted by Stas Bekman <st...@stason.org>.
Swen Schillig wrote:
> Hi all
>
> As said in the subject I'm just starting to use mod_perl.
>
> My problem is that I can't see any information about the file and the line
> numbers
> printed into the log-file using the log_rerror, log_serror methods.
>
> I'm using mod_perl-1.99_09 with Apache 2.0.45 !
we need more specific information. Please always report bugs using the
following guidelines:
http://perl.apache.org/docs/2.0/user/help/help.html#Reporting_Problems
> So the code looks like this
> package MyApache::Test01;
>
> use Apache::Reload;
> use Apache::Log;
> sub handler{
> my $r = shift;
> my $s = $r->server;
>
> $r->log_rerror(Apache::LOG_MARK,
> Apache::LOG_DEBUG,APR::ENOTIME,
> "REQ-ERROR with all parameters");
>
> $s->log_serror(Apache::LOG_MARK, Apache::LOG_INFO,
> APR::ENOTIME,
> "SRV-ERROR with all parameters");
>
> $r->log_rerror('','',Apache::LOG_DEBUG,0,
> "REQ-ERROR with no parameters");
>
> $s->log_serror('','',Apache::LOG_INFO,0,
> "SRV-ERROR with no parameters");
>
> $r->log_error("REQ-ERROR FLAT");
>
> $s->log_error("SRV-ERROR FLAT");
> }
>
> 1;
>
> The dump in the log-file is
>
> [Thu May 08 13:40:04 2003] [emerg] [client ::1] REQ-ERROR with all
> parameters
> [Thu May 08 13:40:04 2003] [emerg] SRV-ERROR with all parameters
> [Thu May 08 13:40:04 2003] [emerg] [client ::1] REQ-ERROR with no
> parameters
> [Thu May 08 13:40:04 2003] [emerg] SRV-ERROR with no parameters
> [Thu May 08 13:40:04 2003] [error] REQ-ERROR FLAT
> [Thu May 08 13:40:04 2003] [error] SRV-ERROR FLAT
>
> For the first two method calls I would have expected to see any information
> about the file and the line in which the error occured
> and something for APR::ENOTIME !
> Oh, btw, the method Apache::LOG_MARK is returning decent values !
Not only that, but it reports [emerg] when it should be [debug], since you
said LOG_DEBUG
what happens when you run:
t/TEST -v api/aplog
do you get the right logging?
__________________________________________________________________
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