the class name gets converted anyways...that's how the lookup is in every implementation I've ever seen.

Speaking of CLASS.class, this method of obtaining a logger will yield a different (i.e. parent) class when utilizing inheritance.  Therefore, without having to change the code in the parent everytime you subclass, I recommend

Logger.getLogger(getClass()) at least, whether or not you use the string name is of no consequence.

-Kevin

Vladimir R. Bossicard wrote:
+1 on getClass().getName(), everywhere (not just the server).

I would prefer CLASS.class to take advantage of the LogFactory:getLog(Class cls) method.  Why use the class's name transformed into a String when the class itself is a valid option?

-Vladimir


Reply via email to