def log_error(msg=None, exc_info=None, logger=None, **kwargs):
if logger is None:<EOL><INDENT>logger = _logger<EOL><DEDENT>if not exc_info:<EOL><INDENT>exc_info = sys.exc_info()<EOL><DEDENT>if msg is None:<EOL><INDENT>msg = "<STR_LIT>"<EOL><DEDENT>exc_class, exc_msg, _ = exc_info<EOL>if all(info is not None for info in exc_info):<EOL><INDENT>logger.error(msg, exc_info=exc_info)<EOL><DEDENT>
log an exception and its traceback on the logger defined

Parameters
----------
msg : str, optional
    A message to add to the error
exc_info : tuple
    Information about the current exception
logger : logging.Logger
    logger to use