Yes, ultimately that ends up doing

protected void logMessage(final String fqcn, final Level level, final Marker 
marker, final String message,
        final Throwable t) {
    logMessageSafely(fqcn, level, marker, messageFactory.newMessage(message), 
t);
}
In AbstractLogger.  As you can see the throwable is not passed as a parameter 
when the Message is created. 

Ralph

> On Oct 8, 2020, at 9:06 PM, Bobby Bissett <robert.biss...@enterprisedb.com> 
> wrote:
> 
> On Thu, Oct 8, 2020 at 10:37 PM Clément Guillaume <cguilla...@hotpads.com>
> wrote:
> 
>> 
>> I guess I can do the following (not very elegant)
>>  logger.warn("{} ", (Object)new Exception("my message"));
>> 
> 
> Or just log: new Exception("my message").toString();
> 
> Cheers,
> Bobby

Reply via email to