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 Wi...@alltel.com on 2002/09/12 22:15:12 UTC

Deferring internationalization of log messages to the handler

We have an several custom implementations of a resource bundler resolver
that meets requirements for different customers.  Basically is works
like the ResourceBundle.getBundle(String baseName, Locale locale) except
that our implementation takes two extra parameters that have to do with
customer specifics and is constructed like:
OurResourceBundle.getBundle(String baseName, String orgId, String
messageType, Locale locale);

The getString(key) method has unique algorithms to resolve the key
passed into it and find an appropriate message in the bundle.

What I'd like to do is implement our custom resolvers in the Log4J
handlers and was thinking I could resolve the key inside the append()
method and just replace the event.message and event.renderedMessage with
the revolved message but the two attributes mentioned have private scope
so that's out.

Does anyone have any ideas how to defer message resolution to the
handler?

Thanks in advance for your help,
Bill

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>