package com.linkedin.uif.source.extractor.extract.restapi;

import java.io.IOException;

import com.linkedin.uif.configuration.WorkUnitState;
import com.linkedin.uif.source.extractor.Extractor;
import com.linkedin.uif.source.extractor.exception.ExtractPrepareException;
import com.linkedin.uif.source.extractor.extract.BaseSource;

/**
 * An implementation of salesforce source to get work units
 */
public class SalesforceSource<S, D> extends BaseSource<S, D> {

	public Extractor<S, D> getExtractor(WorkUnitState state) throws IOException {
		Extractor<S, D> extractor = null;
		try {
			extractor = new SalesforceExtractor<S, D>(state).build();
		} catch (ExtractPrepareException e) {
			e.printStackTrace();
			throw new IOException("Failed to prepare extractor; error-" + e.getMessage());
		}
		return extractor;
	}
}

@@ -82,16 +82,102 @@
 ption;%0A%0A
+import org.apache.commons.logging.Log;%0Aimport org.apache.commons.logging.LogFactory;%0A%0A
 import c
@@ -221,16 +221,16 @@
 tState;%0A
-
 import c
@@ -541,16 +541,85 @@
 %3CS, D%3E %7B
+%0A%09private static final Log LOG = LogFactory.getLog(BaseSource.class);
 %0A%0A%09publi
@@ -843,53 +843,17 @@
 %0A%09%09%09
-e.printStackTrace();%0A%09%09%09throw new IOException
+LOG.error
 (%22Fa
@@ -881,15 +881,16 @@
 ctor
-;
+:
  error
+ 
 -%22 +
@@ -907,16 +907,45 @@
 age());%0A
+%09%09%09throw new IOException(e);%0A
 %09%09%7D%0A%09%09re

Use Logging instead of printStackTrace()