?
Current Path : /lib/python2.7/site-packages/tuned/ |
Linux gator3171.hostgator.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 |
Current File : //lib/python2.7/site-packages/tuned/exceptions.py |
import tuned.logs import sys import traceback exception_logger = tuned.logs.get() class TunedException(Exception): """ """ def log(self, logger = None): if logger is None: logger = exception_logger logger.error(str(self)) self._log_trace(logger) def _log_trace(self, logger): (exc_type, exc_value, exc_traceback) = sys.exc_info() if exc_value != self: logger.debug("stack trace is no longer available") else: exception_info = "".join(traceback.format_exception(exc_type, exc_value, exc_traceback)).rstrip() logger.debug(exception_info)