title: log File not generating in log4j
body: <p>I am new to log4j. I have created a sample java program implementing log4j in it.</p>
  
  <p>Below is the java program:</p>
  
  <pre><code>package logging;
  import org.apache.log4j.BasicConfigurator;
  import org.apache.log4j.Logger;
  public class Logging {
      /**
       * @param args the command line arguments
       */
      private static Logger logger = Logger.getLogger(Logging.class);
      public static void main(String[] args) {
          BasicConfigurator.configure();
  
           logger.trace("This is a Trace");
           logger.debug("This is a Debug");
           logger.info("This is an Info");
           logger.warn("This is a Warn");
           logger.error("This is an Error");
           logger.fatal("This is a Fatal");
  
      }
  
  }
  </code></pre>
  
  <p>I am getting the output in the console screen.But the <strong><em>log file is not</em></strong> getting generated. I have also configured my project in the Eclipse neon using the following link:
  <a href="http://syncor.blogspot.in/2013/09/getting-started-with-log4j-2-in-eclipse.html" rel="noreferrer">Configuration</a></p>
  
  <p>I have done everything good. But the log file is not generating.When I implement log4j programmatically the file is getting generated.The following is my <strong>properties file:</strong></p>
  
  <pre><code>#root
  
  log4j.logger.com.apress.logging.log4j=debug,dest
  
  log4j.additivity.com.apress.logging.log4j=false
  
  #define the appender
  log4j.appender.dest = org.apache.log4j.DailyRollingFileAppender
  
  #set the name of the file 
  log4j.appender.dest.File=${user.home}/log.out
  
  #setting the immediate flush to true (default) 
  log4j.appender.dest.ImmediateFlush=true
  
  #setting the threshold
  log4j.appender.dest.Threshold=ERROR
  
  #setting the append to false, overwrite 
  log4j.appender.dest.Append=true
  
  #set the DatePattern 
  log4j.appender.dest.DatePattern='.' yyyy-MM-dd
  </code></pre>
  
  <p>What do I need to do to have Log4J write to the log file?</p>