On Jul 16, 2012, at 12:42 PM, Gary Gregory wrote:

> On Mon, Jul 16, 2012 at 3:19 PM, Ralph Goers <[email protected]> 
> wrote:
> 
> The Log4j 2 API contains LocalizedMessage. I'm not actually very fond of this 
> class as it was implemented primarily to provide compatibility with Log4j 
> 1.2.  However, it does provide some ideas on how proper internationalization 
> and localization could be accomplished.
> 
> There was a discussion on I18n and L10n on the SLF4J list a while ago. As a 
> result of that Ceki created the cal10n project which is documented at 
> http://www.slf4j.org/localization.html.  The problem I have with this is that 
> it is localizing the messages as they are being generated. In my experience 
> localization should happen when the message is being viewed, not when it is 
> written.  Thus the "message" in the log would consist only of the message key 
> and the variables would be there (probably as key/value pairs).  In that case 
> the application doing the logging doesn't have any idea what the actual 
> message text is.
> 
> However, a good Message implementation could handle both cases. 
> 
> Ok, so the question is: do you see implementing or redoing this class 
> post-2.0 without breaking BC?
> 

Yes. I'd probably leave the current one alone and then identify some 
requirements for how we would really want an internationalized and localized 
message to work. You might want to see if there is a Jira issue or create a new 
one and add your initial thoughts to it.

Ralph

Reply via email to