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:Takeshi Kondo (take@gmail.com)
Date:Aug 20, 2009 10:07:02 am
List:org.slf4j.dev

Takeshi mentioned that his requirement was to be able to change the level of a logging statement without needing to recompile his application. I don't see how annotations help in this case since they also need to be recompiled.

I think annotation is default value. In development, I don't want to write property file because property file isn't type safe. so I want to use annotation. In contrast, after deployment I don't want to recompile our application because redeployment process is onerous task. so I want to use property file.

Who should develop log level? I think application developer develop default log level, and operator develop actual log level. I can't design all log level if it doesn't operate it.

Markers allow for a cleaner way of filtering out messages. Changing the level is unnecessary. For example, if all logging events of level ERROR trigger an alarm, and if a certain ERROR event should not trigger an alarm, you can mark that particular event with the "NO_ALARM" marker.

All right, I think so. In this use case ,If I can mark that particular ERROR event with the "NO_ALARM" marker without recompile. I don't need it.

In other use case, I usually change particular log level from debug to info to analyze trouble after deployment. In this use case, I think Markers don't resolve it. Because debug logging code is

if( logger.isDebugEnabled()){ logger.debug("debug log message ...."); }

logger.isDebugEnabled() is false, then debug log even don't occur.

----

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. 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.