Author: msergeant
Date: Fri Feb 1 12:59:18 2008
New Revision: 844
Modified:
trunk/lib/Qpsmtpd.pm
Log:
(much) Less stat calls by caching load_logging
Modified: trunk/lib/Qpsmtpd.pm
==============================================================================
--- trunk/lib/Qpsmtpd.pm (original)
+++ trunk/lib/Qpsmtpd.pm Fri Feb 1 12:59:18 2008
@@ -28,9 +28,12 @@
sub TRACE_LEVEL { $TraceLevel }; # leave for plugin compatibility
+my $LOGGING_LOADED = 0;
+
sub load_logging {
# need to do this differently that other plugins so as to
# not trigger logging activity
+ return if $LOGGING_LOADED;
my $self = shift;
return if $hooks->{"logging"};
my $configdir = $self->config_dir("logging");
@@ -54,6 +57,8 @@
$self->log(LOGINFO, "Loaded $logger");
}
+ $LOGGING_LOADED = 1;
+
return @loggers;
}