|
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)) |