title: Log4j doesn't write in file
body: <p>I am trying to write a log in a file with log4j-1.2.8.jar.</p>
  
  <p>Here is my log4j.properties file that is in the classpath</p>
  
  <pre><code>log4j.rootLogger=INFO, file
  
  # Direct log messages to a log file
  log4j.appender.file=org.apache.log4j.RollingFileAppender
  log4j.appender.file.File=C:\\temp\\loging.log
  log4j.appender.file.MaxFileSize=1MB
  log4j.appender.file.MaxBackupIndex=1
  log4j.appender.file.layout=org.apache.log4j.PatternLayout
  log4j.appender.file.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n
  
  
  log4j.logger.mypackage.com=DEBUG, myappender
  log4j.additivity.mypackage.com=false
  
  log4j.appender.myappender=org.apache.log4j.DailyRollingFileAppender
  log4j.appender.myappender.datePattern='-'dd'.log'
  log4j.appender.myappender.File=C:\\temp\\loging2.log
  log4j.appender.myappender.layout=org.apache.log4j.PatternLayout
  log4j.appender.myappender.layout.ConversionPattern=%-6r %d{ISO8601} %-5p %40.40c %x - %m\n
  </code></pre>
  
  <p>And this is a fragment of the java code where I try to output into the file:</p>
  
  <pre><code>public class MyClass implements Serializable
  {
      private static Logger logger=Logger.getRootLogger();
  
      ....
      private void myMethod() {
      ....
  
          logger.info("info"+sql);
  
      ....
  
      }
  
  }
  </code></pre>
  
  <p>The file is not created and the only output I get is in the Console. 
  Is there anything wrong?</p>
  
  <p>Many Thanks</p>