[Zope-CVS] CVS: Packages/SFTPGateway/src/sftpgateway - application.py:1.16

Fred L. Drake, Jr. fred at zope.com
Thu Jun 24 00:06:10 EDT 2004


Update of /cvs-repository/Packages/SFTPGateway/src/sftpgateway
In directory cvs.zope.org:/tmp/cvs-serv28779

Modified Files:
	application.py 
Log Message:
better isolate the message transformation for the ConnectionLogger


=== Packages/SFTPGateway/src/sftpgateway/application.py 1.15 => 1.16 ===
--- Packages/SFTPGateway/src/sftpgateway/application.py:1.15	Wed Jun 23 23:57:07 2004
+++ Packages/SFTPGateway/src/sftpgateway/application.py	Thu Jun 24 00:06:09 2004
@@ -121,26 +121,26 @@
         self.__prefix = prefix
 
     def debug(self, msg, *args, **kw):
-        self.__logger.debug(self.__prefix + msg, *args, **kw)
+        self.log(logging.DEBUG, msg, *args, **kw)
 
     def info(self, msg, *args, **kw):
-        self.__logger.info(self.__prefix + msg, *args, **kw)
+        self.log(logging.INFO, msg, *args, **kw)
 
     def warning(self, msg, *args, **kw):
-        self.__logger.warning(self.__prefix + msg, *args, **kw)
+        self.log(logging.WARNING, msg, *args, **kw)
 
     warn = warning
 
     def error(self, msg, *args, **kw):
-        self.__logger.error(self.__prefix + msg, *args, **kw)
-
-    def exception(self, msg, *args):
-        self.__logger.exception(self.__prefix + msg, *args)
+        self.log(logging.ERROR, msg, *args, **kw)
 
     def critical(self, msg, *args, **kw):
-        self.__logger.critical(self.__prefix + msg, *args, **kw)
+        self.log(logging.CRITICAL, msg, *args, **kw)
 
     fatal = critical
+
+    def exception(self, msg, *args):
+        self.__logger.exception(self.__prefix + msg, *args)
 
     def log(self, level, msg, *args, **kw):
         self.__logger.log(level, self.__prefix + msg, *args, **kw)



More information about the Zope-CVS mailing list