title: How to check if log4j.properties is loaded?
body: <p>I'm using log4j (compile group slf4j, runtime group logback) with configuration in log4j.properties file.</p>
  
  <p>I think I configured it properly with this options</p>
  
  <pre><code>log4j.rootLogger=INFO, 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=%-4r [%t] %-5p %c %x - %m%n
  log4j.appender.stdout.threshold=info
  
  log4j.appender.file=org.apache.log4j.RollingFileAppender
  log4j.appender.file.File=/home/user/logging.log
  log4j.appender.file.MaxFileSize=5MB
  log4j.appender.file.MaxBackupIndex=20
  log4j.appender.file.layout=org.apache.log4j.PatternLayout
  log4j.appender.file.layout.ConversionPattern=%-5p [%d{dd.MM.yy HH:mm:ss}] %C{1} - %m [thread: %t]\n
  log4j.appender.file.threshold=info
  </code></pre>
  
  <p>But when I run debug message like</p>
  
  <pre><code>logger.debug("foo")
  </code></pre>
  
  <p>I see output in Console which doesn't match my pattern.</p>
  
  <p>Next problem is that nothing is in file (/home/user/logging.log) so I think my properties file is not loaded and don't know how to repair it.</p>
  
  <p>I put my log4j.properties file in root level of my eclipse project, in resources (src/main/resources) but still is nothing changed. I have my Project folder in classpath properly.</p>
  
  <p><strong>EDIT:</strong> The problem was that I'm using <code>Logback</code> (<a href="http://logback.qos.ch/" rel="nofollow">http://logback.qos.ch/</a>) as my runtime Logger, but this library using <code>logback.xml</code> config file, not <code>log4j.properties</code> with <code>org.apache.log4j</code> library.</p>