diff --git a/http/base/src/main/java/org/apache/felix/http/base/internal/handler/PreprocessorHandler.java b/http/base/src/main/java/org/apache/felix/http/base/internal/handler/PreprocessorHandler.java index ae30fdadaf..332930f411 100644 --- a/http/base/src/main/java/org/apache/felix/http/base/internal/handler/PreprocessorHandler.java +++ b/http/base/src/main/java/org/apache/felix/http/base/internal/handler/PreprocessorHandler.java @@ -20,6 +20,7 @@ import org.apache.felix.http.base.internal.logger.SystemLogger; import org.apache.felix.http.base.internal.runtime.PreprocessorInfo; +import org.apache.felix.http.base.internal.wrappers.PreprocessorWrapper; import org.jetbrains.annotations.NotNull; import org.osgi.framework.BundleContext; import org.osgi.service.servlet.runtime.dto.DTOConstants; @@ -30,6 +31,7 @@ import jakarta.servlet.ServletException; import jakarta.servlet.ServletRequest; import jakarta.servlet.ServletResponse; +import jakarta.servlet.http.HttpServletRequest; /** * The preprocessor handler handles the initialization and destruction of preprocessor @@ -129,6 +131,16 @@ public void handle(@NotNull final ServletRequest req, final Preprocessor local = this.preprocessor; if ( local != null ) { + if (SystemLogger.LOGGER.isDebugEnabled()) { + HttpServletRequest hRequest = (HttpServletRequest) req; + if (local instanceof org.apache.felix.http.base.internal.wrappers.PreprocessorWrapper) { + PreprocessorWrapper tmpLocal = (org.apache.felix.http.base.internal.wrappers.PreprocessorWrapper) local; + SystemLogger.LOGGER.debug("Invoking OSGi preprocessor {} for path {}", tmpLocal.getPreprocessor().getClass().getName(), hRequest.getRequestURI()); + } else { + SystemLogger.LOGGER.debug("Invoking OSGi preprocessor {} for path {}", local.getClass().getName(), hRequest.getRequestURI()); + } + + } local.doFilter(req, res, chain); } else