Package com.allen_sauer.gwt.log.client

Examples of com.allen_sauer.gwt.log.client.Logger


              + getLowestLogLevel());
      level = getLowestLogLevel();
    }

    for (Iterator<Logger> iterator = loggers.iterator(); iterator.hasNext();) {
      Logger logger = iterator.next();
      try {
        logger.setCurrentLogLevel(level);
      } catch (RuntimeException e1) {
        iterator.remove();
        diagnostic(
            "Removing '" + logger.getClass().getName() + "' due to unexecpted exception", e1);
      }
    }
    return level;
  }
View Full Code Here


  }

  @Override
  public final void clear() {
    for (Iterator<Logger> iterator = loggers.iterator(); iterator.hasNext();) {
      Logger logger = iterator.next();
      try {
        logger.clear();
      } catch (RuntimeException e1) {
        iterator.remove();
        diagnostic("Removing '" + logger.getClass().getName() + "' due to unexecpted exception", e1);
      }
    }
  }
View Full Code Here

  @Override
  public final void debug(String message, Throwable e) {
    if (isDebugEnabled()) {
      message = FORMATTER.format(LOG_LEVEL_TEXT_DEBUG, message);
      for (Iterator<Logger> iterator = loggers.iterator(); iterator.hasNext();) {
        Logger logger = iterator.next();
        try {
          logger.debug(message, e);
        } catch (RuntimeException e1) {
          iterator.remove();
          diagnostic("Removing '" + logger.getClass().getName() + "' due to unexecpted exception",
              e1);
        }
      }
    }
  }
View Full Code Here

  public void diagnostic(String message, final Throwable e) {
    final String msg = FORMATTER.format("gwt-log", message);
    DeferredCommand.addCommand(new Command() {
      public void execute() {
        for (Iterator<Logger> iterator = loggers.iterator(); iterator.hasNext();) {
          Logger logger = iterator.next();
          try {
            logger.diagnostic(msg, e);
          } catch (RuntimeException e1) {
            iterator.remove();
            diagnostic(
                "Removing '" + logger.getClass().getName() + "' due to unexecpted exception", e1);
          }
        }
      }
    });
  }
View Full Code Here

  @Override
  public final void error(String message, Throwable e) {
    if (isErrorEnabled()) {
      message = FORMATTER.format(LOG_LEVEL_TEXT_ERROR, message);
      for (Iterator<Logger> iterator = loggers.iterator(); iterator.hasNext();) {
        Logger logger = iterator.next();
        try {
          logger.error(message, e);
        } catch (RuntimeException e1) {
          iterator.remove();
          diagnostic("Removing '" + logger.getClass().getName() + "' due to unexecpted exception",
              e1);
        }
      }
    }
  }
View Full Code Here

  @Override
  public final void fatal(String message, Throwable e) {
    if (isFatalEnabled()) {
      message = FORMATTER.format(LOG_LEVEL_TEXT_FATAL, message);
      for (Iterator<Logger> iterator = loggers.iterator(); iterator.hasNext();) {
        Logger logger = iterator.next();
        try {
          logger.fatal(message, e);
        } catch (RuntimeException e1) {
          iterator.remove();
          diagnostic("Removing '" + logger.getClass().getName() + "' due to unexecpted exception",
              e1);
        }
      }
    }
  }
View Full Code Here

  @Override
  public final void info(String message, Throwable e) {
    if (isInfoEnabled()) {
      message = FORMATTER.format(LOG_LEVEL_TEXT_INFO, message);
      for (Iterator<Logger> iterator = loggers.iterator(); iterator.hasNext();) {
        Logger logger = iterator.next();
        try {
          logger.info(message, e);
        } catch (RuntimeException e1) {
          iterator.remove();
          diagnostic("Removing '" + logger.getClass().getName() + "' due to unexecpted exception",
              e1);
        }
      }
    }
  }
View Full Code Here

  @Override
  public final void trace(String message, Throwable e) {
    if (isTraceEnabled()) {
      message = FORMATTER.format(LOG_LEVEL_TEXT_TRACE, message);
      for (Iterator<Logger> iterator = loggers.iterator(); iterator.hasNext();) {
        Logger logger = iterator.next();
        try {
          logger.trace(message, e);
        } catch (RuntimeException e1) {
          iterator.remove();
          diagnostic("Removing '" + logger.getClass().getName() + "' due to unexecpted exception",
              e1);
        }
      }
    }
  }
View Full Code Here

  @Override
  public final void warn(String message, Throwable e) {
    if (isWarnEnabled()) {
      message = FORMATTER.format(LOG_LEVEL_TEXT_WARN, message);
      for (Iterator<Logger> iterator = loggers.iterator(); iterator.hasNext();) {
        Logger logger = iterator.next();
        try {
          logger.warn(message, e);
        } catch (RuntimeException e1) {
          iterator.remove();
          diagnostic("Removing '" + logger.getClass().getName() + "' due to unexecpted exception",
              e1);
        }
      }
    }
  }
View Full Code Here

          + " due to compile time minimum of " + getLowestLogLevel());
      level = getLowestLogLevel();
    }

    for (Iterator<Logger> iterator = loggers.iterator(); iterator.hasNext();) {
      Logger logger = iterator.next();
      try {
        logger.setCurrentLogLevel(level);
      } catch (RuntimeException e1) {
        iterator.remove();
        diagnostic("Removing '" + logger.getClass().getName() + "' due to unexecpted exception", e1);
      }
    }
    return level;
  }
View Full Code Here

TOP

Related Classes of com.allen_sauer.gwt.log.client.Logger

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.