From | Sent On | Attachments |
---|---|---|
Pete Muir | Aug 17, 2009 10:05 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:31 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:51 am | |
Ceki Gulcu | Aug 19, 2009 12:38 pm | |
Ralph Goers | Aug 19, 2009 1:42 pm | |
Ceki Gulcu | Aug 19, 2009 1:58 pm | |
Ceki Gulcu | Aug 19, 2009 2:15 pm | |
Ralph Goers | Aug 19, 2009 2:21 pm | |
Ralph Goers | Aug 19, 2009 2:31 pm | |
Ceki Gulcu | Aug 19, 2009 2:40 pm | |
近藤 健 | Aug 20, 2009 8:22 am | |
Ralph Goers | Aug 20, 2009 8:35 am | |
Takeshi Kondo | Aug 20, 2009 10:07 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:28 pm | |
Takeshi Kondo | Aug 22, 2009 10:32 pm | ![]() |
Ralph Goers | Aug 23, 2009 8:21 am | |
Takeshi Kondo | Aug 23, 2009 8:40 am | |
Ceki Gulcu | Aug 23, 2009 10:38 am | |
Takeshi Kondo | Aug 23, 2009 4:59 pm | |
Ralph Goers | Aug 23, 2009 9:56 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:27 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:33 pm | |
Takeshi Kondo | Aug 24, 2009 2:02 pm | |
Ceki Gulcu | Aug 25, 2009 1:32 am |
Subject: | Re: [slf4j-dev] slf4j i8ln | ![]() |
---|---|---|
From: | Ralph Goers (rgo...@apache.org) | |
Date: | Aug 23, 2009 8:21:06 am | |
List: | org.slf4j.dev |
I'm out of town on vacation right now so I might not get a chance to review this for a couple of days. But I'd like to provide my feedback before anything is incorporated.
Ralph
On Aug 22, 2009, at 10:32 PM, Takeshi Kondo wrote:
<slf4j-i18n-1.5.9-SNAPSHOT.jar><slf4j-i18n-1.5.9-SNAPSHOT-sources.jar>
I've developed initial thought of SLF4j's i18n extension. It was committed to my branch (http://github.com/takeshi/slf4j/tree/master ).
I've implemented 4 features as follows.
1. Logger interface using enum. @see org.slf4j.i18n.I18NLogger
2. Extension point to bind log id's enum to log message and level. @see org.slf4j.i18n.spi.LogLevelResolver @see org.slf4j.i18n.spi.LogMessageFormatResolver
3. Resolving log message and log level from Annotation associated from log id's enum. @see org.slf4j.i18n.impl.AnnotationLogLevelResolver @see org.slf4j.i18n.impl.AnnotationMessageFormatResolver
4. Resolving log message and log level from ResourceBundle associated with log id's enum. @see org.slf4j.i18n.impl.ResourceBundleLogLevelResolver @see org.slf4j.i18n.impl.ResourceBundleMessageFormatResolver
For example:
---- Log Message Definition
---- public enum LogMessages {
@Error("error message {}") // log level is bound to Error. TEST0001,
@Message("waring message {}") // log level is not specified. TEST0002
}
---- Logging
----
public static void main(String[] args) { I18NLogger logger = I18NLoggerFactory.getLogger(LogMain.class);
// write to error log , because LogMessages.TEST0001 is bound to Error level. logger.log(LogMessages.TEST0001, "xxxx"); logger.log(LogMessages.TEST0001, new NullPointerException());
// write log as error level. logger.error(LogMessages.TEST0002, "xxxx"); // write log as warn level. logger.warn(LogMessages.TEST0002, new NullPointerException()); }
Takeshi Kondo
_______________________________________________ dev mailing list de...@slf4j.org http://www.slf4j.org/mailman/listinfo/dev
_______________________________________________ dev mailing list de...@slf4j.org http://www.slf4j.org/mailman/listinfo/dev