I don't know if there is such a thing as a best way because every situation tends to be different. However I started using log4j is problems, but have switched to Jakarta Commons Logging because it self configures to the environment it it running in. For example, I have some libraries which are designed to be generic to several projects. Internally I use Commons Logging on them so that I can develope and
test them without requiring log4j. However when I an running a project which uses then and has log4 as well, the Commons logging automatically detects this and uses log4j instead.
I find this lets me develop things in smaller units without extra dependancies on projects I may not wish to include.
ciao
Derek.