m.put( LOG_RECORD_SOURCE_METHOD_NAME_KEY, record.getSourceMethodName() );
m.put( LOG_RECORD_THREAD_ID_KEY, record.getThreadID() );
final Throwable thrown = record.getThrown();
if ( thrown != null )
{
final Throwable mapped = new ThrowableMapper( thrown ).map();
m.put( LOG_RECORD_THROWN_KEY, mapped );
final Throwable rootCause = ExceptionUtil.getRootCause( thrown );
if ( rootCause != thrown )
{
final Throwable mappedRootCause = new ThrowableMapper( rootCause ).map();
m.put( LOG_RECORD_ROOT_CAUSE_KEY, mappedRootCause );
}
}
return m;
}