Skip to content

Commit

Permalink
Adapting logging
Browse files Browse the repository at this point in the history
  • Loading branch information
cuioss committed Nov 23, 2023
1 parent 5a54694 commit 4e69265
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -227,13 +227,14 @@ private String resolveFromSourcePath(final String sourcePath) {
private Optional<URL> resolvePath(final String path) {
if (!path.startsWith("/")) {
for (var candidate : determineViewRelativePath(path)) {
log.debug("Checking Candidates '%s'", candidate);
log.debug("Checking candidate '%s'", candidate);
var found = getClass().getResource(candidate);
if (found != null) {
log.debug("Found candidate '%s'", candidate);
return Optional.of(found);
}
}
log.warn("%s", getClass().getResource(path));
log.warn("No relative path found for '%s'", path);
return Optional.empty();
}
Expand All @@ -247,7 +248,7 @@ private Set<String> determineViewRelativePath(final String path) {
var candidates = new CollectionBuilder<String>();
log.debug("META-INF candidate (portal-default) for '%s'", path);
candidates.add("/META-INF%s%s".formatted(currentFolder, path));
log.debug("META-INF candidate (myfaces/quarkus) for '%s'", path);
log.debug("META-INF/resources candidate (myfaces/quarkus) for '%s'", path);
candidates.add("/META-INF/resources%s%s".formatted(currentFolder, path));
log.debug("direct candidate (not within META-INF) for '%s'", path);
candidates.add("%s%s".formatted(currentFolder, path));
Expand Down

0 comments on commit 4e69265

Please sign in to comment.