Commit 29f455f0 authored by Jim Fulton's avatar Jim Fulton

Cleaned up exception logging and changed pins

- Always use logger.exception rather than logging.error when logging
  exceptions ar the error level.

- Fixed an incorrect call to logging.exceotion (like PR #26, but better :).

- Removed dependency pins and added one to overcome some breakage in
  zope.testrunner.

None of this seems to be CHANGES worthy.
parent 67aae9fb
......@@ -3,17 +3,18 @@ develop = .
parts =
test
scripts
versions = versions
[versions]
zc.recipe.testrunner = 2.0.0
zc.lockfile = 1.1.0
zope.interface = 4.0.3
ZConfig = 3.0.3
BTrees = 4.0.5
persistent = 4.0.6
transaction = 1.4.1
zdaemon = 4.0.0a1
# Avoid breakage in 4.4.5:
zope.testrunner = 4.4.4
# zc.recipe.testrunner = 2.0.0
# zc.lockfile = 1.1.0
# zope.interface = 4.0.3
# ZConfig = 3.0.3
# BTrees = 4.0.5
# persistent = 4.0.6
# transaction = 1.4.1
# zdaemon = 4.0.0a1
[test]
recipe = zc.recipe.testrunner
......
......@@ -302,7 +302,7 @@ def tryToResolveConflict(self, oid, committedSerial, oldSerial, newpickle,
# the original ConflictError. A client can recover from a
# ConflictError, but not necessarily from other errors. But log
# the error so that any problems can be fixed.
logger.error("Unexpected error", exc_info=True)
logger.exception("Unexpected error")
raise ConflictError(oid=oid, serials=(committedSerial, oldSerial),
data=newpickle)
......
......@@ -302,8 +302,7 @@ class Connection(ExportImport, object):
f()
except: # except what?
f = getattr(f, 'im_self', f)
self._log.error("Close callback failed for %s", f,
exc_info=sys.exc_info())
self._log.exception("Close callback failed for %s", f)
self.__onCloseCallbacks = None
self._debug_info = ()
......@@ -874,8 +873,7 @@ class Connection(ExportImport, object):
raise
except:
self._log.exception("Couldn't load state for %s %s",
className(obj), oid_repr(oid),
exc_info=sys.exc_info())
className(obj), oid_repr(oid))
raise
def _setstate(self, obj):
......
......@@ -809,7 +809,7 @@ class DB(object):
try:
self.storage.pack(t, self.references)
except:
logger.error("packing", exc_info=True)
logger.exception("packing")
raise
def setActivityMonitor(self, am):
......
......@@ -429,7 +429,7 @@ class FileStorage(
self._save_index()
except:
# Log the error and continue
logger.error("Error saving index on close()", exc_info=True)
logger.exception("Error saving index on close()")
def getSize(self):
return self._pos
......@@ -1665,8 +1665,7 @@ def _truncate(file, name, pos):
o.close()
break
except:
logger.error("couldn\'t write truncated data for %s", name,
exc_info=True)
logger.exception("couldn\'t write truncated data for %s", name)
raise StorageSystemError("Couldn't save truncated data")
file.seek(pos)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment