Yea. If a class that extends AbstractLogger calls the logging method that takes 
the FQCN (for example, overrides a "debug" method), it needs to use its /own/ 
private static FQCN variable. But the AbstractLogger needs one that is 
AbstractLogger instead of the implementing class.

On Jun 14, 2013, at 8:20 AM, Ralph Goers wrote:

> Because this.getClass().getName() doesn't work.
> 
> When searching for the class in the stack AbstractLogger is what will show up 
> since that is where the method is defined.
> 
> Ralph
> 
> On Jun 14, 2013, at 5:57 AM, Gary Gregory wrote:
> 
>> Hi All:
>> 
>> Why is org.apache.logging.log4j.spi.AbstractLogger.FQCN defined as:
>> 
>> private static final String FQCN = AbstractLogger.class.getName();
>> 
>> instead of:
>> 
>> private final String FQCN = this.getClass().getName();
>> 
>> Gary
>> 
>> -- 
>> E-Mail: [email protected] | [email protected] 
>> Java Persistence with Hibernate, Second Edition
>> JUnit in Action, Second Edition
>> Spring Batch in Action
>> Blog: http://garygregory.wordpress.com 
>> Home: http://garygregory.com/
>> Tweet! http://twitter.com/GaryGregory
> 

Reply via email to