getJavaLogLevel(sessionLogEntry.getLevel())));
}
// get a log record for the given session log entry
private EclipseLinkLogRecord getLogRecord(SessionLogEntry sessionLogEntry, Level level) {
EclipseLinkLogRecord logRecord =
new EclipseLinkLogRecord(level, formatMessage(sessionLogEntry));
logRecord.setLoggerName(sessionLogEntry.getNameSpace());
logRecord.setShouldPrintDate(shouldPrintDate());
logRecord.setShouldPrintThread(shouldPrintThread());
Throwable exception = sessionLogEntry.getException();
if (exception != null) {
logRecord.setThrown(exception);
logRecord.setShouldLogExceptionStackTrace(shouldLogExceptionStackTrace());
}
if (shouldPrintConnection()) {
logRecord.setConnection(sessionLogEntry.getConnection());
}
if (shouldPrintSession()) {
logRecord.setSessionString(getSessionString(sessionLogEntry.getSession()));
}
return logRecord;
}