Commit 55ffc29c authored by Jim Fulton's avatar Jim Fulton

Merge pull request #27 from zopefoundation/cleanup-exception-logging

Cleaned up exception logging and changed pins
parents 67aae9fb 1bbaa6e2
...@@ -7,7 +7,7 @@ python: ...@@ -7,7 +7,7 @@ python:
- 3.3 - 3.3
- 3.4 - 3.4
install: install:
- travis_retry pip install BTrees ZConfig manuel persistent six transaction zc.lockfile zdaemon zope.interface zope.testing zope.testrunner - travis_retry pip install BTrees ZConfig manuel persistent six transaction zc.lockfile zdaemon zope.interface zope.testing zope.testrunner==4.4.4
- travis_retry pip install -e . - travis_retry pip install -e .
script: script:
- zope-testrunner -u --test-path=src --auto-color --auto-progress - zope-testrunner -u --test-path=src --auto-color --auto-progress
......
...@@ -3,17 +3,18 @@ develop = . ...@@ -3,17 +3,18 @@ develop = .
parts = parts =
test test
scripts scripts
versions = versions
[versions] [versions]
zc.recipe.testrunner = 2.0.0 # Avoid breakage in 4.4.5:
zc.lockfile = 1.1.0 zope.testrunner = 4.4.4
zope.interface = 4.0.3 # zc.recipe.testrunner = 2.0.0
ZConfig = 3.0.3 # zc.lockfile = 1.1.0
BTrees = 4.0.5 # zope.interface = 4.0.3
persistent = 4.0.6 # ZConfig = 3.0.3
transaction = 1.4.1 # BTrees = 4.0.5
zdaemon = 4.0.0a1 # persistent = 4.0.6
# transaction = 1.4.1
# zdaemon = 4.0.0a1
[test] [test]
recipe = zc.recipe.testrunner recipe = zc.recipe.testrunner
......
...@@ -302,7 +302,7 @@ def tryToResolveConflict(self, oid, committedSerial, oldSerial, newpickle, ...@@ -302,7 +302,7 @@ def tryToResolveConflict(self, oid, committedSerial, oldSerial, newpickle,
# the original ConflictError. A client can recover from a # the original ConflictError. A client can recover from a
# ConflictError, but not necessarily from other errors. But log # ConflictError, but not necessarily from other errors. But log
# the error so that any problems can be fixed. # 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), raise ConflictError(oid=oid, serials=(committedSerial, oldSerial),
data=newpickle) data=newpickle)
......
...@@ -302,8 +302,7 @@ class Connection(ExportImport, object): ...@@ -302,8 +302,7 @@ class Connection(ExportImport, object):
f() f()
except: # except what? except: # except what?
f = getattr(f, 'im_self', f) f = getattr(f, 'im_self', f)
self._log.error("Close callback failed for %s", f, self._log.exception("Close callback failed for %s", f)
exc_info=sys.exc_info())
self.__onCloseCallbacks = None self.__onCloseCallbacks = None
self._debug_info = () self._debug_info = ()
...@@ -874,8 +873,7 @@ class Connection(ExportImport, object): ...@@ -874,8 +873,7 @@ class Connection(ExportImport, object):
raise raise
except: except:
self._log.exception("Couldn't load state for %s %s", self._log.exception("Couldn't load state for %s %s",
className(obj), oid_repr(oid), className(obj), oid_repr(oid))
exc_info=sys.exc_info())
raise raise
def _setstate(self, obj): def _setstate(self, obj):
......
...@@ -809,7 +809,7 @@ class DB(object): ...@@ -809,7 +809,7 @@ class DB(object):
try: try:
self.storage.pack(t, self.references) self.storage.pack(t, self.references)
except: except:
logger.error("packing", exc_info=True) logger.exception("packing")
raise raise
def setActivityMonitor(self, am): def setActivityMonitor(self, am):
......
...@@ -429,7 +429,7 @@ class FileStorage( ...@@ -429,7 +429,7 @@ class FileStorage(
self._save_index() self._save_index()
except: except:
# Log the error and continue # 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): def getSize(self):
return self._pos return self._pos
...@@ -1665,8 +1665,7 @@ def _truncate(file, name, pos): ...@@ -1665,8 +1665,7 @@ def _truncate(file, name, pos):
o.close() o.close()
break break
except: except:
logger.error("couldn\'t write truncated data for %s", name, logger.exception("couldn\'t write truncated data for %s", name)
exc_info=True)
raise StorageSystemError("Couldn't save truncated data") raise StorageSystemError("Couldn't save truncated data")
file.seek(pos) 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