How to create log file using Log4j in SeleniumWebdriver with Java

  public class Log4j
.{
  public static void main(String[] args) throws Exception
 {
  
Logger logger= Logger.getLogger("LogLearning");
  PropertyConfigurator.configure("Log4j.properties");

 
 System.setProperty("org.apache.commons.logging.Log", "org.apache.commons.logging.impl.Jdk14Logger");
  WebDriver driver= new FirefoxDriver();
  public WebDriver driver;
  
logger.info("Firefox Opened");
  driver.manage().window().maximize();
 
 logger.info("Brows maximized");
  driver.get("http://seleniumsubbu.blogspot.in/");
 
 logger.info("Website is launched");
  }