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 22, 2009 10:32:04 pm
List:org.slf4j.dev
Attachments:
slf4j-i18n-1.5.9-SNAPSHOT.jar - 40k
slf4j-i18n-1.5.9-SNAPSHOT-sources.jar - 19k

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()); }