/**
   * Main dispatch method
   *
   * <p>All messages logged go through this method. According to the report configuration, the
   * message will either be ignored, logged or raise an exception.
   *
   * @param message the message to log
   * @throws ProcessingException the message's level and report configuration require that an
   *     exception be thrown
   */
  protected final void dispatch(final ProcessingMessage message) throws ProcessingException {
    final LogLevel level = message.getLogLevel();

    if (level.compareTo(exceptionThreshold) >= 0) throw message.asException();
    if (level.compareTo(currentLevel) > 0) currentLevel = level;
    if (level.compareTo(logLevel) >= 0) log(level, message);
  }
 @Override
 public final void warn(final ProcessingMessage message) throws ProcessingException {
   dispatch(message.setLogLevel(LogLevel.WARNING));
 }
 @Override
 public final void info(final ProcessingMessage message) throws ProcessingException {
   dispatch(message.setLogLevel(LogLevel.INFO));
 }
 @Override
 public final void debug(final ProcessingMessage message) throws ProcessingException {
   dispatch(message.setLogLevel(LogLevel.DEBUG));
 }
 @Override
 public final void fatal(final ProcessingMessage message) throws ProcessingException {
   dispatch(message.setLogLevel(LogLevel.FATAL));
 }
 @Override
 public final void error(final ProcessingMessage message) throws ProcessingException {
   dispatch(message.setLogLevel(LogLevel.ERROR));
 }