Thanks for the info. No big deal about having to concatenate those strings like that - it's what I was used to until recently ;-)<br><br><div class="gmail_quote">On Dec 19, 2007 12:30 PM, Ceki Gulcu <<a href="mailto:listid@qos.ch">
listid@qos.ch</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>Hi Lowell,<br><br>This is a well-known shortcoming of the SLF4J API. However, since exceptions are
<br>by definition rare, you can write<br><br>LOG.debug("Got a "+e.getClass().getName()+" with value "+ e.getValue(), e);<br><br>with an *infrequent* loss in performance. Of course, this form is also less
<br>pleasant to write, but again you write less of these.<br><br>HTH,<br><div><div></div><div class="Wj3C7c"><br>Lowell Kirsh wrote:<br>> Looking at the API, I can't figure out how to log an exception's stack<br>
> trace along with a parameterized string. What I want is something like:<br>><br>> ...<br>> catch (FooException e) {<br>> LOG.debug("Got a {} with value {}", e.getClass().getName(),<br>> e.getValue
(), e);<br>> }<br>><br>> But it seems from the API that I can either pass a Throwable to the log<br>> method, or some arguments to be interpolated into the String. Is there<br>> an idiom for doing both?<br>
><br>> Thanks,<br>> Lowell<br><br><br></div></div><font color="#888888">--<br>Ceki Gülcü<br>Logback: The reliable, generic, fast and flexible logging framework for Java.<br><a href="http://logback.qos.ch" target="_blank">
http://logback.qos.ch</a><br>_______________________________________________<br>user mailing list<br><a href="mailto:user@slf4j.org">user@slf4j.org</a><br><a href="http://www.slf4j.org/mailman/listinfo/user" target="_blank">
http://www.slf4j.org/mailman/listinfo/user</a><br></font></blockquote></div><br>