From a555a8593e192361f43f8e32172ee4887b9339bc Mon Sep 17 00:00:00 2001 From: Tim Burke Date: Fri, 27 Jun 2025 08:47:10 -0700 Subject: [PATCH] diskfile: Stop including traceback on quarantine If we already know enough about the error to feel confident in quarantining, we don't really need a whole traceback about it; that just clutters logs. Change-Id: Iab0e62c85b33d699f96d744faaa16420b7148b47 --- swift/obj/diskfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/swift/obj/diskfile.py b/swift/obj/diskfile.py index b1e0abf836..49a3bf1e04 100644 --- a/swift/obj/diskfile.py +++ b/swift/obj/diskfile.py @@ -1208,7 +1208,7 @@ class BaseDiskFileManager(object): quar_path = quarantine_renamer(device_path, join(hsh_path, "made-up-filename")) - logging.exception( + logging.error( 'Quarantined %(hsh_path)s to %(quar_path)s because ' 'it is not a directory', {'hsh_path': hsh_path, 'quar_path': quar_path}) @@ -1226,7 +1226,7 @@ class BaseDiskFileManager(object): # to quarantine the whole suffix quar_path = quarantine_renamer(device_path, hsh_path) orig_path = path - logging.exception( + logging.error( 'Quarantined %(orig_path)s to %(quar_path)s because ' 'it could not be listed', {'orig_path': orig_path, 'quar_path': quar_path})