[slf4j-user] Logger 1.7 message format formatter
Chris Pratt
thechrispratt at gmail.com
Mon Oct 29 18:21:06 CET 2012
You might like http://code.google.com/p/anodyzed, it's based on the
MessageFormat format.
(*Chris*)
On Mon, Oct 29, 2012 at 7:59 AM, John Aylward - McLean <
John.Aylward at spacenet.com> wrote:
> **
> 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.htmlI 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
> ) 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
> slf4j-user at qos.ch
> http://mailman.qos.ch/mailman/listinfo/slf4j-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/slf4j-user/attachments/20121029/fa186b72/attachment.html>
More information about the slf4j-user
mailing list