Class PrincipalLogFilter

java.lang.Object
ch.tocco.nice2.web.core.impl.servlet.PrincipalLogFilter
All Implemented Interfaces:
javax.servlet.Filter

@Component public class PrincipalLogFilter extends Object implements javax.servlet.Filter
Sets user information (id, username, session id) to MDC for logging before each request. Removes the data again after the request.
  • Constructor Details

    • PrincipalLogFilter

      @Lazy public PrincipalLogFilter(org.slf4j.Logger log, BusinessUnitManager businessUnitManager)
  • Method Details

    • doFilter

      public void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain) throws IOException, javax.servlet.ServletException
      Specified by:
      doFilter in interface javax.servlet.Filter
      Throws:
      IOException
      javax.servlet.ServletException