/** * Configures logging without Elasticsearch configuration files based on the system property "es.logger.level" only. As such, any * logging will be written to the console. */ static void configureLoggingWithoutConfig() { // initialize default for es.logger.level because we will not read the log4j2.properties final String loggerLevel = System.getProperty("es.logger.level", Level.INFO.name()); final Settings settings = Settings.builder().put("logger.level", loggerLevel).build(); LogConfigurator.configureWithoutConfig(settings); }
/** * Configures logging without Elasticsearch configuration files based on the system property "es.logger.level" only. As such, any * logging will be written to the console. */ static void configureLoggingWithoutConfig() { // initialize default for es.logger.level because we will not read the log4j2.properties final String loggerLevel = System.getProperty("es.logger.level", Level.INFO.name()); final Settings settings = Settings.builder().put("logger.level", loggerLevel).build(); LogConfigurator.configureWithoutConfig(settings); }
/** * Configures logging without Elasticsearch configuration files based on the system property "es.logger.level" only. As such, any * logging will be written to the console. */ static void configureLoggingWithoutConfig() { // initialize default for es.logger.level because we will not read the log4j2.properties final String loggerLevel = System.getProperty("es.logger.level", Level.INFO.name()); final Settings settings = Settings.builder().put("logger.level", loggerLevel).build(); LogConfigurator.configureWithoutConfig(settings); }
LogConfigurator.configureWithoutConfig(settings);