atom feed44 messages in org.slf4j.devRe: [slf4j-dev] slf4j i8ln
FromSent OnAttachments
Pete MuirAug 17, 2009 10:05 am 
Ralph GoersAug 17, 2009 2:40 pm 
Pete MuirAug 18, 2009 6:37 am 
Ralph GoersAug 18, 2009 7:10 am 
近藤 健Aug 18, 2009 9:59 am 
Pete MuirAug 19, 2009 8:31 am 
Ralph GoersAug 19, 2009 9:15 am 
Ceki GulcuAug 19, 2009 11:17 am 
Pete MuirAug 19, 2009 11:20 am 
Pete MuirAug 19, 2009 11:29 am 
Ceki GulcuAug 19, 2009 11:42 am 
Pete MuirAug 19, 2009 11:51 am 
Ceki GulcuAug 19, 2009 12:38 pm 
Ralph GoersAug 19, 2009 1:42 pm 
Ceki GulcuAug 19, 2009 1:58 pm 
Ceki GulcuAug 19, 2009 2:15 pm 
Ralph GoersAug 19, 2009 2:21 pm 
Ralph GoersAug 19, 2009 2:31 pm 
Ceki GulcuAug 19, 2009 2:40 pm 
近藤 健Aug 20, 2009 8:22 am 
Ralph GoersAug 20, 2009 8:35 am 
Takeshi KondoAug 20, 2009 10:07 am 
ralp...@dslextreme.comAug 20, 2009 10:20 am 
Ceki GulcuAug 20, 2009 1:58 pm 
Ceki GulcuAug 20, 2009 2:05 pm 
Takeshi KondoAug 21, 2009 10:28 pm 
Takeshi KondoAug 22, 2009 10:32 pm.jar, .jar
Ralph GoersAug 23, 2009 8:21 am 
Takeshi KondoAug 23, 2009 8:40 am 
Ceki GulcuAug 23, 2009 10:38 am 
Takeshi KondoAug 23, 2009 4:59 pm 
Ralph GoersAug 23, 2009 9:56 pm 
Ceki GulcuAug 24, 2009 6:14 am 
Takeshi KondoAug 24, 2009 10:02 am 
Ceki GulcuAug 24, 2009 10:22 am 
Takeshi KondoAug 24, 2009 11:05 am 
Ceki GulcuAug 24, 2009 11:27 am 
Takeshi KondoAug 24, 2009 12:36 pm 
Ceki GulcuAug 24, 2009 12:56 pm 
Takeshi KondoAug 24, 2009 1:15 pm 
Ceki GulcuAug 24, 2009 1:24 pm 
Ralph GoersAug 24, 2009 1:33 pm 
Takeshi KondoAug 24, 2009 2:02 pm 
Ceki GulcuAug 25, 2009 1:32 am 
Subject:Re: [slf4j-dev] slf4j i8ln
From:ralp...@dslextreme.com (rgo@apache.org)
Date:Aug 20, 2009 10:20:42 am
List:org.slf4j.dev

On Thu, Aug 20, 2009 at 10:07 AM, Takeshi Kondo <take@gmail.com>wrote:

If log level is separated, logging code is

---- public class enum LogMessages{ @Debug("debug log message") TEST0001 }

if(logger.isEnableFor(LogMessages.TEST0001)){ logger.log(LogMessages.TEST0001); }

---- If change log level, logger.isEnableFor(LogMessages.TEST0001) is true , then log event occur.

Actually, when using logger.log(LogMessages.TEST0001) isEnableFor is useless and shouldn't be called. The log method is going to do that check again. But your point is well taken that the application programmer doesn't have to know the log level when writing the code.

Of course, if we can change log configuration, it is usually solved. But because log configuration is per category,it can't configure per log message id.

Instead of debating the requirements, how about code that embodies your

vision of the API (assuming everything was possible)?

For example, here is a vision of the i18n API:

LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory(); lc.addResourceBundle( aResourceBundle);

Logger loggerA = LoggerFactory.getLogger("A"); Logger loggerB = LoggerFactory.getLogger("B");

// replace key_0 with its corresponding value in aResourceBundle loggerA.info("key_0");

// same as before, but also insert the value of "param" as specified in // the message loggerB.info("key_1", param);

The above is just an *example* of what I mean by "vision" of the API.

You can go a step further an implement something. You may wish to fork SLF4J on git. The url is http://github.com/ceki/slf4j/tree/master

OK. I've develop initial thought of i18n API on this week end.

I'd love to see what you come up with. I'm seriously thinking that XLogger could be enhanced with some of these ideas.

Ralph