You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by David Sklarew <da...@yahoo.com> on 2001/01/08 03:13:01 UTC
Adding localization support for wrapping classes to Category
Hi,
I am wrapping your api and noticed that you
provide Category.log(String callerFQN, Priority
priority, String message, Throwable t) so that the
proper caller location can be obtained.
Have you considered the inclusion of additional
Category methods supporting localization to be used by
wrapper classes? It is likely that users who wrap
Category may still take advantage of log4j's
localization support.
For brevity, I'll omit a copy of the code I wrote to
do this (I just created two more Category.l7dlog
methods that take callerFQN as the first parameter.
Thanks for a great product,
David Sklarew
david.sklarew@pepsi.com
Pepsico
__________________________________________________
Do You Yahoo!?
Yahoo! Photos - Share your holiday photos online!
http://photos.yahoo.com/
Re: Adding localization support for wrapping classes to
Category
Posted by Ceki Gulcu <cg...@urbanet.ch>.
Hi David,
OK. If I understand you correctly, you would like the Category.l7dlog
methods to support caller localization when called from wrappers. As you
have indicated, this would involve adding two more methods with the
following signatures:
public void l7dlog(String callerFQN, Priority priority, String key,
Throwable t);
public void l7dlog(String callerFQN, Priority priority, String
key, Object[] params, Throwable t);
Unless absolutely necessary, I would like to avoid adding new methods to
the Category class which is at the center of the package. There are a
number of alternatives:
1) You modify your own copy of Category.java to include these two methods.
2) You sub-class the Category class and add the two methods and wrap the
sub-class.
3) Just ignore the problem by saying that caller localization is not
supported when using wrappers invoking the l7dlog methods.
Would any of the above work for you? Regards, Ceki
At 18:13 07.01.2001 -0800, you wrote:
>Hi,
> I am wrapping your api and noticed that you
>provide Category.log(String callerFQN, Priority
>priority, String message, Throwable t) so that the
>proper caller location can be obtained.
>
>Have you considered the inclusion of additional
>Category methods supporting localization to be used by
>wrapper classes? It is likely that users who wrap
>Category may still take advantage of log4j's
>localization support.
>
>For brevity, I'll omit a copy of the code I wrote to
>do this (I just created two more Category.l7dlog
>methods that take callerFQN as the first parameter.
>
>Thanks for a great product,
>
>David Sklarew
>david.sklarew@pepsi.com
>Pepsico