[slf4j-user] Release of SLF4J version 1.5.9-RC0

ekkehard ekkehard at gentz-software.de
Sat Sep 5 14:35:23 CEST 2009


thx for info...
seems I have to create an extra blog for localized logging in my current 
blog series about
logging in osgi enterprise applications ;-) 
http://ekkescorner.wordpress.com/blog-series/osgi-apps/

another question:
localized log messages makes much sense for systems running at customer 
site,
but while developing and using DEBUG levels the messages usually will be 
only in english

does this mean I need two loggers for each class ?

logger.debug(...my debug messages with parameters...)
and
locLogger(...my info, warn, error ENUM messages...)

or will the underlying Logback system only use one Logger if the name is 
the same ?

whats the recommended way to do logging with enums and without in the 
same class ?

thx

ekke

Ceki Gulcu schrieb:
>
>
> ekkehard wrote:
>> CAL10N sounds great...
>>
>> I can use it together with parameterized messages like 'normal' 
>> logging with SLF4J ?
>
> Yes, you can,
>
>> locLogger.info(MY_ENUM_KEY, getName(), getXYZ())
>> where the value of MY_ENUM_KEY is
>> "This is a log message from {} using {} and so on"
>
> For translated messages, the JDK's MessageFormat convention is used. 
> So, the value of the key should be:
>
> "This is a log message from {0} using {1} and so on"
>
>> is performance same as using 'normal' SLF4J parameterized messages if 
>> depending from level nothging has to be logged ?
>
> Give or take a few nano-seconds, yes.
>





More information about the slf4j-user mailing list