utils.py

changeset 40
cfbeeec8cb82
equal deleted inserted replaced
39:56af43e9c949 40:cfbeeec8cb82
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