title: where to put the log4j.properties file in a spring boot application
body: <p>I have created a <code>log4j.properties</code> file, and I have put it in the resources folder as the <code>application.properties</code> file, in this file I have this line : <code>logging.config=log4j.properties</code> which indicated the name of my log4j properties file, but when I run my application I'm getting this error on my console :</p>
  
  <pre><code>Logging system failed to initialize using configuration from 'log4j.properties'
  java.io.FileNotFoundException: C:\Users\***\Desktop\CapRecrute\log4j.properties (The system cannot find the file specified)
  </code></pre>
  
  <p>so I tried to change the <code>logging.config</code> property to <code>src\\main\\resources\\log4j.properties</code>, and then I got another error :</p>
  
  <pre><code>java.lang.IllegalStateException: Could not initialize Logback logging from src\main\resources\log4j.properties ... Caused by: ch.qos.logback.core.LogbackException: Unexpected filename extension of file [file:/C:/Users/Aimad%20MAJDOU/Desktop/CapRecrute/src/main/resources/log4j.properties]. Should be either .groovy or .xml
  </code></pre>
  
  <p>in my pom file I have this :</p>
  
  <pre><code>&lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-tomcat&lt;/artifactId&gt;
              &lt;exclusions&gt;
                  &lt;exclusion&gt;
                      &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                      &lt;artifactId&gt;spring-boot-starter-logging&lt;/artifactId&gt;
                  &lt;/exclusion&gt;
              &lt;/exclusions&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-log4j&lt;/artifactId&gt;
              &lt;exclusions&gt;
                  &lt;exclusion&gt;
                      &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
                      &lt;artifactId&gt;slf4j-log4j12&lt;/artifactId&gt;
                  &lt;/exclusion&gt;
              &lt;/exclusions&gt;
          &lt;/dependency&gt;
  </code></pre>
  
  <p>How can I solve this ?</p>