perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: Beginners question
Date Sun, 11 May 2003 09:13:05 GMT
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


Mime
View raw message