Need more info on logging and debugging framework for Selenium

I have referred a few of the following resources below:




I've used log4j. Development of log4j seems to have gone dormant.

These days I use the Simple Logging Facade for Java (SLF4j) API, with logback as the implementation. Selenium internally uses another logging API and implementation (Apache commons logging, I think), but SLF4j offers mechanisms to reroute those other logging calls through your chosen SLF4j implementation.

One nice feature of logback: You can log each test class's output to its own log file. Another: You can write logs in HTML format, which makes them easy to post to intranets where anyone can access them in a browser.


The most common logging framework for Java is log4j. A Google search will turn up many references, a few tutorials, and even a few books.


From previous questions of yours, it would appear as though you're doing most of your automation in Java. I'd recommend looking into a logging framework, or, create one for yourself. I'm not sure about Java, but, in .NET, I'd use tools like log4net or NLog. To create your own, all that you really need is to print your desired content and exceptions to a log file. Just a regular old textfile has always worked well for me.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.