Class LoggingFilter

    • Constructor Detail

      • LoggingFilter

        public LoggingFilter()
    • Method Detail

      • setGloballyEnabled

        public static void setGloballyEnabled​(boolean bEnabled)
      • isGloballyEnabled

        public static boolean isGloballyEnabled()
      • isLogRequest

        @OverrideOnDemand
        protected boolean isLogRequest​(@Nonnull
                                       jakarta.servlet.http.HttpServletRequest aHttpRequest,
                                       @Nonnull
                                       jakarta.servlet.http.HttpServletResponse aHttpResponse)
        Check if this request should be logged or not.
        Parameters:
        aHttpRequest - Current HTTP servlet request. Never null.
        aHttpResponse - Current HTTP servlet response. Never null.
        Returns:
        true to log, false to not log the request
      • doHttpFilter

        public void doHttpFilter​(@Nonnull
                                 jakarta.servlet.http.HttpServletRequest aHttpRequest,
                                 @Nonnull
                                 jakarta.servlet.http.HttpServletResponse aHttpResponse,
                                 @Nonnull
                                 jakarta.servlet.FilterChain aFilterChain)
                          throws IOException,
                                 jakarta.servlet.ServletException
        Description copied from class: AbstractHttpServletFilter
        Implement this main filtering method in subclasses.
        Specified by:
        doHttpFilter in class AbstractHttpServletFilter
        Parameters:
        aHttpRequest - The HTTP request. Never null.
        aHttpResponse - The HTTP response. Never null.
        aFilterChain - The further filter chain.
        Throws:
        IOException - In case of an IO error
        jakarta.servlet.ServletException - For non IO errors