On Thu, Oct 4, 2012 at 10:06 PM, Paul Benedict <[email protected]> wrote:
> On Thu, Oct 4, 2012 at 7:24 PM, Gary Gregory <[email protected]>wrote: > >> On Thu, Oct 4, 2012 at 5:55 PM, Paul Benedict <[email protected]>wrote: >> >>> Ralph, >>> >>> This is actually a discussion you and I had a while back when I was >>> trying to figure out how to use String.format(). I like the model now of >>> specifying the message class... however... >>> >>> It does seem a bit unseemly to instantiate an xxxMessage object that may >>> never get used. I'd rather just pass in the Class<?> and let the logger >>> instantiate it only if it is going to log something. The only downside is >>> then configuring the actual class. >>> >>> Thoughts? >>> >> >> So instead of: >> >> this.logger.debug(new StringFormattedMessage(format, values), t); >> >> I would do: >> >> this.logger.debug(StringFormattedMessage.class, t, format, values); >> >> > I was thinking of adding this signature: > logger.debug(Message m, Throwable t, Object... messageParams); > > Thoughts? > Pardon me for being dense, but how does that help in the case of my examples? Thank you in advance for clarifying, Gary > > Paul > -- E-Mail: [email protected] | [email protected] JUnit in Action, 2nd Ed: <http://goog_1249600977>http://bit.ly/ECvg0 Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK Blog: http://garygregory.wordpress.com Home: http://garygregory.com/ Tweet! http://twitter.com/GaryGregory
