title: Getting issue in log4j API logs generation
body: <p>I am facing issue in generating logs on console.</p>
  
  <p>Below is the snippents I am trying with :-</p>
  
  <p>pom.xml:-</p>
  
  <pre><code>&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;
  </code></pre>
  
  <p>log4j.properties file :-I have kept this in src/main/resources folder</p>
  
  <pre><code>#Set level
  log4j.rootCategory=debug, console, file  
  
  # Appender which writes to console  
  log4j.appender.console=org.apache.log4j.ConsoleAppender  
  log4j.appender.console.layout=org.apache.log4j.PatternLayout
  log4j.appender.console.layout.ConversionPattern=%d{MM-dd-yyyy HH:mm:ss} %F %-5p [%t] %c{2} %L - %m%n
  
  # Appender which writes to a file  
  log4j.appender.file=org.apache.log4j.RollingFileAppender
  log4j.appender.file.File=D:\eclipse-workspace\CucumberWithTestNGForSelenium\application.log
  
  # Defining maximum size of a log file
  log4j.appender.file.MaxFileSize=10mb 
  log4j.appender.file.MaxBackupIndex=10
  
  log4j.appender.file.layout=org.apache.log4j.PatternLayout  
  log4j.appender.file.layout.ConversionPattern=%d{ISO8601} %5p [%t] %c{1}:%L - %m%n
  log4j.appender.file.Append=true
  </code></pre>
  
  <p>And,below is my Test File</p>
  
  <pre><code>    package stepDefinition;
      import org.apache.log4j.Logger;
      import org.openqa.selenium.WebDriver;
      import org.openqa.selenium.chrome.ChromeDriver;
      import org.testng.annotations.Test;
  
      public class GenerateLogs {
  
      final static Logger log=Logger.getLogger(GenerateLogs.class);
          @Test
          public void Test1()
          {
      System.setProperty("webdriver.chrome.driver", "C:\\Users\\Mkap\\Downloads\\chromedriver.exe");
              WebDriver driver=new ChromeDriver();
              log.info("Launching chrome browser");
              driver.get("http://google.com");
                  }
  
          @Test
          public void Test2()
          {
              System.out.println("Yeh!google has opened");
          }
      }
  </code></pre>
  
  <p>Can you please help why logs are not getting generated on console. Also,why  am not able to resolve errors of Logger class.</p>