Package ch.qos.logback.core.status

Examples of ch.qos.logback.core.status.ErrorStatus


  private static void addError(LoggerContext context, Object origin, String msg, Throwable t) {
    StatusManager sm = context.getStatusManager();
    if (sm == null) {
      return;
    }
    sm.add(new ErrorStatus(msg, origin, t));
  }
View Full Code Here


        // avoid directly referring to GafferConfigurator so as to avoid
        // loading  groovy.lang.GroovyObject . See also http://jira.qos.ch/browse/LBCLASSIC-214
        GafferUtil.runGafferConfiguratorOn(loggerContext, this, url);
      } else {
        StatusManager sm = loggerContext.getStatusManager();
        sm.add(new ErrorStatus("Groovy classes are not available on the class path. ABORTING INITIALIZATION.",
                loggerContext));
      }
    } else if (url.toString().endsWith("xml")) {
      JoranConfigurator configurator = new JoranConfigurator();
      configurator.setContext(loggerContext);
View Full Code Here

    Set<URL> urlSet = null;
    StatusManager sm = loggerContext.getStatusManager();
    try {
      urlSet = Loader.getResourceOccurrenceCount(resourceName, classLoader);
    } catch (IOException e) {
      sm.add(new ErrorStatus("Failed to get url list for resource [" + resourceName + "]",
              loggerContext, e));
    }
    if (urlSet != null && urlSet.size() > 1) {
      sm.add(new WarnStatus("Resource [" + resourceName + "] occurs multiple times on the classpath.",
              loggerContext));
View Full Code Here

          errorCount++;
          if (errorCount < CoreConstants.MAX_ERROR_COUNT) {
            addError("Exception thrown for evaluator named [" + ee.getName()
                    + "]", eex);
          } else if (errorCount == CoreConstants.MAX_ERROR_COUNT) {
            ErrorStatus errorStatus = new ErrorStatus(
                    "Exception thrown for evaluator named [" + ee.getName() + "].",
                    this, eex);
            errorStatus.add(new ErrorStatus(
                    "This was the last warning about this evaluator's errors."
                            + "We don't want the StatusManager to get flooded.", this));
            addStatus(errorStatus);
          }
        }
View Full Code Here

  }

  final void noAppenderDefinedWarning(final Logger logger) {
    if (noAppenderWarning++ == 0) {
      getStatusManager().add(
          new ErrorStatus("No appenders present in context [" + getName()
              + "] for logger [" + logger.getName() + "].", logger));
    }
  }
View Full Code Here

    File configFile = new File(fileName);
    if (configFile.exists()) {
      runJoranOnFile(configFile);
    } else {
      getStatusManager().add(
              new ErrorStatus("Could not find logback-access configuration file [" + fileName + "]", this));
    }
    if (!isQuiet()) {
      StatusPrinter.print(getStatusManager());
    }
    started = true;
View Full Code Here

          errorCount++;
          if (errorCount < MAX_ERROR_COUNT) {
            addError("Exception thrown for evaluator named [" + ee.getName()
                + "]", eex);
          } else if (errorCount == MAX_ERROR_COUNT) {
            ErrorStatus errorStatus = new ErrorStatus(
                "Exception thrown for evaluator named [" + ee.getName() + "].",
                this, eex);
            errorStatus.add(new ErrorStatus("This was the last warning about this evaluator's errors." +
                                "We don't want the StatusManager to get flooded.", this));
            addStatus(errorStatus);
          }
        }
      }
View Full Code Here

          errorCount++;
          if (errorCount < MAX_ERROR_COUNT) {
            addError("Exception thrown for evaluator named [" + ee.getName()
                + "]", eex);
          } else if (errorCount == MAX_ERROR_COUNT) {
            ErrorStatus errorStatus = new ErrorStatus(
                "Exception thrown for evaluator named [" + ee.getName() + "].",
                this, eex);
            errorStatus.add(new ErrorStatus("This was the last warning about this evaluator's errors." +
                                "We don't want the StatusManager to get flooded.", this));
            addStatus(errorStatus);
          }

        }
View Full Code Here

  private static void addError(LoggerContext context, Object origin, String msg, Throwable t) {
    StatusManager sm = context.getStatusManager();
    if (sm == null) {
      return;
    }
    sm.add(new ErrorStatus(msg, origin, t));
  }
View Full Code Here

          errorCount++;
          if (errorCount < CoreConstants.MAX_ERROR_COUNT) {
            addError("Exception thrown for evaluator named [" + ee.getName()
                    + "]", eex);
          } else if (errorCount == CoreConstants.MAX_ERROR_COUNT) {
            ErrorStatus errorStatus = new ErrorStatus(
                    "Exception thrown for evaluator named [" + ee.getName() + "].",
                    this, eex);
            errorStatus.add(new ErrorStatus(
                    "This was the last warning about this evaluator's errors."
                            + "We don't want the StatusManager to get flooded.", this));
            addStatus(errorStatus);
          }
        }
View Full Code Here

TOP

Related Classes of ch.qos.logback.core.status.ErrorStatus

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.