Merge "Log when quarantining an object"

This commit is contained in:
Jenkins 2014-01-11 04:44:42 +00:00 committed by Gerrit Code Review
commit e0c9211646
1 changed files with 4 additions and 0 deletions

View File

@ -861,6 +861,8 @@ class DiskFileReader(object):
def _quarantine(self, msg):
self._quarantined_dir = self._threadpool.run_in_thread(
quarantine_renamer, self._device_path, self._data_file)
self._logger.warn("Quarantined object %s: %s" % (
self._data_file, msg))
self._logger.increment('quarantines')
self._quarantine_hook(msg)
@ -1056,6 +1058,8 @@ class DiskFile(object):
"""
self._quarantined_dir = self._threadpool.run_in_thread(
quarantine_renamer, self._device_path, data_file)
self._logger.warn("Quarantined object %s: %s" % (
data_file, msg))
self._logger.increment('quarantines')
return DiskFileQuarantined(msg)