Skip to content

Commit

Permalink
zLOG -> logging
Browse files Browse the repository at this point in the history
  • Loading branch information
zopyx committed Jan 8, 2006
1 parent 2e1fade commit fa068cb
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions PythonScript.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
__version__='$Revision: 1.56 $'[11:-2]

import sys, os, traceback, re, marshal, new
from logging import getLogger
from Globals import DTMLFile, MessageDialog, package_home
import AccessControl, OFS, RestrictedPython
from Acquisition import aq_parent
Expand All @@ -33,10 +34,12 @@
from OFS.History import Historical, html_diff
from OFS.Cache import Cacheable
from AccessControl.ZopeGuards import get_safe_globals, guarded_getattr
from zLOG import LOG, ERROR, INFO, PROBLEM

from zExceptions import Forbidden
import Globals

LOG = getLogger('PythonScripts')

# Track the Python bytecode version
import imp
Python_magic = imp.get_magic()
Expand Down Expand Up @@ -209,7 +212,7 @@ def __setstate__(self, state):
getattr(self, 'Script_magic', None) != Script_magic):
global _log_complaint
if _log_complaint:
LOG(self.meta_type, INFO, _log_complaint)
LOG.info(_log_complaint)
_log_complaint = 0
# Changes here won't get saved, unless this Script is edited.
body = self._body.rstrip()
Expand Down Expand Up @@ -438,7 +441,7 @@ def write(self, text):
else:
self._makeFunction()
except:
LOG(self.meta_type, ERROR, 'write failed', error=sys.exc_info())
LOG.error('write failed', exc_info=sys.exc_info())
raise

def manage_FTPget(self):
Expand Down

0 comments on commit fa068cb

Please sign in to comment.