I am creating a Spring-boot application in which I would like to externalise the logback file. Reason I am doing this is to provide the flexibility of the consumer to decide in which location they would get the logs for the API. In order to achieve this I have added logging.config entry in my application.properties as below
logging.config=file:${CONFIG_HOME}apilogback.xml
CONFIG_HOME would be a environment variable that points to a common location for all the configuration files. Sample value given to CONFIG_HOME is C:/SWS/apache-tomcat-8.5.16/appconfig/ When I am running my API using tomcat rather than picking up the value of logging.config mentioned in the application.properties file it is picking up the default value defined in catalina.bat. Default value in catalina.bat is as follows :
LOGGING_CONFIG=-Djava.util.logging.config.file="%CATALINA_BASE%\conf\logging.properties"
To my surprise this seems to be working fine while running in a unix environment but not in a windows environment. Is there a way to make sure we are loading value of logging.config from application.properties of my API.
.