test_class.declarator: configurationLogger
test_class.modifier: private
test_class.original_string: private ConfigurationLogger configurationLogger;
test_class.type: ConfigurationLogger
test_class.var_name: configurationLogger
test_class.declarator: logger
test_class.modifier: private
test_class.original_string: private Logger logger;
test_class.type: Logger
test_class.var_name: logger
test_class.file: stagemonitor-core/src/test/java/org/stagemonitor/core/configuration/ConfigurationLoggerTest.java
test_class.identifier: ConfigurationLoggerTest
test_case.body: @Test
  	public void testLogUrlWithBasicAuth() throws Exception {
  		class Provider extends ConfigurationOptionProvider {
  			private ConfigurationOption<List<URL>> urlBasicAuthOption = ConfigurationOption.urlsOption()
  					.key("foo")
  					.buildRequired();
  		}
  		final ConfigurationRegistry configurationRegistry = ConfigurationRegistry.builder()
  				.addOptionProvider(new Provider())
  				.addConfigSource(new SimpleSource("source").add("foo", "http://user:pwd@example.com"))
  				.build();
  		configurationLogger.logConfiguration(configurationRegistry);
  
  		verify(logger).info(startsWith("# stagemonitor configuration"));
  		verify(logger).info(eq("{}: {} (source: {})"), eq("foo"), eq("http://user:XXX@example.com"), eq("source"));
  	}
test_case.class_method_signature: ConfigurationLoggerTest.testLogUrlWithBasicAuth()
test_case.full_signature: @Test public void testLogUrlWithBasicAuth()
test_case.identifier: testLogUrlWithBasicAuth
test_case.invocations: buildRequired key urlsOption build addConfigSource addOptionProvider builder add logConfiguration info verify startsWith info verify eq eq eq eq
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testLogUrlWithBasicAuth()
focal_class.declarator: logger
focal_class.modifier: private final
focal_class.original_string: private final Logger logger;
focal_class.type: Logger
focal_class.var_name: logger
focal_class.file: stagemonitor-core/src/main/java/org/stagemonitor/core/configuration/ConfigurationLogger.java
focal_class.identifier: ConfigurationLogger
focal_class.class_method_signature: ConfigurationLogger.ConfigurationLogger()
focal_class.full_signature: public  ConfigurationLogger()
focal_class.identifier: ConfigurationLogger
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  ConfigurationLogger()
focal_class.class_method_signature: ConfigurationLogger.ConfigurationLogger(Logger logger)
focal_class.full_signature: public  ConfigurationLogger(Logger logger)
focal_class.identifier: ConfigurationLogger
focal_class.modifiers: public
focal_class.parameters: (Logger logger)
focal_class.signature:  ConfigurationLogger(Logger logger)
focal_class.class_method_signature: ConfigurationLogger.logConfiguration(ConfigurationRegistry configuration)
focal_class.full_signature: public void logConfiguration(ConfigurationRegistry configuration)
focal_class.identifier: logConfiguration
focal_class.modifiers: public
focal_class.parameters: (ConfigurationRegistry configuration)
focal_class.return: void
focal_class.signature: void logConfiguration(ConfigurationRegistry configuration)
focal_class.class_method_signature: ConfigurationLogger.prepareOptionValueForLog(ConfigurationOption<?> option)
focal_class.full_signature: private static String prepareOptionValueForLog(ConfigurationOption<?> option)
focal_class.identifier: prepareOptionValueForLog
focal_class.modifiers: private static
focal_class.parameters: (ConfigurationOption<?> option)
focal_class.return: String
focal_class.signature: String prepareOptionValueForLog(ConfigurationOption<?> option)
focal_method.body: public void logConfiguration(ConfigurationRegistry configuration) {
  		logger.info("# stagemonitor configuration, listing non-default values:");
  		boolean hasOnlyDefaultOptions = true;
  
  		for (List<ConfigurationOption<?>> options : configuration.getConfigurationOptionsByCategory().values()) {
  			for (ConfigurationOption<?> option : options) {
  				if (!option.isDefault()) {
  					hasOnlyDefaultOptions = false;
  					logger.info("{}: {} (source: {})",
  							option.getKey(), prepareOptionValueForLog(option), option.getNameOfCurrentConfigurationSource());
  					if (option.getTags().contains("deprecated")) {
  						logger.warn("Detected usage of deprecated configuration option '{}'. " +
  								"This option might be removed in the future. " +
  								"Please refer to the documentation about alternatives.", option.getKey());
  					}
  
  					if (!option.getKey().equals(option.getUsedKey())) {
  						logger.warn("Detected usage of an old configuration key: '{}'. Please use '{}' instead.",
  								option.getUsedKey(), option.getKey());
  					}
  				}
  			}
  		}
  
  		if (hasOnlyDefaultOptions) {
  			logger.warn("stagemonitor has not been configured. Have a look at " +
  					"https://github.com/stagemonitor/stagemonitor/wiki/How-should-I-configure-stagemonitor%3F " +
  					"and " +
  					"https://github.com/stagemonitor/stagemonitor/wiki/Configuration-Options " +
  					"for further instructions");
  		}
  	}
focal_method.class_method_signature: ConfigurationLogger.logConfiguration(ConfigurationRegistry configuration)
focal_method.full_signature: public void logConfiguration(ConfigurationRegistry configuration)
focal_method.identifier: logConfiguration
focal_method.invocations: info values getConfigurationOptionsByCategory isDefault info getKey prepareOptionValueForLog getNameOfCurrentConfigurationSource contains getTags warn getKey equals getKey getUsedKey warn getUsedKey getKey warn
focal_method.modifiers: public
focal_method.parameters: (ConfigurationRegistry configuration)
focal_method.return: void
focal_method.signature: void logConfiguration(ConfigurationRegistry configuration)