qpsmtpd/lib/Qpsmtpd
John Peacock e331f6b248 Add plugable logging support include sample plugin which replicates the
existing core code.  Add OK hook.

*  lib/Qpsmtpd.pm
   (init_logger): replaced with log_level()
   (load_logging): NEW - load logging plugins without calling log()
   (log_level): NEW - set/get global $LogLevel scalar
   (log): now just a wrapper for varlog(); called only by core code
   (varlog): initializes logging if not already done, calls logging plugins
     in turn and falls back to interal logging unless plugins OK or DECLINED
   (_load_plugins): only display "Loading plugin" when actually loading one
   (run_hooks): load logging plugins without calling log(); add OK hook as
     else of the DENY* case
   (spool_dir): use global $Spool_dir scalar to cache location

*  lib/Qpsmtpd/Plugin.pm
   (%hooks): add "logging" and "ok"
   (register_hook): add local _hook to object cache
   (log): call varlog() with additional parameters hook and plugin_name
     except for logging hook
   (compile): add accessor sub for local _hook scalar

*  lib/Qpsmtpd/SMTP.pm
   (mail, rcpt): change loglevel to LOGALERT instead of LOGWARN for from/to

*  qpsmtpd-forkserver
   (REAPER): use package ::log() instead of warn()
   (main): defer calling log until $plugin_loader has been initialized
   (log): call logging using the $plugin_loader object

*  plugins/logging/warn
   NEW: sample plugin which replicates the core logging functionality

*  plugins/logging/devnull
   NEW: sample plugin which logs nothing (for testing multiple logging
     plugin functionality)

*  config.sample/logging
   sample configuration file for logging plugins

*  plugins/virus/uvscan
   plugins/virus/clamav
   Increase loglevel for non-serious warnings to LOGWARN from LOGERROR


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@398 958fd67b-6ff1-0310-b445-bb7760255be9
2005-03-24 21:16:35 +00:00
..
Address.pm * lib/Qpsmtpd/Address.pm 2004-09-24 18:56:35 +00:00
Auth.pm Changes by jpeacock@cpan.org (John Peacock) 2005-01-28 03:30:50 +00:00
Connection.pm * plugins/check_relay 2004-09-22 16:01:16 +00:00
Constants.pm DENY_DISCONNECT and DENYSOFT_DISCONNECT instead of *HARD 2004-06-14 22:25:52 +00:00
Plugin.pm Add plugable logging support include sample plugin which replicates the 2005-03-24 21:16:35 +00:00
Postfix.pm Improve error messages from the Postfix module (Erik I. Bols�, 2004-07-19 11:08:15 +00:00
SelectServer.pm New for 0.28: Log levels and $Include for config/plugins 2004-03-05 12:46:24 +00:00
SMTP.pm Add plugable logging support include sample plugin which replicates the 2005-03-24 21:16:35 +00:00
TcpServer.pm Make the original string available in the Connection notes 2005-01-30 05:40:24 +00:00
Transaction.pm body_write patches from Brian Grossman 2005-03-10 18:18:28 +00:00
Utils.pm add thhe Utils.pm module 2002-09-24 18:53:45 +00:00