Check out https://code.google.com/p/anodyzed/ It does pretty much exactly what you're looking for. (*Chris*)
On Mon, May 27, 2013 at 9:49 AM, Heitor Machado <[email protected]> wrote: > Is it possible to use MessageFormat in logback ? > > I saw that it uses slf4j MessageFormat*ter*, because its faster as said > here: > http://stackoverflow.com/questions/8635769/out-of-curiosity-why-dont-logging-apis-implement-printf-like-logging-metho > > SLF4J uses its own message formatting implementation which differs > from that of the Java platform. This is justified by the fact that SLF4J's > implementation performs about 10 times faster but at the cost of being > non-standard and less flexible. > > The ideia is to use the full stack feature of MessageFormat like that: > > Object[] arguments = { > new Integer(7), > new Date(System.currentTimeMillis()), > "a disturbance in the Force" > }; > > String result = MessageFormat.format( > "At {1,time} on {1,date}, there was {2} on planet > {0,number,integer}.", > arguments); > > output: At 12:30 PM on Jul 3, 2053, there was a disturbance > in the Force on planet 7. > > anyone ? > > _______________________________________________ > Logback-user mailing list > [email protected] > http://mailman.qos.ch/mailman/listinfo/logback-user >
_______________________________________________ Logback-user mailing list [email protected] http://mailman.qos.ch/mailman/listinfo/logback-user
