Package ch.qos.logback.core.joran.spi

Examples of ch.qos.logback.core.joran.spi.ConfigurationWatchList


  private ConfigurationWatchListUtil() {
  }

  public static void setMainWatchURL(Context context, URL url) {
    ConfigurationWatchList cwl = getConfigurationWatchList(context);
    if (cwl == null) {
      cwl = new ConfigurationWatchList();
      cwl.setContext(context);
      context.putObject(CoreConstants.CONFIGURATION_WATCH_LIST, cwl);
    } else {
      cwl.clear();
    }
    setConfigurationWatchListResetFlag(context, true);
    cwl.setMainURL(url);
  }
View Full Code Here


    setConfigurationWatchListResetFlag(context, true);
    cwl.setMainURL(url);
  }

  public static void addToWatchList(Context context, URL url) {
    ConfigurationWatchList cwl = getConfigurationWatchList(context);
    if (cwl == null) {
      addWarn(context, "Null ConfigurationWatchList. Cannot add " + url);
    } else {
      addInfo(context, "Adding [" + url + "] to configuration watch list.");
      cwl.addToWatchList(url);
    }
  }
View Full Code Here

  private ConfigurationWatchListUtil() {
  }

  public static void setMainWatchURL(Context context, URL url) {
    ConfigurationWatchList cwl = getConfigurationWatchList(context);
    if (cwl == null) {
      cwl = new ConfigurationWatchList();
      cwl.setContext(context);
      context.putObject(CoreConstants.CONFIGURATION_WATCH_LIST, cwl);
    } else {
      cwl.clear();
    }
    setConfigurationWatchListResetFlag(context, true);
    cwl.setMainURL(url);
  }
View Full Code Here

    setConfigurationWatchListResetFlag(context, true);
    cwl.setMainURL(url);
  }

  public static URL getMainWatchURL(Context context) {
    ConfigurationWatchList cwl = getConfigurationWatchList(context);
    if (cwl == null) {
      return null;
    } else {
      return cwl.getMainURL();
    }
  }
View Full Code Here

      return cwl.getMainURL();
    }
  }

  public static void addToWatchList(Context context, URL url) {
    ConfigurationWatchList cwl = getConfigurationWatchList(context);
    if (cwl == null) {
      addWarn(context, "Null ConfigurationWatchList. Cannot add " + url);
    } else {
      addInfo(context, "Adding [" + url + "] to configuration watch list.");
      cwl.addToWatchList(url);
    }
  }
View Full Code Here

  private ConfigurationWatchListUtil() {
  }

  public static void setMainWatchURL(Context context, URL url) {
    ConfigurationWatchList cwl = getConfigurationWatchList(context);
    if (cwl == null) {
      cwl = new ConfigurationWatchList();
      cwl.setContext(context);
      context.putObject(CoreConstants.CONFIGURATION_WATCH_LIST, cwl);
    } else {
      cwl.clear();
    }
    setConfigurationWatchListResetFlag(context, true);
    cwl.setMainURL(url);
  }
View Full Code Here

    setConfigurationWatchListResetFlag(context, true);
    cwl.setMainURL(url);
  }

  public static URL getMainWatchURL(Context context) {
    ConfigurationWatchList cwl = getConfigurationWatchList(context);
    if (cwl == null) {
      return null;
    } else {
      return cwl.getMainURL();
    }
  }
View Full Code Here

      return cwl.getMainURL();
    }
  }

  public static void addToWatchList(Context context, URL url) {
    ConfigurationWatchList cwl = getConfigurationWatchList(context);
    if (cwl == null) {
      addWarn(context, "Null ConfigurationWatchList. Cannot add " + url);
    } else {
      addInfo(context, "Adding [" + url + "] to configuration watch list.");
      cwl.addToWatchList(url);
    }
  }
View Full Code Here

    executorService.shutdown();
    executorService.awaitTermination(1000, TimeUnit.MILLISECONDS);
  }

  List<File> getConfigurationFileList(LoggerContext context) {
    ConfigurationWatchList configurationWatchList = ConfigurationWatchListUtil.getConfigurationWatchList(loggerContext);
    return configurationWatchList.getCopyOfFileWatchList();
  }
View Full Code Here

  @Test
  public void includeScanViaInputStreamSuppliedConfigFile() throws IOException, JoranException, InterruptedException {
    String configurationStr = "<configuration scan=\"true\" scanPeriod=\"50 millisecond\"><include resource=\"asResource/inner1.xml\"/></configuration>";
    configure(new ByteArrayInputStream(configurationStr.getBytes("UTF-8")));

    ConfigurationWatchList configurationWatchList = ConfigurationWatchListUtil.getConfigurationWatchList(loggerContext);
    assertNull(configurationWatchList.getMainURL());

    ReconfigureOnChangeFilter reconfigureOnChangeFilter = (ReconfigureOnChangeFilter) getFirstTurboFilter();
    // without a top level file, reconfigureOnChangeFilter should not start
    assertFalse(reconfigureOnChangeFilter.isStarted());
  }
View Full Code Here

TOP

Related Classes of ch.qos.logback.core.joran.spi.ConfigurationWatchList

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.