pcdsutils.log.log_exception
- pcdsutils.log.log_exception(exc_info, *, context='exception', message=None, level=40, stacklevel=1)[source]
Log an exception to the central server (i.e., logstash/grafana).
- Parameters:
- exc_info(exc_type, exc_value, exc_traceback)
The exception information.
- contextstr, optional
Additional context for the log message.
- messagestr, optional
Override the default log message.
- levelint, optional
The log level to use. Defaults to ERROR.
- stacklevelint, optional
The stack level of the message being reported. Defaults to 1, meaning that the message will be reported as having come from the caller of
log_exception_to_central_server. Applies only to Python 3.8+, and ignored below.