Logging of api-rest requests and responses



Currently we have a poc and are integrating our portal with camunda.
It would be helpful if we where able to log the rest requests we received from our portal.
This will help to analyze in case of errors.

Regards Dirk


Hi Dirk,

have you tried to configure jul already? You can read more details here:




Sounds to me like something an application server should do for you or that should be implemented in a servlet filter.


My solution:

  1. Add javax.servlet dependency
  1. Create a javax.servlet.Filter

     package org.camunda.bpm.example.loanapproval.rest;
     import javax.servlet.Filter;
     public class RequestLoggingFilter implements Filter {
     	private static final Logger logger = LoggerFactory.getLogger(RequestLoggingFilter.class);
     	public void init(FilterConfig fConfig) throws ServletException {
     	public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
     		logger.info("Peticion REST");
     		chain.doFilter(request, response);
  2. Add new filter to web.xml. The filter should be the first applied.