Log message for revision 41209:
  zLOG -> logging
  

Changed:
  U   Zope/trunk/lib/python/Products/PageTemplates/PageTemplateFile.py
  U   Zope/trunk/lib/python/Products/PageTemplates/ZopePageTemplate.py
  U   Zope/trunk/lib/python/Products/Sessions/SessionDataManager.py

-=-
Modified: Zope/trunk/lib/python/Products/PageTemplates/PageTemplateFile.py
===================================================================
--- Zope/trunk/lib/python/Products/PageTemplates/PageTemplateFile.py    
2006-01-08 11:40:32 UTC (rev 41208)
+++ Zope/trunk/lib/python/Products/PageTemplates/PageTemplateFile.py    
2006-01-08 11:45:29 UTC (rev 41209)
@@ -18,8 +18,8 @@
 __version__ = '$Revision: 1.30 $'[11:-2]
 
 import os, AccessControl
+from logging import getLogger
 from Globals import package_home, DevelopmentMode
-from zLOG import LOG, ERROR
 from Shared.DC.Scripts.Script import Script
 from Shared.DC.Scripts.Signature import FuncCode
 from AccessControl import getSecurityManager
@@ -31,6 +31,9 @@
 from App.config import getConfiguration
 from OFS.SimpleItem import Item_w__name__
 
+
+LOG = getLogger('PageTemplateFile')
+
 class PageTemplateFile(Item_w__name__, Script, PageTemplate, Traversable):
     "Zope wrapper for filesystem Page Template using TAL, TALES, and METAL"
 
@@ -146,8 +149,7 @@
         self.pt_edit(text, t)
         self._cook()
         if self._v_errors:
-            LOG('PageTemplateFile', ERROR, 'Error in template',
-                '\n'.join(self._v_errors))
+            LOG.error('Error in template %s' % '\n'.join(self._v_errors))
             return
         self._v_last_read = mtime
 

Modified: Zope/trunk/lib/python/Products/PageTemplates/ZopePageTemplate.py
===================================================================
--- Zope/trunk/lib/python/Products/PageTemplates/ZopePageTemplate.py    
2006-01-08 11:40:32 UTC (rev 41208)
+++ Zope/trunk/lib/python/Products/PageTemplates/ZopePageTemplate.py    
2006-01-08 11:45:29 UTC (rev 41209)
@@ -20,7 +20,6 @@
 import os, AccessControl, Acquisition, sys, types
 from types import StringType
 from Globals import DTMLFile, ImageFile, MessageDialog, package_home
-from zLOG import LOG, ERROR, INFO
 from OFS.SimpleItem import SimpleItem
 from DateTime.DateTime import DateTime
 from Shared.DC.Scripts.Script import Script, BindingsUI
@@ -38,15 +37,8 @@
 from Expressions import SecureModuleImporter
 from PageTemplateFile import PageTemplateFile
 
-try:
-    from webdav.Lockable import ResourceLockedError
-    from webdav.WriteLockInterface import WriteLockInterface
-    SUPPORTS_WEBDAV_LOCKS = 1
-except ImportError:
-    SUPPORTS_WEBDAV_LOCKS = 0
+SUPPORTS_WEBDAV_LOCKS = 1
 
-
-
 class Src(Acquisition.Explicit):
     " "
 

Modified: Zope/trunk/lib/python/Products/Sessions/SessionDataManager.py
===================================================================
--- Zope/trunk/lib/python/Products/Sessions/SessionDataManager.py       
2006-01-08 11:40:32 UTC (rev 41208)
+++ Zope/trunk/lib/python/Products/Sessions/SessionDataManager.py       
2006-01-08 11:45:29 UTC (rev 41209)
@@ -12,6 +12,7 @@
 ############################################################################
 
 import re, time, sys
+from logging import getLogger
 import Globals
 from OFS.SimpleItem import Item
 from Acquisition import Implicit, Explicit, aq_base
@@ -19,7 +20,6 @@
 from AccessControl.Owned import Owned
 from AccessControl.Role import RoleManager
 from App.Management import Tabs
-from zLOG import LOG, WARNING, BLATHER
 from AccessControl import ClassSecurityInfo
 import SessionInterfaces
 from SessionPermissions import *
@@ -30,6 +30,7 @@
     unregisterBeforeTraverse
 
 bad_path_chars_in=re.compile('[^a-zA-Z0-9-_~\,\. \/]').search
+LOG = getLogger('SessionDataManager')
 
 class SessionDataManagerErr(Exception): pass
 
@@ -205,7 +206,7 @@
         transactions for mounted storages. """
         if self.obpath is None:
             err = 'Session data container is unspecified in %s' % self.getId()
-            LOG('Session Tracking', WARNING, err)
+            LOG.warn(err)
             raise SessionIdManagerErr, err
         try:
             # This should arguably use restrictedTraverse, but it
@@ -215,8 +216,7 @@
             # hasattr hides conflicts
             if DEBUG and not getattr(self, '_v_wrote_dc_type', None):
                 args = '/'.join(self.obpath)
-                LOG('Session Tracking', BLATHER,
-                    'External data container at %s in use' % args)
+                LOG.debug('External data container at %s in use' % args)
                 self._v_wrote_dc_type = 1
             return self.unrestrictedTraverse(self.obpath)
         except:
@@ -281,7 +281,7 @@
             getSessionData = sdm.getSessionData
         except:
             msg = 'Session automatic traversal failed to get session data'
-            LOG('Session Tracking', WARNING, msg, error=sys.exc_info())
+            LOG.warn(msg, exc_info=sys.exc_info())
             return
 
         # set the getSessionData method in the "lazy" namespace

_______________________________________________
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins

Reply via email to