You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Lutz Michael <mi...@siemens.com> on 2003/04/30 14:53:51 UTC

sub-classing logger


Ceki,

In an email earlier today you stated:

"Sub-classing is discouraged for various reasons. In particular,
retrieving an instance of a logger of some sub-class, say A, will
result in a ClassCastException if a logger of the same name but
different class exists already."

Is the exception thrown only if the logger names are in the same scope, or
does the problem occur at the scope of the class loader?

e.g. if method A calls method B, and each has its own logger each with the
same name but of different types, does the exception get thrown?

I'm just trying to understand this problem a little more exactly.

Thanks as always for your time.

Mike

-------------------------------------------------------------------------------
This message and any included attachments are from Siemens Medical Solutions 
USA, Inc. and are intended only for the addressee(s).  
The information contained herein may include trade secrets or privileged or 
otherwise confidential information.  Unauthorized review, forwarding, printing, 
copying, distributing, or using such information is strictly prohibited and may 
be unlawful.  If you received this message in error, or have reason to believe 
you are not authorized to receive it, please promptly delete this message and 
notify the sender by e-mail with a copy to CSOffice@smed.com.  Thank you

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org