summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2015-12-12 14:51:34 +0100
committerLars Wirzenius <liw@liw.fi>2015-12-12 14:51:34 +0100
commit1718b2284344ebd7ae577963a880d32f1c0cf8f8 (patch)
treec6ca78870552f5f8b4f4f908e3b662a1b4faa12e
parentbe1c7913faba8b064a9c5d73ac99c6ef71235f08 (diff)
downloadobnam-1718b2284344ebd7ae577963a880d32f1c0cf8f8.tar.gz
Make logging of exception clearer, with traceback
Previously, having just the str(e) being printed was quite confusing. This now prints a more helpful traceback.
-rw-r--r--obnamlib/backup_progress.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/obnamlib/backup_progress.py b/obnamlib/backup_progress.py
index 97129b9d..34509575 100644
--- a/obnamlib/backup_progress.py
+++ b/obnamlib/backup_progress.py
@@ -63,9 +63,7 @@ class BackupProgress(object):
def error(self, msg, exc=None):
self.errors = True
- logging.error(msg)
- if exc:
- logging.error(repr(exc))
+ logging.error(msg, exc_info=exc)
self._ts.error('ERROR: %s' % msg)
def what(self, what_what):