Instead of
you could write something like
Then you wouldn't need to pass the class name along.
Your logging class could also examine the current stack trace, where the second-but-last entry would be the calling class and method. You can get the stack trace via "new Throwable().getStackTrace()".
But why do you want to roll your own logging abstraction, when something like
Jakarta Commons Logging is available, which can wrap java.util.logging, log4j, and other logging implementations?
[ November 12, 2006: Message edited by: Ulf Dittmer ]