If you're doing Java, you need to be using two frameworks:
1) Log4J is the only way to put runtime logging output into your app. It's slick, configurable and very, very easy. Oh, and if you use Tapestry, the built-in Tapestry Inspector allows you to configure Log4J on the fly.
2) JUnit is the balls. Just get diciplined and write a bunch of quick tests to go with your code. Easy as cake.