On Thu, Oct 4, 2012 at 7:24 PM, Gary Gregory <garydgreg...@gmail.com> wrote:

> On Thu, Oct 4, 2012 at 5:55 PM, Paul Benedict <pbened...@apache.org>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?

Paul

Reply via email to