[Zodb-checkins] CVS: ZODB3/zLOG - component.xml:1.5 datatypes.py:1.7
Fred L. Drake, Jr.
fred@zope.com
Thu, 23 Jan 2003 11:57:28 -0500
Update of /cvs-repository/ZODB3/zLOG
In directory cvs.zope.org:/tmp/cvs-serv12467
Modified Files:
component.xml datatypes.py
Log Message:
Refine the log handlers in the zLOG schema component a bit to make
configuration files easier to read.
=== ZODB3/zLOG/component.xml 1.4 => 1.5 ===
--- ZODB3/zLOG/component.xml:1.4 Wed Jan 22 15:38:13 2003
+++ ZODB3/zLOG/component.xml Thu Jan 23 11:57:25 2003
@@ -22,7 +22,7 @@
<sectiontype name="syslog" datatype=".syslog_handler"
implements="loghandler" extends="base-log-handler">
<key name="facility" default="user" datatype=".syslog_facility"/>
- <key name="address" datatype="socket-address" required="yes"/>
+ <key name="address" datatype="socket-address" default="localhost:514"/>
<key name="format" default="%(message)s"
datatype=".log_format"/>
</sectiontype>
@@ -36,7 +36,7 @@
<sectiontype name="http-logger" datatype=".http_handler"
implements="loghandler" extends="base-log-handler">
- <key name="url" default="localhost" datatype=".http_handler_url"/>
+ <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 %(message)s"
datatype=".log_format"/>
@@ -44,10 +44,10 @@
<sectiontype name="email-notifier" datatype=".smtp_handler"
implements="loghandler" extends="base-log-handler">
- <key name="fromaddr" required="yes"/>
- <multikey name="toaddr" required="yes" attribute="toaddrs"/>
+ <key name="from" required="yes" attribute="fromaddr"/>
+ <multikey name="to" required="yes" attribute="toaddrs"/>
<key name="subject" default="Message from Zope"/>
- <key name="host" default="localhost" datatype="inet-address"/>
+ <key name="smtp-server" default="localhost" datatype="inet-address"/>
<key name="format" default="%(asctime)s %(message)s"
datatype=".log_format"/>
</sectiontype>
=== ZODB3/zLOG/datatypes.py 1.6 => 1.7 ===
--- ZODB3/zLOG/datatypes.py:1.6 Thu Jan 23 11:45:57 2003
+++ ZODB3/zLOG/datatypes.py Thu Jan 23 11:57:25 2003
@@ -120,9 +120,9 @@
def syslog_facility(value):
value = value.lower()
if not _syslog_facilities.has_key(value):
- raise ValueError(
- "Syslog facility must be one of "
- + ", ".join(_syslog_facilities.keys()))
+ L = _syslog_facilities.keys()
+ L.sort()
+ raise ValueError("Syslog facility must be one of " + ", ".join(L))
return value
def syslog_handler(section):
@@ -200,7 +200,7 @@
inst.setFormatter(logging.Formatter(format, dateformat))
inst.setLevel(level)
- host, port = section.host
+ host, port = section.smtp_server
if not port:
mailhost = host
else: