You can try with below code, make sure you had uploaded the log4j jar.
import java.util.concurrent.TimeUnit;
import org.apache.log4j.Logger;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.interactions.Actions;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
public class UploadResume {
public static WebDriver driver = new FirefoxDriver();
public static Logger logs = Logger.getLogger("devpinoyLogger");
@BeforeClass
public static void init() {
driver.manage().window().maximize();
driver.manage().timeouts().implicitlyWait(20L, TimeUnit.SECONDS);
System.out.println("1");
}
public void Logs(String msg){
logs.debug(msg);
}
@Test
public void doLogin(){
driver.findElement(By.xpath("//*[@id='tab2']/a")).click();
logs.debug("login_tab selected");
driver.findElement(By.xpath("//*[@id='username']")).sendKeys("usernameABC");
logs.debug("UseID entered");
driver.findElement(By.xpath("//*[@id='password']")).sendKeys("passwordABC");
logs.debug("Password Entered");
driver.findElement(By.xpath("//*[@id='loginBtn']")).click();
logs.debug("Submit button Entered");