Skip to content

Commit

Permalink
remove wrapper in log
Browse files Browse the repository at this point in the history
  • Loading branch information
shivam-sharma7 committed Aug 16, 2023
1 parent 7b5cfdf commit 119236e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,7 @@ private void forwardError(AsyncResult<HttpResponse<Buffer>> event, int statusCod

private void forwardResponse(AsyncResult<HttpResponse<Buffer>> 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));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,8 @@ static String resolvePath(RoutingContext ctx) {
}

static boolean isIgnored(final String path, final List<String> 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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 119236e

Please sign in to comment.