Skip to content

Commit

Permalink
Report ZuulExceptions through logger in ZuulServletFilter
Browse files Browse the repository at this point in the history
  • Loading branch information
ghenkes committed Jul 31, 2015
1 parent 3378b35 commit 27541b7
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.mockito.runners.MockitoJUnitRunner;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.servlet.*;
import javax.servlet.http.HttpServletRequest;
Expand All @@ -49,6 +51,8 @@
*/
public class ZuulServletFilter implements Filter {

private static Logger LOG = LoggerFactory.getLogger(ZuulServletFilter.class);

private ZuulRunner zuulRunner;

public void init(FilterConfig filterConfig) throws ServletException {
Expand Down Expand Up @@ -109,7 +113,7 @@ void init(HttpServletRequest servletRequest, HttpServletResponse servletResponse
void error(ZuulException e) {
RequestContext.getCurrentContext().setThrowable(e);
zuulRunner.error();
e.printStackTrace();
LOG.error(e.getMessage(), e);
}

public void destroy() {
Expand Down

0 comments on commit 27541b7

Please sign in to comment.