Skip to content

Commit

Permalink
Add more information to the log entries
Browse files Browse the repository at this point in the history
  • Loading branch information
andbag committed Apr 12, 2019
1 parent c1dcee1 commit e6c23fc
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions src/Products/PluginIndexes/unindex.py
Expand Up @@ -271,8 +271,14 @@ def _index_object(self, documentId, obj, threshold=None, attr=''):
except ConflictError:
raise
except Exception:
LOG.error('Should not happen: oldDatum was there, '
'now its not, for document: %s', documentId)
LOG.error('%(context)s: oldDatum was there, '
'now it\'s not for documentId %(doc_id)s '
'from index %(index)r. This '
'should not happen.', dict(
context=self.__class__.__name__,
doc_id=documentId,
index=self.id),
exc_info=sys.exc_info())

if datum is not _marker:
self.insertForwardIndexEntry(datum, documentId)
Expand Down Expand Up @@ -327,8 +333,13 @@ def unindex_object(self, documentId):
except ConflictError:
raise
except Exception:
LOG.debug('Attempt to unindex nonexistent document'
' with id %s', documentId, exc_info=True)
LOG.debug('%(context)s: attempt to unindex nonexistent '
'documentId %(doc_id)s from index %(index)r. This '
'should not happen.', dict(
context=self.__class__.__name__,
doc_id=documentId,
index=self.id),
exc_info=True)

def _apply_not(self, not_parm, resultset=None):
index = self._index
Expand Down

0 comments on commit e6c23fc

Please sign in to comment.