1

I am not able to load logback.xml from consul for my spring boot application. The consul configuration in bootstrap.properties is:

spring.cloud.consul.host=localhost
spring.cloud.consul.port=8500
spring.cloud.consul.enabled=true
spring.cloud.consul.config.fail-fast=true
spring.cloud.consul.config.format=properties
spring.cloud.consul.config.prefix=config
spring.cloud.consul.config.name=myapp
spring.cloud.consul.config.data-key=application.properties

The config/myapp folder contains both application.properties and logback.xml. I also changed the spring.cloud.consul.config.format to FILES and even then it is not loading logback.xml (also tried after removing spring.cloud.consul.config.data-key).

In the spring cloud document, it shows how to get YAML or properties file. So, can consul load only YAML or properties file only and not xml files? Is there anyway we can load logback.xml file with the configuration defined in bootstrap.properties? Or do we get those file using VM Argument -Dlogging.config as suggested in this answer.

adi
  • 43
  • 1
  • 5

0 Answers0