[logback-user] Custom formatting of parameterized string

RossJ rossjohnson at e2eit.com.au
Wed Nov 28 08:50:01 CET 2007


Hello,

I would like to be able to use parameterized logging with a byte[] argument
(formatted as a hex string). Obviously this doesn't work today because
arrays don't have a toString() implementation.

One way I can see to do this is to modify (or substitute) the
ch.qos.logback.classic.pattern.MessageConverter class and base my
implementation on the org.slf4j.helpers.MessageFormatter class. I can either
build my own logback.jar or manipulate the classpath to make it active.

Is there a better way to do this? Is customization of the parameterized
formatting an area that is likely to be enhanced in future releases? Or is
my requirement somehow unusual...

/Thanks, Ross.

-- 
View this message in context: http://www.nabble.com/Custom-formatting-of-parameterized-string-tf4882185.html#a13972167
Sent from the Logback User mailing list archive at Nabble.com.




More information about the Logback-user mailing list