I'm trying to get my test framework implemented in IBM's RFT using Java, to spit out test results in JUnit XML format. This is so I can easily run ant tasks that summarize the test results, as well as leverage many of the JUnit compatiable tools out there for tracking test results.

So far I looked at the API's of JUnit's TestResult, but really confused by how it's used by JUnit. I want to figure out where JUnit is producing the log messages and leverage those classes for spitting out my own log messages from my test framework. What are the pieces I need to log test steps and errors and write them to disk?