This generic form is intended to be used by wrappers.

@param priority priority of log to be generated.
@param message  the message to log
@param t        an Exception to be logged, if any.
426812
public void log( final Priority priority, final Object message, final Throwable t )
    {
        if ( priority == null )
        {
            return;
        }

        switch (priority.level)
        {
            case Level.FATAL_INT:
                this.fatal( message, t );
                break;
            case Level.ERROR_INT:
                this.error( message, t );
                break;
            case Level.WARN_INT:
                this.warn( message, t );
                break;
            case Level.INFO_INT:
                this.info( message, t );
                break;
            case Level.DEBUG_INT:
                this.debug( message, t );
                break;
            case Level.TRACE_INT:
            case Level.ALL_INT:
                this.trace( message, t );
                break;
            default:
                break;
        }
    }
294185
@Override
    public void debug(String message) {
        if(this.logger.isDebugEnabled()) {
            this.logger.debug(buildMessage(message));
        }
    }
691649
public final void trace(Object message, Throwable t) {

        if (isLevelEnabled(SimpleLog.LOG_LEVEL_TRACE)) {
            log(SimpleLog.LOG_LEVEL_TRACE, message, t);
        }
    }
233754
public static void message(String message) {
           getMessageCenter().notify(new Message(message, Message.Severity.Info));
       }
1152302
public static void logInfo(String message, Throwable t) {
		logInfo(message + SEP + getMessage(t));
	}
727094
public static void queueMessage(final String level, final String message) {
		try {
			LogAppender<LogEvent> appender = LogManager.getAppender();

			if (appender != null) {
				LogEvent.Builder builder = LogEvent.newBuilder();
				builder.level(level);
				builder.message(message);
				
				if ((level != null) && ("ERROR".equals(level.toUpperCase()))) {
					StackTraceElement[] stackTrace = new Throwable().getStackTrace();

					if ((stackTrace != null) && (1 < stackTrace.length)) {
						StackTraceElement caller = stackTrace[1];
						builder.className(caller.getClassName());
						builder.methodName(caller.getMethodName());
						builder.lineNumber(caller.getLineNumber());						
					}
				}
				
				appender.append(builder.build());
			}
		} catch (Throwable t) {
			LOGGER.info("Unable to queue message to Stackify Log API service: {} {}", level, message, t);
		}
	}
1084228
public static void logWarn(String message, Throwable t) {
		logWarn(message + SEP + getMessage(t));
	}
593789
@Override
    public void messageLogged(final BuildEvent event) {
        final int priority = event.getPriority();
        // Filter out messages based on priority
        if (priority <= msgOutputLevel) {

            final StringBuilder message = new StringBuilder();
            if (event.getTask() != null && !emacsMode) {
                // Print out the name of the task if we're in one
                final String name = event.getTask().getTaskName();
                String label = "[" + name + "] ";
                final int size = LEFT_COLUMN_SIZE - label.length();
                final StringBuilder tmp = new StringBuilder();
                for (int i = 0; i < size; i++) {
                    tmp.append(" ");
                }
                tmp.append(label);
                label = tmp.toString();

                BufferedReader r = null;
                try {
                    r = new BufferedReader(new StringReader(event.getMessage()));
                    String line = r.readLine();
                    boolean first = true;
                    do {
                        if (first) {
                            if (line == null) {
                                message.append(label);
                                break;
                            }
                        } else {
                            message.append(StringUtils.LINE_SEP);
                        }
                        first = false;
                        message.append(label).append(line);
                        line = r.readLine();
                    } while (line != null);
                } catch (final IOException e) {
                    // shouldn't be possible
                    message.append(label).append(event.getMessage());
                } finally {
                    if (r != null) {
                        FileUtils.close(r);
                    }
                }

            } else {
                // emacs mode or there is no task
                message.append(event.getMessage());
            }
            final Throwable ex = event.getException();
            if (Project.MSG_DEBUG <= msgOutputLevel && ex != null) {
                message.append(StringUtils.getStackTrace(ex));
            }

            final String msg = message.toString();
            if (priority != Project.MSG_ERR) {
                printMessage(msg, out, priority);
            } else {
                printMessage(msg, err, priority);
            }
            log(msg);
        }
    }
816150
public void log(final String message) {
		if (!SwingUtilities.isEventDispatchThread()) {
			SwingUtilities.invokeLater(new Runnable() {
				@Override
				public void run() {
					log(message);
				}
			});
		} else {
			log.append(message);
		}
	}
173289
public void warn(Object message, Throwable t) {
        doLog(Level.WARN, FQCN, message, null, t);
    }
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();
  }
637361
private void log(final String message) {
    if (this.optionalParams.isPresent()) {
      logger.log(logLevel, message, params);
    } else {
      logger.log(logLevel, message);
    }
  }
881924
public void info(Object message, Throwable t) {
        doLog(Level.INFO, FQCN, message, null, t);
    }
647793
public void log(String message, Throwable t) {
	System.out.println(message);
	System.out.println(getStackTrace(t));
    }
1158284
public static void log(String message, Importance importance) {
		if(listener != null) {
			listener.log(message, importance);
		}
	}
879957
public void error(Object message, Throwable t) {
        logger.error(String.valueOf(message), t);
    }
1085956
public static void log(IoSession session, Logger logger, String message, Throwable t) {
        boolean isIOException = t instanceof IOException;
        if (isIOException && !logger.isInfoEnabled()) {
            return;
        }
        if (logger.isWarnEnabled()) {
            String finalMessage = t.getCause() == null ? message : message + ", caused by " + t.getCause();
            finalMessage = addSession(finalMessage, session);
            if (isIOException) {
                logIOException(finalMessage, logger, t);
            }
            else if (logger.isInfoEnabled()) {
                logger.warn(finalMessage, t);
            }
            else {
                logger.warn(finalMessage);
            }
        }
    }