I was wondering what the reason was for using a customer message formatter for 
the logger instead of the one provided with java under
http://docs.oracle.com/javase/1.5.0/docs/api/java/util/Formatter.html
or an implemtation of
http://docs.oracle.com/javase/1.5.0/docs/api/java/text/Format.html

From http://www.slf4j.org/apidocs/org/slf4j/helpers/MessageFormatter.html I see 
it was due to performance, but would it have made sense to have the custom 
formatter implement java.text.Format?
the SLF API could then look like this: trace (java.text.Format, Object... args)
allowing the caller to use a slower formatter if they want more complex 
formatting options?

I guess my main issue though was that the manual ( 
http://www.slf4j.org/manual.html <http://www.slf4j.org/manual.html > ) mentions 
the vararg usage, but does not indicate that it is using a non-standard 
formatter for the messages.

It would be nice to at least get a link to the API in the manual to the 
MessageFormatter class so users know that they can't use the standard java 
formatter.

The nicest option would be that link, plus an @see note in the javadoc for 
Logger calls that accept formatting, that way tools like Eclipse can show the 
note in the API tool tips.

Thanks!

John. 
_______________________________________________
slf4j-user mailing list
[email protected]
http://mailman.qos.ch/mailman/listinfo/slf4j-user

Reply via email to