Configuration implements LogConfigListener { static LogLevelUpdateScope getLogLevelUpdateScope() { try { return LogLevelUpdateScope.valueOf(System.getProperty(LOG_LEVEL_UPDATE_SCOPE_PROPERTY, GEODE_LOGGERS.name()).toUpperCase()); } catch (IllegalArgumentException e) { return GEODE_LOGGERS; } } private  Configuration(final LogLevelUpdateOccurs logLevelUpdateOccurs,
      final LogLevelUpdateScope logLevelUpdateScope, final LoggingProvider loggingProvider); static Configuration create(); @VisibleForTesting static Configuration create(final LoggingProvider loggingProvider); @VisibleForTesting static Configuration create(final LogLevelUpdateOccurs logLevelUpdateOccurs,
      final LogLevelUpdateScope logLevelUpdateScope); @VisibleForTesting static Configuration create(final LogLevelUpdateOccurs logLevelUpdateOccurs,
      final LogLevelUpdateScope logLevelUpdateScope, final LoggingProvider loggingProvider); synchronized void initialize(final LogConfigSupplier logConfigSupplier); @Override synchronized void configChanged(); synchronized void shutdown(); @VisibleForTesting
  static final int DEFAULT_LOGWRITER_LEVEL; static final String STARTUP_CONFIGURATION; static final String CLI_CONFIG; static final String LOG_LEVEL_UPDATE_OCCURS_PROPERTY; }
@Test public void getLogLevelUpdateScope_defaultsTo_GEODE_LOGGERS() { assertThat(Configuration.getLogLevelUpdateScope()).isEqualTo(LogLevelUpdateScope.GEODE_LOGGERS); }
@Test public void getLogLevelUpdateScope_usesSystemPropertySetTo_GEODE_LOGGERS() { System.setProperty(LOG_LEVEL_UPDATE_SCOPE_PROPERTY, LogLevelUpdateScope.GEODE_LOGGERS.name()); assertThat(Configuration.getLogLevelUpdateScope()).isEqualTo(LogLevelUpdateScope.GEODE_LOGGERS); }
@Test public void getLogLevelUpdateScope_usesSystemPropertySetTo_GEODE_AND_SECURITY_LOGGERS() { System.setProperty(LOG_LEVEL_UPDATE_SCOPE_PROPERTY, LogLevelUpdateScope.GEODE_AND_SECURITY_LOGGERS.name()); assertThat(Configuration.getLogLevelUpdateScope()) .isEqualTo(LogLevelUpdateScope.GEODE_AND_SECURITY_LOGGERS); }
@Test public void getLogLevelUpdateScope_usesSystemPropertySetTo_GEODE_AND_APPLICATION_LOGGERS() { System.setProperty(LOG_LEVEL_UPDATE_SCOPE_PROPERTY, LogLevelUpdateScope.GEODE_AND_APPLICATION_LOGGERS.name()); assertThat(Configuration.getLogLevelUpdateScope()) .isEqualTo(LogLevelUpdateScope.GEODE_AND_APPLICATION_LOGGERS); }
@Test public void getLogLevelUpdateScope_usesSystemPropertySetTo_ALL_LOGGERS() { System.setProperty(LOG_LEVEL_UPDATE_SCOPE_PROPERTY, LogLevelUpdateScope.ALL_LOGGERS.name()); assertThat(Configuration.getLogLevelUpdateScope()).isEqualTo(LogLevelUpdateScope.ALL_LOGGERS); }
@Test public void getLogLevelUpdateScope_usesSystemPropertySetTo_geode_loggers() { System.setProperty(LOG_LEVEL_UPDATE_SCOPE_PROPERTY, LogLevelUpdateScope.GEODE_LOGGERS.name().toLowerCase()); assertThat(Configuration.getLogLevelUpdateScope()).isEqualTo(LogLevelUpdateScope.GEODE_LOGGERS); }
@Test public void getLogLevelUpdateScope_usesSystemPropertySetTo_geode_and_security_loggers() { System.setProperty(LOG_LEVEL_UPDATE_SCOPE_PROPERTY, LogLevelUpdateScope.GEODE_AND_SECURITY_LOGGERS.name().toLowerCase()); assertThat(Configuration.getLogLevelUpdateScope()) .isEqualTo(LogLevelUpdateScope.GEODE_AND_SECURITY_LOGGERS); }
@Test public void getLogLevelUpdateScope_usesSystemPropertySetTo_geode_and_application_loggers() { System.setProperty(LOG_LEVEL_UPDATE_SCOPE_PROPERTY, LogLevelUpdateScope.GEODE_AND_APPLICATION_LOGGERS.name().toLowerCase()); assertThat(Configuration.getLogLevelUpdateScope()) .isEqualTo(LogLevelUpdateScope.GEODE_AND_APPLICATION_LOGGERS); }
@Test public void getLogLevelUpdateScope_usesSystemPropertySetTo_all_loggers() { System.setProperty(LOG_LEVEL_UPDATE_SCOPE_PROPERTY, LogLevelUpdateScope.ALL_LOGGERS.name().toLowerCase()); assertThat(Configuration.getLogLevelUpdateScope()).isEqualTo(LogLevelUpdateScope.ALL_LOGGERS); }
@Test public void getLogLevelUpdateScope_usesDefaultWhenSystemPropertySetTo_gibberish() { System.setProperty(LOG_LEVEL_UPDATE_SCOPE_PROPERTY, "gibberish"); assertThat(Configuration.getLogLevelUpdateScope()).isEqualTo(LogLevelUpdateScope.GEODE_LOGGERS); }