title: PropertyConfigurator.configure doesn't work with spring
body: <p>i tried to initialize log4j logger using spring IOC and use PropertyConfigurator.configure to configure logger but PropertyConfigurator.configure doesn't work.
   the loggers are created using default configurations, the logging files are't created. </p>
  
  <p>my Question is how to pass the configurations (log4j.properties) to Logger class ?</p>
  
  <p>pom.xml</p>
  
  <pre><code>&lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-context&lt;/artifactId&gt;
          &lt;version&gt;4.3.9.RELEASE&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;log4j&lt;/groupId&gt;
          &lt;artifactId&gt;log4j&lt;/artifactId&gt;
          &lt;version&gt;1.2.17&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&gt;
            &lt;version&gt;1.5.5.RELEASE&lt;/version&gt;
      &lt;/dependency&gt;
     &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-test&lt;/artifactId&gt;
          &lt;scope&gt;test&lt;/scope&gt;
            &lt;version&gt;1.5.5.RELEASE&lt;/version&gt;
      &lt;/dependency&gt; 
  </code></pre>
  
  <p>Confugration class</p>
  
  <pre><code>@Configuration 
  public class CommonConfig {
  
  @Autowired
  private Environment env;
  
  @PostConstruct
  public void init() {
     PropertyConfigurator.configure("log4j.properties");
  }
  
  @Bean(name = "debugLogger")
  public Logger debugLogger() {
      return Logger.getLogger("regDebug");
  }
  
  @Bean(name = "infoLogger")
  public Logger infoLogger() {
      return Logger.getLogger("regOperational");
  }
  
  @Bean(name = "errorLogger")
  public Logger errorLogger() {
    ic Logger infoLogger() {
      return Logger.getLogger("regError");
  }}
  </code></pre>
  
  <p>log4j.properties</p>
  
  <pre><code>log4j.logger.regDebug=DEBUG , stdout, regDebug
  log4j.logger.regOperational=INFO, stdout , regOperational
  log4j.logger.regError=ERROR , stdout , regError
  log4j.rootLogger = INFO, console, regDebug, regOperational, regErro
  log4j.appender.fileAppener=org.apache.log4j.RollingFileAppender
  
  # STDOUT appender
  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=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n
  
  #DEBUG LEVEL
  log4j.appender.regDebug.Append=true
  log4j.appender.regDebug=org.apache.log4j.DailyRollingFileAppender
  log4j.appender.regDebug.Append=true
  log4j.appender.regDebug.File=D:/Code/log/COMMON_DEBUG.log
  log4j.appender.regDebug.MaxFileSize=10MB
  log4j.appender.regDebug.MaxBackupIndex=10
  log4j.appender.regDebug.DatePattern='.'yyyy-MM-dd-HH'.log'
  log4j.appender.regDebug.layout=org.apache.log4j.PatternLayout
  log4j.appender.regDebug.layout.ConversionPattern=%d{dd/MM/yyyy HH:mm:ss.SSS} || %5p || %t || %C{1} || %M:%L || %m%n
  
  #INFO LEVEL
  
  log4j.appender.regOperational=org.apache.log4j.DailyRollingFileAppender
  log4j.appender.regOperational.Append=true
  log4j.appender.regOperational.File=D:/Code/log/COMMON_ERROR.log
  log4j.appender.regOperational.DatePattern='.'yyyy-MM-dd-HH'.log'
  log4j.appender.regOperational.layout=org.apache.log4j.PatternLayout
  log4j.appender.regOperational.layout.ConversionPattern=%d{dd/MM/yyyy HH:mm:ss.SSS} || %5p || %t || %m%n
  
  #ERROR LEVEL
  
  log4j.appender.regError=org.apache.log4j.DailyRollingFileAppender
  log4j.appender.regError.Append=true
  log4j.appender.regError.File=D:/Code/log/COMMON_ERROR.log
  log4j.appender.regError.DatePattern='.'yyyy-MM-dd-HH'.log'
  log4j.appender.regError.layout=org.apache.log4j.PatternLayout
  log4j.appender.regError.layout.ConversionPattern=%d{dd/MM/yyyy HH:mm:ss.SSS} || %5p || %t || %C{1} || %M:%L || %m%n
  </code></pre>