From 119236e4eef924a6f921e07b3d325fc2c89c61ee Mon Sep 17 00:00:00 2001 From: Shivam Sharma Date: Wed, 16 Aug 2023 13:01:19 +0530 Subject: [PATCH] remove wrapper in log --- .../java/io/quarkiverse/quinoa/QuinoaDevProxyHandler.java | 4 +--- .../src/main/java/io/quarkiverse/quinoa/QuinoaRecorder.java | 6 ++---- .../java/io/quarkiverse/quinoa/QuinoaSPARoutingHandler.java | 6 ++---- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/runtime/src/main/java/io/quarkiverse/quinoa/QuinoaDevProxyHandler.java b/runtime/src/main/java/io/quarkiverse/quinoa/QuinoaDevProxyHandler.java index c24b1827..a48754fc 100644 --- a/runtime/src/main/java/io/quarkiverse/quinoa/QuinoaDevProxyHandler.java +++ b/runtime/src/main/java/io/quarkiverse/quinoa/QuinoaDevProxyHandler.java @@ -132,9 +132,7 @@ private void forwardError(AsyncResult> event, int statusCod private void forwardResponse(AsyncResult> event, HttpServerRequest request, RoutingContext ctx, String resourcePath) { - if (LOG.isDebugEnabled()) { - LOG.debugf("Quinoa is forwarding: '%s'", request.uri()); - } + LOG.debugf("Quinoa is forwarding: '%s'", request.uri()); final HttpServerResponse response = ctx.response(); for (String header : HEADERS_TO_FORWARD) { response.headers().add(header, event.result().headers().getAll(header)); diff --git a/runtime/src/main/java/io/quarkiverse/quinoa/QuinoaRecorder.java b/runtime/src/main/java/io/quarkiverse/quinoa/QuinoaRecorder.java index ae878cc7..dafffc69 100644 --- a/runtime/src/main/java/io/quarkiverse/quinoa/QuinoaRecorder.java +++ b/runtime/src/main/java/io/quarkiverse/quinoa/QuinoaRecorder.java @@ -49,10 +49,8 @@ static String resolvePath(RoutingContext ctx) { } static boolean isIgnored(final String path, final List ignoredPathPrefixes) { - if (ignoredPathPrefixes.stream().anyMatch(path::startsWith)) { - if (LOG.isDebugEnabled()) { - LOG.debugf("Quinoa is ignoring path (quarkus.quinoa.ignored-path-prefixes): " + path); - } + if (ignoredPathPrefixes.stream().anyMatch(path::startsWith)) { + LOG.debugf("Quinoa is ignoring path (quarkus.quinoa.ignored-path-prefixes): " + path); return true; } return false; diff --git a/runtime/src/main/java/io/quarkiverse/quinoa/QuinoaSPARoutingHandler.java b/runtime/src/main/java/io/quarkiverse/quinoa/QuinoaSPARoutingHandler.java index 752c4afe..bf138439 100644 --- a/runtime/src/main/java/io/quarkiverse/quinoa/QuinoaSPARoutingHandler.java +++ b/runtime/src/main/java/io/quarkiverse/quinoa/QuinoaSPARoutingHandler.java @@ -29,10 +29,8 @@ public void handle(RoutingContext ctx) { return; } String path = resolvePath(ctx); - if (!Objects.equals(path, "/") && !isIgnored(path, config.ignoredPathPrefixes)) { - if (LOG.isDebugEnabled()) { - LOG.debugf("Quinoa is re-routing SPA request '%s' to '/'", ctx.normalizedPath()); - } + if (!Objects.equals(path, "/") && !isIgnored(path, config.ignoredPathPrefixes)) { + LOG.debugf("Quinoa is re-routing SPA request '%s' to '/'", ctx.normalizedPath()); ctx.reroute(ctx.mountPoint() != null ? ctx.mountPoint() : "/"); } else { next(currentClassLoader, ctx);