Commit a45c0cce by Spencer Gibb

change printStackTrace to commons log statements

fixes gh-153
parent c31f700b
......@@ -23,6 +23,7 @@ import java.lang.reflect.Type;
import javax.inject.Provider;
import lombok.extern.apachecommons.CommonsLog;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.web.HttpMessageConverters;
import org.springframework.http.HttpHeaders;
......@@ -40,6 +41,7 @@ import static org.springframework.cloud.netflix.feign.FeignUtils.getHttpHeaders;
/**
* @author Spencer Gibb
*/
@CommonsLog
public class SpringDecoder implements Decoder {
@Autowired
......@@ -91,7 +93,7 @@ public class SpringDecoder implements Decoder {
this.response.body().close();
}
catch (IOException ex) {
ex.printStackTrace();
log.error("Error closing response body", ex);
}
}
......
......@@ -34,10 +34,12 @@ import com.netflix.zuul.ZuulFilter;
import com.netflix.zuul.constants.ZuulConstants;
import com.netflix.zuul.constants.ZuulHeaders;
import com.netflix.zuul.context.RequestContext;
import lombok.extern.apachecommons.CommonsLog;
/**
* @author Spencer Gibb
*/
@CommonsLog
public class SendResponseFilter extends ZuulFilter {
private static DynamicBooleanProperty INCLUDE_DEBUG_HEADER = DynamicPropertyFactory
......@@ -157,7 +159,7 @@ public class SendResponseFilter extends ZuulFilter {
}
catch (IOException ex) {
// ignore
ex.printStackTrace();
log.debug("Error writing response", ex);
}
// doubles buffer size if previous read filled it
if (bytesRead == bytes.length) {
......
......@@ -84,7 +84,7 @@ public class HystrixStreamTask implements ApplicationContextAware {
this.channel.send(json);
}
catch (Exception ex) {
ex.printStackTrace();
log.error("Error sending json to channel", ex);
}
}
}
......
......@@ -49,6 +49,7 @@ import org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer;
*/
@SuppressWarnings("deprecation")
@Configuration
@CommonsLog
public class HystrixDashboardConfiguration {
private static final String DEFAULT_TEMPLATE_LOADER_PATH = "classpath:/templates/";
......@@ -208,7 +209,7 @@ public class HystrixDashboardConfiguration {
is.close();
}
catch (Exception ex) {
// e.printStackTrace();
log.debug("Error closing input stream", ex);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment