Debugging for CGIs when using cig-script instead of ModPerl::Registry (this become the default for Debian install)

This commit is contained in:
Xavier Guimard 2010-09-24 07:40:51 +00:00
parent bcc84f0ceb
commit dd1b73d8c4
4 changed files with 17 additions and 4 deletions

View File

@ -12,8 +12,12 @@
# Manager must be interpreted by Perl
<Files *.pl>
SetHandler perl-script
PerlResponseHandler ModPerl::Registry
# To avoid Manager stay in memory, default is to use cgi-script
SetHandler cgi-script
# For best performances, use the following instead:
#SetHandler perl-script
#PerlResponseHandler ModPerl::Registry
</Files>
<IfModule mod_dir.c>

View File

@ -202,6 +202,11 @@ status = 0
# * 'rule: <rule> : you can set here directly the rule to apply
;protection = manager
# When using "SetHandler cgi-script" instead of using ModPerl::Registry,
# Apache LogLevel parameter does not work for Lemonldap::NG debugging.
# Use the following to modify error output:
;hideLogLevels = debug|info
[apply]
# URL used to reload configuration

View File

@ -96,7 +96,10 @@ sub lmLog {
}
}
else {
print STDERR "$mess\n" unless ( $level =~ /^(?:debug)$/ );
$self->{hideLogLevels} = 'debug|info'
unless defined( $self->{hideLogLevels} );
print STDERR "[$level] $mess\n"
unless ( $level =~ /^(?:$self->{hideLogLevels})$/ );
}
}

View File

@ -31,7 +31,8 @@ sub translate {
return $r;
}
else {
print STDERR __PACKAGE__ . ": $text not translated in $_\n";
$self->lmLog( __PACKAGE__ . ": $text not translated in $_",
'error' );
return $text;
}
}