title: Log4j in JUnit Test case
body: <p>I have a spring bean which has a logger member and I use that logger to log some actions.<br>
  Also I have written a test case which uses <code>SpringJUnit4ClassRunner</code>. I have configured Log4j with a properties file and in each test case I initialize the logger with these properties:</p>
  
  <pre><code>@BeforeClass
  public static void init() {
     PropertyConfigurator.configure("src/com/config/log4j.properties");
  }
  </code></pre>
  
  <p>when I run a test it gives me a warning </p>
  
  <pre><code>log4j:WARN No appenders could be found for logger (org.springframework.test.context.junit4.SpringJUnit4ClassRunner).
  log4j:WARN Please initialize the log4j system properly.
  log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
  </code></pre>
  
  <p>However, the logger in my bean writes messages into the specified location in log4j.properties, i.e. it works fine.
  Why does log4j gives me such warnings?</p>