One thing you might want to consider is aspect oriented programming - see www.aspectj.org
One could define an aspect to apply to all java classes in the packages you are interested and generate the logging trace code into methods that meet the aspect filter (all, public only, etc) I would agree that log4j is a good choice, it is very robust and the source is available if there was (unlikely) a problem. -Steve from the aspectj site .... AOP allows developers to reap the benefits of modularity for concerns that cut across the natural units of modularity. In object-oriented programs like Java, the natural unit of modularity is the class. In AspectJ, aspects are concerns that affect more than one class.