List<Serializable> record = srcRecords.get(recordIdx);
assert (record.size() == fieldHeaders.length);
//Serializable[] fieldValues = new Serializable[fieldHeaders.length];
LogRecord rec = new LogRecord();
int fieldIdx = 0;
rec.setRecordNumber(((Long) record.get(fieldIdx++)).longValue());
rec.setLoggedDateTime((Date) record.get(fieldIdx++));
rec.setLoggedLevel((String) record.get(fieldIdx++));
rec.setProductName((String) record.get(fieldIdx++));
rec.setLoggerName((String) record.get(fieldIdx++));
rec.setNameValuePairs((String) record.get(fieldIdx++));
rec.setMessageID((String) record.get(fieldIdx++));
rec.setMessage((String) record.get(fieldIdx++));
if (type.equals("json")) {
sb.append(sep);
sb.append(rec.toJSON());
sep = ",";
} else {
sb.append(rec.toXML());
}
}
}