title: Log pattern provided in log4j.properties file is not being used
body: <p>I am using <strong>slf4j</strong> logging library and have provide logging pattern in <strong>log4j.properties</strong> file under <strong>resources</strong> folder in my maven project but still the pattern I have provided does not take affect and is printed with default logging pattern.</p>
  
  <p>i am using slf4j logging library</p>
  
  <pre><code>&lt;dependency&gt;
      &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
      &lt;artifactId&gt;slf4j-api&lt;/artifactId&gt;
      &lt;version&gt;1.7.26&lt;/version&gt;
  &lt;/dependency&gt;
  
  </code></pre>
  
  <p>I am initializing the logger by </p>
  
  <pre><code>
  private static final Logger logger = LoggerFactory.getLogger(CurrentClassName.class);
  
  </code></pre>
  
  <p>My log4j.properties file content is</p>
  
  <pre><code>
  # Direct log messages to stdout
  log4j.rootLogger=DEBUG, STDOUT, file
  log4j.appender.stdout=org.apache.log4j.ConsoleAppender
  log4j.appender.stdout.Target=System.out
  log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
  #log4j.appender.STDOUT.layout.ConversionPattern=%5p[] [%t] (%F:%L) - %m%n
  log4j.appender.stdout.layout.ConversionPattern="%d{yyyy-MM-dd HH:mm:ss} [%-5level] [%-30logger{20}] [${application.name}] [%X{request_id}] - %msg%n"
  log4j.appender.file=org.apache.log4j.RollingFileAppender
  log4j.appender.file.File=mylogs.log
  log4j.appender.file.layout=org.apache.log4j.PatternLayout
  #log4j.appender.file.layout.ConversionPattern=%d{dd-MM-yyyy HH:mm:ss} %-5p %c{1}:%L - %m%n
  log4j.appender.file.layout.ConversionPattern="%d{yyyy-MM-dd HH:mm:ss} [%-5level] [%-30logger{20}] [${application.name}] [%X{request_id}] - %msg%n"
  
  </code></pre>
  
  <p>ACTUAL LOG OUTPUT</p>
  
  <pre><code>
  11:07:45.091 [main] DEBUG com.abc.def.LoggingClassName - message logged from within the class
  
  </code></pre>
  
  <p>Expected LOG OUTPUT</p>
  
  <pre><code>
  2019-07-17 12:03:59 [INFO ] [c.b.CurrentLoggingClassName      ] [aplication-name] [] - message logged from class
  
  </code></pre>
  
  <p><strong>P.S.</strong> </p>
  
  <p>I have also tried renaming the <strong>log4j.properties</strong> file to <strong>log4j2.properties</strong></p>
  
  <p>And I have also tried both properties file placing under <strong>/src</strong> folder one by one</p>