Andreas Bauer wrote:
Hi,

I wrote a small patch for Apache::Reload allowing a finer control over the
messages logged to error_log. It stops the module from flooding the logfile
with 'Checking mtime ...' messages.

To activate just the 'process 42 reloading Foo.pm' messages, set
'PerlSetVar ReloadInfo On' in the apache config file.

Sounds good, Andreas. But let's not add 10,000 variables for the feature of the same kind. If you can submit a patch that simply accepts a different value for ReloadDebug and patch the docs as well, it'll go in.


e.g.:

PerlSetVar ReloadDebug on
PerlSetVar ReloadDebug info

It could be better to have:

PerlSetVar ReloadTrace debug
PerlSetVar ReloadTrace info
PerlSetVar ReloadTrace error

etc. but I don't think we will need more than 2. Whichever way is fine with me. As this is mp2 we can change the API as long as 2.0 is not released. So may be it's better to go with the second idea.

And docs live here:
http://perl.apache.org/docs/2.0/api/Apache/Reload.pod.orig

Thanks.

Andreas


--- Reload.pm.old 2004-05-14 16:09:23.792928088 +0200
+++ Reload.pm 2004-05-14 16:07:46.316746720 +0200
@@ -61,6 +61,8 @@ sub handler {
my $DEBUG = ref($o) && (lc($o->dir_config("ReloadDebug") || '') eq 'on');
+ my $DEBUG_INFO = $DEBUG || (ref($o) && (lc($o->dir_config("ReloadInfo") || '') eq 'on'));
+
my $TouchFile = ref($o) && $o->dir_config("ReloadTouchFile");
my $ConstantRedefineWarnings = ref($o) && @@ -150,7 +152,7 @@ sub handler {
unless $ConstantRedefineWarnings;
require $key;
warn("Apache::Reload: process $$ reloading $key\n")
- if $DEBUG;
+ if $DEBUG_INFO;
}
$Stat{$file} = $mtime;
}




--
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] 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



Reply via email to