[Zodb-checkins] CVS: ZODB3/zLOG - datatypes.py:1.10

Fred L. Drake, Jr. fred@zope.com
Thu, 23 Jan 2003 16:38:06 -0500


Update of /cvs-repository/ZODB3/zLOG
In directory cvs.zope.org:/tmp/cvs-serv29396

Modified Files:
	datatypes.py 
Log Message:
In HandlerFactory and subclasses, use more reasonable method names.


=== ZODB3/zLOG/datatypes.py 1.9 => 1.10 ===
--- ZODB3/zLOG/datatypes.py:1.9	Thu Jan 23 14:58:36 2003
+++ ZODB3/zLOG/datatypes.py	Thu Jan 23 16:38:03 2003
@@ -85,19 +85,20 @@
         Factory.__init__(self)
         self.section = section
 
-    def create_logger(self):
-        raise NotImplementedError("subclasses must override create_logger()")
+    def create_loghandler(self):
+        raise NotImplementedError(
+            "subclasses must override create_loghandler()")
 
     def create(self):
         import logging
-        logger = self.create_logger()
+        logger = self.create_loghandler()
         logger.setFormatter(logging.Formatter(self.section.format,
                                               self.section.dateformat))
         logger.setLevel(self.section.level)
         return logger
 
 class FileHandlerFactory(HandlerFactory):
-    def create_logger(self):
+    def create_loghandler(self):
         from zLOG.LogHandlers import StreamHandler, FileHandler
         path = self.section.path
         if path == "STDERR":
@@ -138,13 +139,13 @@
     return value
 
 class SyslogHandlerFactory(HandlerFactory):
-    def create_logger(self):
+    def create_loghandler(self):
         from zLOG.LogHandlers import SysLogHandler
         return SysLogHandler(self.section.address.address,
                              self.section.facility)
 
 class Win32EventLogFactory(HandlerFactory):
-    def create_logger(self):
+    def create_loghandler(self):
         from zLOG.LogHandlers import Win32EventLogHandler
         return Win32EventLogHandler(self.section.appname)
 
@@ -177,13 +178,13 @@
     return value
 
 class HTTPHandlerFactory(HandlerFactory):
-    def create_logger(self):
+    def create_loghandler(self):
         from zLOG.LogHandlers import HTTPHandler
         host, selector = self.section.url
         return HTTPHandler(host, selector, self.section.method)
 
 class SMTPHandlerFactory(HandlerFactory):
-    def create_logger(self):
+    def create_loghandler(self):
         from zLOG.LogHandlers import SMTPHandler
         host, port = self.section.smtp_server
         if not port: