perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Colin Wetherbee <...@denterprises.org>
Subject No log() in Apache2::RequestRec?
Date Sat, 15 Dec 2007 00:07:46 GMT
Based on some documentation I read [0] [1], I am trying to use the 
following function to write messages to my virtual host's error log.

30 sub Debug(@)
31 {
32   my $r = Apache2::RequestUtil->request;
33   $r->log->debug(@_);
34 }

I have tried several variations of this, restarting the server as 
necessary, and I get the following error.

[Fri Dec 14 23:57:52 2007] [error] [client 192.168.171.80] Can't locate 
object method "log" via package "Apache2::RequestRec" at 
/home/cww/sites/js.iron.denterprises.org/htdocs/jet-set/JetSet/Debug.pm 
line 33.\n

I remember using code similar to this for logging in the past, and it 
worked fine.  Unfortunately, I don't have (or can't find) that code anymore.

This is Apache/2.2.6 (Debian) mod_apreq2-20051231/2.6.0 mod_perl/2.0.3 
Perl/v5.8.8.

I would appreciate any pointers.

Thanks.

Colin

[0] http://perl.apache.org/docs/2.0/api/Apache2/RequestUtil.html#C_request_
[1] http://perl.apache.org/docs/2.0/api/Apache2/Log.html#LogLevel_Methods

Mime
View raw message