Package com.allen_sauer.gwt.log.client

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


    }
  }

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


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

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

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

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

  public final Logger getLogger(Class clazz) {
    // TODO Replace string comparisons with Class expressions in GWT 1.5
    String className = clazz.toString().replaceAll(".* ", "");
    for (Iterator iterator = loggers.iterator(); iterator.hasNext();) {
      Logger logger = (Logger) iterator.next();
      if (GWT.getTypeName(logger).equals(className)) {
        return logger;
      }
    }
    return null;
View Full Code Here

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

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

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

  public final void warn(String message, Throwable e) {
    if (isWarnEnabled()) {
      message = format(toPrefix(LOG_LEVEL_TEXT_WARN), message);
      for (Iterator iterator = loggers.iterator(); iterator.hasNext();) {
        Logger logger = (Logger) iterator.next();
        try {
          logger.warn(message, e);
        } catch (RuntimeException e1) {
          iterator.remove();
          diagnostic("Removing '" + GWT.getTypeName(logger) + "' due to unexecpted exception", e1);
        }
      }
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

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.