Package ch.qos.logback.core.status

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


  }
 
  public static void configure(LoggerContext lc) {
    StatusManager sm = lc.getStatusManager();
    if(sm != null)  {
     sm.add(new InfoStatus("Setting up default configuration.", lc));
    }
    ConsoleAppender<ILoggingEvent> ca = new ConsoleAppender<ILoggingEvent>();
    ca.setContext(lc);
    ca.setName("console");
    PatternLayout pl = new PatternLayout();
View Full Code Here


      String tomcatHomeProperty = OptionHelper
          .getSystemProperty("catalina.home");

      filename = tomcatHomeProperty + File.separatorChar + DEFAULT_CONFIG_FILE;
      getStatusManager().add(
          new InfoStatus("filename property not set. Assuming [" + filename
              + "]", this));
    }
    File configFile = new File(filename);
    if (configFile.exists()) {
      try {
View Full Code Here

    String jndiEntryForConfigResource = JNDIUtil.lookup(ctx,
        JNDI_CONFIGURATION_RESOURCE);
    // Do we have a dedicated configuration file?
    if (jndiEntryForConfigResource != null) {
      sm.add(new InfoStatus("Searching for [" + jndiEntryForConfigResource
          + "]", this));
      URL url = urlByResourceName(sm, jndiEntryForConfigResource);
      if (url == null) {
        String msg = "The jndi resource [" + jndiEntryForConfigResource
            + "] for context [" + loggerContext.getName()
View Full Code Here

      return urlByResourceName(sm, resourceByConvention);
    }
  }

  private URL urlByResourceName(StatusManager sm, String resourceName) {
    sm.add(new InfoStatus("Searching for [" + resourceName + "]",
        this));
    URL url = Loader.getResource(resourceName, Loader.getTCL());
    if (url != null) {
      return url;
    }
View Full Code Here

  }
 
  private void statusOnResourceSearch(String resourceName, ClassLoader classLoader, URL url) {
    StatusManager sm = loggerContext.getStatusManager();
    if (url == null) {
      sm.add(new InfoStatus("Could NOT find resource [" + resourceName + "]",
          loggerContext));
    } else {
      sm.add(new InfoStatus("Found resource [" + resourceName + "] at ["+url.toString()+"]",
          loggerContext));
      multiplicityWarning(resourceName, classLoader);
    }
  }
View Full Code Here

        jc.setContext(context);
        lc.reset();
        try {
          jc.doConfigure(fileToScan);
          lc.getStatusManager().add(
                  new InfoStatus("done resetting the logging context", this));
        } catch (JoranException e) {
          addError("Failure during reconfiguration", e);
        }
      }
    }
View Full Code Here

      if (getName() == null) {
        setName("LogbackRequestLog");
      }
      RequestLogRegistry.register(this);
      getStatusManager().add(
          new InfoStatus("RequestLog added to RequestLogRegistry with name: "
              + getName(), this));

      started = true;

    } catch (JoranException e) {
View Full Code Here

      String tomcatHomeProperty = OptionHelper
          .getSystemProperty("catalina.home");

      filename = tomcatHomeProperty + File.separatorChar + DEFAULT_CONFIG_FILE;
      getStatusManager().add(
          new InfoStatus("filename property not set. Assuming [" + filename
              + "]", this));
    }
    File configFile = new File(filename);
    if (configFile.exists()) {
      try {
View Full Code Here

      String tomcatHomeProperty = OptionHelper
          .getSystemProperty("catalina.home");

      filename = tomcatHomeProperty + File.separatorChar + DEFAULT_CONFIG_FILE;
      getStatusManager().add(
          new InfoStatus("filename property not set. Assuming [" + filename
              + "]", this));
    }
    File configFile = new File(filename);
    if (configFile.exists()) {
      try {
View Full Code Here

      if (getName() == null) {
        setName("LogbackRequestLog");
      }
      RequestLogRegistry.register(this);
      getStatusManager().add(
          new InfoStatus("RequestLog added to RequestLogRegistry with name: "
              + getName(), this));

      started = true;

    } catch (JoranException e) {
View Full Code Here

TOP

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

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.