From: Alfredo Deza Date: Fri, 20 Oct 2017 13:23:02 +0000 (-0400) Subject: ceph-volume decorators always log to the file with exceptions X-Git-Tag: v12.2.2~83^2~28 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e833916afe22e9c4765344229b5b89cfc9af1b14;p=ceph.git ceph-volume decorators always log to the file with exceptions Signed-off-by: Alfredo Deza (cherry picked from commit cb3533a72571251d9f1b6171f783246462726857) --- diff --git a/src/ceph-volume/ceph_volume/decorators.py b/src/ceph-volume/ceph_volume/decorators.py index c1e14bc79088..d0be938172f9 100644 --- a/src/ceph-volume/ceph_volume/decorators.py +++ b/src/ceph-volume/ceph_volume/decorators.py @@ -58,6 +58,9 @@ def catches(catch=None, handler=None, exit=True): try: return f(*a, **kw) except catch as e: + import logging + logger = logging.getLogger('ceph_volume') + logger.exception('exception caught by decorator') if os.environ.get('CEPH_VOLUME_DEBUG'): raise if handler: