]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume decorators always log to the file with exceptions
authorAlfredo Deza <adeza@redhat.com>
Fri, 20 Oct 2017 13:23:02 +0000 (09:23 -0400)
committerAlfredo Deza <adeza@redhat.com>
Fri, 20 Oct 2017 16:10:07 +0000 (12:10 -0400)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
src/ceph-volume/ceph_volume/decorators.py

index c1e14bc79088c32601256078dd0eb0500ba3f80e..d0be938172f99d912a6f71870bd1f46ae5e211e8 100644 (file)
@@ -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: