qpsmtpd/config.sample/logging

24 lines
691 B
Plaintext
Raw Normal View History

2012-04-08 08:14:48 +02:00
# by default, qpsmtpd logs to STDERR at the level set in config/loglevel.
#
# In addition, qpsmtpd will log through any plugins enabled in this file.
# You can enable as many plugins as you wish. Example plugin invocations
# are included below. Just remove the # symbol to enable them.
# default logging plugin
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 22:16:35 +01:00
logging/warn 9
2012-04-08 08:14:48 +02:00
#logging/adaptive [accept minlevel] [reject maxlevel] [prefix char]
#logging/adaptive 4 6
# send logs to apache (useful if running qpsmtpd under apache)
#logging/apache
# send logs to the great bit bucket
#logging/devnull
# log to a file
#logging/file loglevel LOGINFO /var/log/qpsmtpd.log
# log to syslog
#logging/syslog loglevel LOGWARN priority LOG_NOTICE