Simple method for logging a single debugging exception.
494710
public void debug(Throwable t) {
        if (isEnabled() && isDebugEnabled()) {
            dispatchLogException(new LogEvent(this, LogEvent.DEBUG_TYPE, t));
        }
    }
834328
public void debug(Object message, Throwable t) {
        logger.debug(String.valueOf(message), t);
    }
1144932
public void debug(Throwable error, Map<String, Object> custom, String description) {
    log(error, custom, description, Level.DEBUG);
  }
525045
public static void printFatal(Object message)
	{

		if (message instanceof Throwable)
		{
			Throwable e = (Throwable) message;
			e.printStackTrace();
		}

		Log log = getLog(Debugger.class);
		if(log != null)
			log.fatal(message);
		else
			System.err.println(message);
		
	}
1263448
def __global_logging_exception_handler(exc_type, exc_value, exc_traceback):
    '''
    
    '''
    if exc_type.__name__ == "KeyboardInterrupt":
        # Do not log the exception or display the traceback on Keyboard Interrupt
        # Stop the logging queue listener thread
        if is_mp_logging_listener_configured():
            shutdown_multiprocessing_logging_listener()
    else:
        # Log the exception
        logging.getLogger(__name__).error(
            'An un-handled exception was caught by salt\'s global exception '
            'handler:\n%s: %s\n%s',
            exc_type.__name__,
            exc_value,
            ''.join(traceback.format_exception(
                exc_type, exc_value, exc_traceback
            )).strip()
        )
        # Call the original sys.excepthook
        sys.__excepthook__(exc_type, exc_value, exc_traceback)
246248
def exception(self, s):
        """"""
        self.error(s)
        type, value, tb = sys.exc_info()
        self.writelines(traceback.format_stack(), 1)
        self.writelines(traceback.format_tb(tb)[1:], 1)
        self.writelines(traceback.format_exception_only(type, value), 1)
376923
public void log(Throwable exception) {
		if (exception instanceof CoreException) {
			getILog().log(new Status(IStatus.ERROR, PLUGIN_ID,
					exception.getMessage(), exception.getCause()));
		} else if (exception != null) {
			getILog().log(new Status(IStatus.ERROR, PLUGIN_ID,
					MessageFormat.format(Messages.SARLMavenEclipsePlugin_0, exception.getMessage()), exception));
		} else {
			getILog().log(new Status(IStatus.ERROR, PLUGIN_ID,
					"Internal Error", exception));   //$NON-NLS-1$
		}
	}
557048
def log_exceptions(self, c, broker):
        """"""

        if c in broker.exceptions:
            ex = broker.exceptions.get(c)
            ex = "Exception in {0} - {1}".format(dr.get_name(c), str(ex))
            self.logit(ex, self.pid, self.user, "insights-run", logging.ERROR)
1316452
def log_exception(func, handler, args, kwargs):
    
    # safe-guard: expected arguments -> log_exception(self, typ, value, tb)
    value = args[1] if len(args) == 3 else None
    if value is None:
        return func(*args, **kwargs)

    tracing = handler.settings.get('opentracing_tracing')
    if not isinstance(value, HTTPError) or 500 <= value.status_code <= 599:
        tracing._finish_tracing(handler, error=value)

    return func(*args, **kwargs)
1280410
def formatException(self, exc_info, record=None):
        """"""
        if not record:
            return logging.Formatter.formatException(self, exc_info)

        stringbuffer = cStringIO.StringIO()
        traceback.print_exception(exc_info[0], exc_info[1], exc_info[2],
                                  None, stringbuffer)
        lines = stringbuffer.getvalue().split('\n')
        stringbuffer.close()

        if CONF.logging_exception_prefix.find('%(asctime)') != -1:
            record.asctime = self.formatTime(record, self.datefmt)

        formatted_lines = []
        for line in lines:
            pl = CONF.logging_exception_prefix % record.__dict__
            fl = '%s%s' % (pl, line)
            formatted_lines.append(fl)
        return '\n'.join(formatted_lines)
987121
public void debug(Throwable error, String description) {
    log(error, null, description, Level.DEBUG);
  }
711734
def log_error(self, msg, *args):
        """"""
        if self._logger is not None:
            self._logger.error(msg, *args)
        else:
            print(msg % args)
689240
public void debug(Object message, Throwable t)
    {
        if (IS12)
        {
            getLogger().log(FQCN, Level.DEBUG, message, t);
        }
        else
        {
            getLogger().log(FQCN, Level.DEBUG, message, t);
        }
    }
198961
def start_debugging():
    
    exc_type, exc_value, exc_tb = sys.exc_info()

    # If the exception has been annotated to be re-raised, raise the exception
    if hasattr(exc_value, '_ipdbugger_let_raise'):
        raise_(*sys.exc_info())

    print()
    for line in traceback.format_exception(exc_type, exc_value, exc_tb):
        print(colored(line, 'red'), end=' ')

    # Get the frame with the error.
    test_frame = sys._getframe(-1).f_back

    from ipdb.__main__ import wrap_sys_excepthook
    wrap_sys_excepthook()
    IPDBugger(exc_info=sys.exc_info()).set_trace(test_frame)
802094
def process_exception(self, request, exception):
        """"""
        log_format = self._get_log_format(request)
        if log_format is None:
            return

        params = self._get_parameters_from_request(request, True)
        params['message'] = exception
        params['http_status'] = '-'

        self.OPERATION_LOG.info(log_format, params)
75106
def debug_print(*message):
    """"""
    warnings.warn("debug_print is deprecated; use the logging module instead.")
    if get_debug_level():
        ss = STDOUT
        if PY3:
            # This is needed after restarting and using debug_print
            for m in message:
                ss.buffer.write(str(m).encode('utf-8'))
            print('', file=ss)
        else:
            print(*message, file=ss)
1228034
protected void debug(String message, Throwable throwable) {
		final Log log = getLog();
		if (log != null)
			log.debug(message, throwable);
	}