[slf4j-dev] Feature Request
Michael Poeschl
kortheo at kwanta.net
Tue Nov 24 13:49:44 CET 2009
Hey slf4j guys,
I have a feature Request regarding Localized Logging.
Since a localized Message is localized ;-) it is hard to google it. I have had that issue with some java programs already. Because there is no way I could know the english message, when the program runs in german.
Therefore I would appreciate a standardized API that allows to have a common part (like an error code) and a localized part on any localized message. For example
#The properties file
APPLICATION_STARTED=Application {0} has started.
//EITHER like this (which does not actually feel that good):
enum Production
{
APPLICATION_STARTED("MyApp001");
publicString CODE;
privateProduction(String CODE)
{
this.CODE= CODE;
}
}
//used like this
locLogger.info(Production.APPLICATION_STARTED, Production.APPLICATION_STARTED.CODE, "fooApp");
//output: [MyApp001] Application fooApp has started.
//--------------------------------------------------------------
//OR maybe another way
locLogger.info("fooApp". Production.APPLICATION_STARTED);
//output: [Production.APPLICATION_STARTED] Application fooApp has started.
I hope I can at least open a discussion.
Thanks a lot for reading.
Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://qos.ch/pipermail/slf4j-dev/attachments/20091124/a602e974/attachment.htm>
More information about the slf4j-dev
mailing list