utils.py

changeset 50
2d8947351727
parent 49
db33dfa64ad6
child 51
1614b2184bb4
equal deleted inserted replaced
49:db33dfa64ad6 50:2d8947351727
1 #
2 # Utility functions for Borgend
3 #
4
5 def log_exception(logger, err, detail=None):
6 err_type=err.__class__.__name__
7 if detail:
8 logger.critical('%s:%s "%s"', str(detail), err_type, str(err))
9 else:
10 logger.critical('%s "%s"', err_type, str(err))

mercurial