Getting ‘No appenders found ‘ error while using log4j with TestNG

I am using TestNg framework and log4j in my project. Earlier the same code was running without any appenders but recently I had my PC formatted and after that it started giving this error. What I should I change to make it work?

Getting 'No appenders found '  error while using log4j with TestNG

Train Asked on October 15, 2014 in Selenium WebDriver.
Add Comment
  • 3 Answer(s)
    Best answer

    Hi Som,

    Please go to the ToolsQA website for this.
    http://www.toolsqa.com/selenium-webdriver/test-case-with-log4j/

    Regards,
    Lakshay Sharma

    Professor Answered on October 15, 2014.
    Add Comment

    HI Som,

    First i did not see log.xml file in your project explorer.
    Second, please make sure you have log4j jars associated in your project build path
    Thrid, I did not see the code to initialize log4j in your test case

    DOMConfigurator.configure(“log4j.xml”);

    Regards,
    Lakshay Sharma

    Professor Answered on October 15, 2014.
    Add Comment

    Hi Lakshay
    Could you please help with your 1st and 3rd point?  I think my last configured code was altered

    Train Answered on October 15, 2014.
    Add Comment
  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.