Logs a caught exception with a custom text message.

@param level
Severity level
@param message
Plain text message
@param exception
Caught exception
170149
public static void log(final Level level, final Throwable exception, final String message) {
		String nameOfException = exception.getClass().getName();
		String messageOfException = exception.getMessage();

		StringBuilder builder = new StringBuilder(BUFFER_SIZE);
		builder.append(level);
		builder.append(": ");
		builder.append(message);
		builder.append(" (");
		builder.append(nameOfException);
		if (messageOfException != null && !messageOfException.isEmpty()) {
			builder.append(": ");
			builder.append(messageOfException);
		}
		builder.append(")");

		System.err.println(builder);
	}
747936
public synchronized void logMessage(final Level level, final String message)
	{

		if (logLevel.toInt() > level.toInt()) {
			return;
		}

		try {
			this.writer.write(System.currentTimeMillis() + "\t" + consumerName
					+ " [" + type.toString() + "] " + "\t" + message + "\r\n");
			this.writer.flush();
		}
		catch (IOException ioe) {
			ioe.printStackTrace();
		}
	}
897001
protected void logInternalError(Throwable exception) {
		if (exception != null && this.log.isLoggable(Level.FINEST)) {
			this.log.log(Level.FINEST, Messages.SARLJvmModelInferrer_0, exception);
		}
	}
1143359
@Override
  public void log(Level level, Object message, Throwable e) {
    if(level == null) {
      level = Level.FATAL;
    }

    switch(level) {
    case TRACE:
      logger.trace(message.toString(), e);
      break;
    case DEBUG:
      logger.debug(message.toString(), e);
      break;
    case INFO:
      logger.info(message.toString(), e);
      break;
    case WARN:
      logger.warn(message.toString(), e);
      break;
    case ERROR:
      logger.error(message.toString(), e);
      break;
    case FATAL:
      logger.error(message.toString(), e);
      break;
    default:
      logger.error("Unhandled Logging Level: " + level
        + " with log message: " + message.toString(), e);
    }
  }
1018079
public void info(final Throwable exception, final String message) {
		if (minimumLevelCoversInfo) {
			provider.log(STACKTRACE_DEPTH, tag, Level.INFO, exception, message, (Object[]) null);
		}
	}
940614
public function logException(Exception $exception, $message = null)
    {
        $msg = $exception->getMessage();
        if ($message != null) {
            $msg = "Message: " . $message . " Exception: " . $msg;
        }
        $this->doLog(LogHelper::LOG_LEVEL_FATAL, $msg, null);
    }
653598
private void log(final String level,
                   final String message,
                   final Throwable t) {
    StringBuffer buf = new StringBuffer();

    long millis  = System.currentTimeMillis();
    buf.append(millis - startTime);

    buf.append(" [");
    buf.append(Thread.currentThread().getName());
    buf.append("] ");

    buf.append(level);
    buf.append(" ");

    buf.append(loggerName);
    buf.append(" - ");

    buf.append(message);

    buf.append(LINE_SEPARATOR);

    System.out.print(buf.toString());
    if (t != null) {
      t.printStackTrace(System.out);
    }
    System.out.flush();
  }
812960
public void error(Object message) {
        log(Level.SEVERE, String.valueOf(message), null);
    }
760727
public void error(String message, Map<String, Object> custom) {
    log(null, custom, message, Level.ERROR);
  }
521201
public void logError(String message, Exception exception) {
        if (!(logError || globalLog.logError))
            return;
	
        if (errorLog != null)
            log(errorLog, "ERROR", owner, message, exception);
        else 
            log(globalLog.errorLog, "ERROR", owner, message, exception);
    }
466216
private static void log(FacesContext context, String msg, Exception e)
    {
        log.log(Level.SEVERE, msg, e);
    }
395853
public void exception(Throwable e) {
    final String msg = e.getMessage();
    log(Level.SEVERE, msg != null ? msg : "An exception occurred.", e);
  }
807586
public void log(final String tag, final int logLevel, final String msg, final Throwable exception) {
        if (aConsole != null) {
            aConsole.appendLog(tag, logLevel, msg, exception);
        }
        if (aFile != null) {
            aFile.appendLog(tag, logLevel, msg, exception);
        }
    }
705256
public static void queueException(final String level, final String message, final Throwable e) {
		try {
			LogAppender<LogEvent> appender = LogManager.getAppender();

			if (appender != null) {
				appender.append(LogEvent.newBuilder().level(level).message(message).exception(e).build());
			}
		} catch (Throwable t) {
			LOGGER.info("Unable to queue exception to Stackify Log API service: {} {} {}", level, message, e, t);
		}
	}
929833
void log(Level level, String msg, Exception e) {
        if (e != null)
            logger.log(level, msg, e);
    }
1190332
public static void error(Object message) {
		log(Level.ERROR, message, null, (Object[])null);
	}
1226094
public void log(final Level level, final String msg, final Throwable throwable) {
        switch (level) {
            case ERROR:
                if (proxy.isErrorEnabled()) {
                    if (proxy instanceof LocationAwareLogger) {
                        ((LocationAwareLogger) proxy).log(null, FQCN, LocationAwareLogger.ERROR_INT, msg, null, throwable);
                    } else {
                        proxy.error(msg, throwable);
                    }
                }

                break;
            case WARN:
                if (proxy.isWarnEnabled()) {
                    if (proxy instanceof LocationAwareLogger) {
                        ((LocationAwareLogger) proxy).log(null, FQCN, LocationAwareLogger.WARN_INT, msg, null, throwable);
                    } else {
                        proxy.warn(msg, throwable);
                    }
                }

                break;
            case INFO:
                if (proxy.isInfoEnabled()) {
                    if (proxy instanceof LocationAwareLogger) {
                        ((LocationAwareLogger) proxy).log(null, FQCN, LocationAwareLogger.INFO_INT, msg, null, throwable);
                    } else {
                        proxy.info(msg, throwable);
                    }
                }

                break;
            case DEBUG:
                if (proxy.isDebugEnabled()) {
                    if (proxy instanceof LocationAwareLogger) {
                        ((LocationAwareLogger) proxy).log(null, FQCN, LocationAwareLogger.DEBUG_INT, msg, null, throwable);
                    } else {
                        proxy.debug(msg, throwable);
                    }
                }

                break;
            case TRACE:
                if (proxy.isTraceEnabled()) {
                    if (proxy instanceof LocationAwareLogger) {
                        ((LocationAwareLogger) proxy).log(null, FQCN, LocationAwareLogger.TRACE_INT, msg, null, throwable);
                    } else {
                        proxy.trace(msg, throwable);
                    }
                }

                break;
            default:
                throw new IllegalStateException("Logging level [" + level + "] is invalid");
        }
    }