title: Can spring-boot application.properties file woking with log4j2.xml configuration?
body: <p>I want to define high-level file logging in application.properties as a convenience to leverage my log4j2.xml file configuration. By itself my log4j2 config is working fine, however I was hoping to control logging levels and log file and path info from the application.properties file. I have the spring-boot-starter-log4j2 dependency in the application's pom file.</p>
  
  <p>In log4j2.xml I have as one of the properties</p>
  
  <pre><code>&lt;Property name="LOG_FILE"&gt;${LOG-DIR}/test.log&lt;/Property&gt;
  </code></pre>
  
  <p>, where LOG-DIR is defined in another (previous) property in the same file. In my application.properties file, I have</p>
  
  <pre><code>logging.file=LOG_FILE 
  </code></pre>
  
  <p>as a property, plus several level properties such as</p>
  
  <pre><code>logging.level.org.springframework.web=DEBUG
  </code></pre>
  
  <p>none of these log-related properties as defined in my application.properties file are working to build the corresponding log file. Again, when I simply use log4j2.xml by itself it works fine, but wanted to take advantage of the convenience of application.properties for logging configuration.</p>
  
  <p>Any insights into what I am doing wrong are greatly appreciated. thank you </p>