You might like <a href="http://code.google.com/p/anodyzed">http://code.google.com/p/anodyzed</a>, it's based on the MessageFormat format.<br> (*Chris*)<br><br><div class="gmail_quote">On Mon, Oct 29, 2012 at 7:59 AM, John Aylward - McLean <span dir="ltr"><<a href="mailto:John.Aylward@spacenet.com" target="_blank">John.Aylward@spacenet.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>
<div>
I was wondering what the reason was for using a customer message formatter for the logger instead of the one provided with java under<br>
<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/util/Formatter.html" target="_blank">http://docs.oracle.com/javase/1.5.0/docs/api/java/util/Formatter.html</a><br>
or an implemtation of<br>
<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/text/Format.html" target="_blank">http://docs.oracle.com/javase/1.5.0/docs/api/java/text/Format.html</a><br>
<br>
>From <a href="http://www.slf4j.org/apidocs/org/slf4j/helpers/MessageFormatter.html" target="_blank">http://www.slf4j.org/apidocs/org/slf4j/helpers/MessageFormatter.html</a> I see it was due to performance, but would it have made sense to have the custom formatter implement java.text.Format?<br>
the SLF API could then look like this: trace (java.text.Format, Object... args)<br>
allowing the caller to use a slower formatter if they want more complex formatting options?<br>
<br>
I guess my main issue though was that the manual ( <a href="http://www.slf4j.org/manual.html" target="_blank">http://www.slf4j.org/manual.html </a>) mentions the vararg usage, but does not indicate that it is using a non-standard formatter for the messages.<br>
<br>
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.<br>
<br>
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.<br>
<br>
Thanks!<span class="HOEnZb"><font color="#888888"><br>
<br>
John.
</font></span></div>
<br>_______________________________________________<br>
slf4j-user mailing list<br>
<a href="mailto:slf4j-user@qos.ch">slf4j-user@qos.ch</a><br>
<a href="http://mailman.qos.ch/mailman/listinfo/slf4j-user" target="_blank">http://mailman.qos.ch/mailman/listinfo/slf4j-user</a><br></blockquote></div><br>