3 Answers
3

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.

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.