<component prefix="ZConfig.components.logger.handlers">
  <description>
  </description>

  <import package="ZConfig.components.logger" file="abstract.xml"/>

  <sectiontype name="ZConfig.logger.base-log-handler">
    <description>
      Base type for most log handlers.  This is cannot be used as a
      loghandler directly since it doesn't implement the loghandler
      abstract section type.
    </description>
    <key name="dateformat"
         default="%Y-%m-%dT%H:%M:%S"/>
    <key name="level"
         default="notset"
         datatype="ZConfig.components.logger.datatypes.logging_level"/>
  </sectiontype>

  <sectiontype name="logfile"
               datatype=".FileHandlerFactory"
               implements="ZConfig.logger.handler"
               extends="ZConfig.logger.base-log-handler">
    <key name="path" required="yes"/>
    <key name="format"
         default="------\n%(asctime)s %(levelname)s %(name)s %(message)s"
         datatype=".log_format"/>
  </sectiontype>

  <sectiontype name="syslog"
               datatype=".SyslogHandlerFactory"
               implements="ZConfig.logger.handler"
               extends="ZConfig.logger.base-log-handler">
    <key name="facility" default="user" datatype=".syslog_facility"/>
    <key name="address" datatype="socket-address" default="localhost:514"/>
    <key name="format"
         default="%(name)s %(message)s"
         datatype=".log_format"/>
  </sectiontype>

  <sectiontype name="win32-eventlog"
               datatype=".Win32EventLogFactory"
               implements="ZConfig.logger.handler"
               extends="ZConfig.logger.base-log-handler">
    <key name="appname" default="Zope"/>
    <key name="format"
         default="%(levelname)s %(name)s %(message)s"
         datatype=".log_format"/>
  </sectiontype>

  <sectiontype name="http-logger"
               datatype=".HTTPHandlerFactory"
               implements="ZConfig.logger.handler"
               extends="ZConfig.logger.base-log-handler">
    <key name="url" default="http://localhost/" datatype=".http_handler_url"/>
    <key name="method" default="GET" datatype=".get_or_post"/>
    <key name="format"
         default="%(asctime)s %(levelname)s %(name)s %(message)s"
         datatype=".log_format"/>
  </sectiontype>

  <sectiontype name="email-notifier"
               datatype=".SMTPHandlerFactory"
               implements="ZConfig.logger.handler"
               extends="ZConfig.logger.base-log-handler">
    <key name="from" required="yes" attribute="fromaddr"/>
    <multikey name="to" required="yes" attribute="toaddrs"/>
    <key name="subject" default="Message from Zope"/>
    <key name="smtp-server" default="localhost" datatype="inet-address"/>
    <key name="format"
         default="%(asctime)s %(levelname)s %(name)s %(message)s"
         datatype=".log_format"/>
  </sectiontype>

</component>
