private static final String ADVERTISER_ID = "INSERT_ADVERTISER_ID_HERE";
public static void runExample(
DfaServices dfaServices, DfaSession session, long advertiserId) throws Exception {
// Request the service.
ChangeLogRemote service = dfaServices.get(session, ChangeLogRemote.class);
// Create change log search criteria structure.
ChangeLogRecordSearchCriteria searchCriteria = new ChangeLogRecordSearchCriteria();
searchCriteria.setPageSize(10);
searchCriteria.setObjectId(advertiserId);
// The following field has been filled in to choose advertiser change
// logs. This values was determined using GetChangeLogObjectTypes.java.
searchCriteria.setObjectTypeId(1L);
// Get change log record set.
ChangeLogRecordSet changeLogRecordSet = service.getChangeLogRecords(searchCriteria);
// Set up a formatter to make the change log timestamps human-readable.
SimpleDateFormat dateFormat = new SimpleDateFormat("d MMM yyyy HH:mm");
// Display the contents of each change log record