| From | Sent On | Attachments |
|---|---|---|
| Pete Muir | Aug 17, 2009 10:04 am | |
| Ralph Goers | Aug 17, 2009 2:40 pm | |
| Pete Muir | Aug 18, 2009 6:37 am | |
| Ralph Goers | Aug 18, 2009 7:10 am | |
| 近藤 健 | Aug 18, 2009 9:59 am | |
| Pete Muir | Aug 19, 2009 8:30 am | |
| Ralph Goers | Aug 19, 2009 9:15 am | |
| Ceki Gulcu | Aug 19, 2009 11:17 am | |
| Pete Muir | Aug 19, 2009 11:20 am | |
| Pete Muir | Aug 19, 2009 11:29 am | |
| Ceki Gulcu | Aug 19, 2009 11:42 am | |
| Pete Muir | Aug 19, 2009 11:50 am | |
| Ceki Gulcu | Aug 19, 2009 12:38 pm | |
| Ralph Goers | Aug 19, 2009 1:42 pm | |
| Ceki Gulcu | Aug 19, 2009 1:57 pm | |
| Ceki Gulcu | Aug 19, 2009 2:14 pm | |
| Ralph Goers | Aug 19, 2009 2:20 pm | |
| Ralph Goers | Aug 19, 2009 2:31 pm | |
| Ceki Gulcu | Aug 19, 2009 2:40 pm | |
| 近藤 健 | Aug 20, 2009 8:21 am | |
| Ralph Goers | Aug 20, 2009 8:35 am | |
| Takeshi Kondo | Aug 20, 2009 10:06 am | |
| ralp...@dslextreme.com | Aug 20, 2009 10:20 am | |
| Ceki Gulcu | Aug 20, 2009 1:58 pm | |
| Ceki Gulcu | Aug 20, 2009 2:05 pm | |
| Takeshi Kondo | Aug 21, 2009 10:27 pm | |
| Takeshi Kondo | Aug 22, 2009 10:31 pm | .jar, .jar |
| Ralph Goers | Aug 23, 2009 8:20 am | |
| Takeshi Kondo | Aug 23, 2009 8:40 am | |
| Ceki Gulcu | Aug 23, 2009 10:38 am | |
| Takeshi Kondo | Aug 23, 2009 4:58 pm | |
| Ralph Goers | Aug 23, 2009 9:55 pm | |
| Ceki Gulcu | Aug 24, 2009 6:14 am | |
| Takeshi Kondo | Aug 24, 2009 10:02 am | |
| Ceki Gulcu | Aug 24, 2009 10:22 am | |
| Takeshi Kondo | Aug 24, 2009 11:05 am | |
| Ceki Gulcu | Aug 24, 2009 11:26 am | |
| Takeshi Kondo | Aug 24, 2009 12:36 pm | |
| Ceki Gulcu | Aug 24, 2009 12:56 pm | |
| Takeshi Kondo | Aug 24, 2009 1:15 pm | |
| Ceki Gulcu | Aug 24, 2009 1:24 pm | |
| Ralph Goers | Aug 24, 2009 1:32 pm | |
| Takeshi Kondo | Aug 24, 2009 2:02 pm | |
| Ceki Gulcu | Aug 25, 2009 1:31 am |
| Subject: | Re: [slf4j-dev] slf4j i8ln | |
|---|---|---|
| From: | Ralph Goers (rgo...@apache.org) | |
| Date: | Aug 19, 2009 9:15:27 am | |
| List: | org.slf4j.dev | |
On Aug 19, 2009, at 8:31 AM, Pete Muir wrote:
Hi Ralph,
Whether or not resource bundles suck in our opinion, they are the standard approach to this so I believe we can't just dismiss them.
Let me rephrase. It isn't just that they suck. In my environment resource bundles don't work for I18N. I'm not in favor of having features implemented that I can't use. But my opinion doesn't really carry any more weight than yours.
I'm also unsure how, in your approach, a framework would provide i8ln'ized log messages which would be used?
As I've said, I'm not at all in favor of SLF4J "doing" I18N. It is better to do it under a framework such as Spring's MessageSource interface where you can either use the default implementation, which uses ResourceBundles, or easily provide your own. As I said, I'm also planning on creating a framework to manage internationalized messages using Commons Configuration and XML files.
In that scenario the application either calls getMessage() and then passes the resulting String to the log call or the application passes the message key as the message on the log call, which is the approach I would suggest. In the second scenario it is up to the Appender to resolve the key by calling getMessage(). Ideally, the Appender should be able to tell whether it is getting a key or the actual message text. This can be done simply by convention - i.e. a log message like "key=Message1" or by passing a parameter. There is no real need to enhance SLF4J to be able to do this.
The piece that SLF4J is missing is the ability to detect the target Locale of the message. But even this can be handled without change to SLF4J. Just adding the Locale to the MDC would allow the Appender to do the right thing. Of course, you'd have to use a logging implementation that supports the MDC.
In short, instead of asking for a change to SLF4J it would make more sense to me for you to ask for an enhancement to Logback so that any Appender can have the opportunity to internationalize the message. Currently you'd have to do that in a Layout, but I don't believe all Appenders support them.
Ralph
_______________________________________________ dev mailing list de...@slf4j.org http://www.slf4j.org/mailman/listinfo/dev






.jar, .jar