Skip to content
This repository has been archived by the owner on Feb 4, 2023. It is now read-only.

Commit

Permalink
Add debug messages
Browse files Browse the repository at this point in the history
  • Loading branch information
Benoit Guerin committed Jul 26, 2016
1 parent 050f353 commit 1c3c590
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,23 @@ public Collection<String> findScripts() {
if (specific != null && !specific.isEmpty()) {
final List<String> temp = new ArrayList<String>();
if (specific.endsWith(".js") || specific.endsWith(".coffee")) {
getLogger().debug("matching \"**/" + specific + "\"");
temp.add("**/" + specific);
} else {
getLogger().debug("matching \"**/" + specific + ".js\"");
temp.add("**/" + specific + ".js");
getLogger().debug("or matching \"**/" + specific + ".coffee\"");
temp.add("**/" + specific + ".coffee");
}
scanner.setIncludes(temp.toArray(new String[temp.size()]));
} else {
for (final String include : includes) {
getLogger().debug("matching \"**/" + include + "\"");
}
for (final String exclude : excludes) {
getLogger().debug("not matching \"**/" + exclude + "\"");
}

scanner.setIncludes(includes.toArray(new String[includes.size()]));
scanner.setExcludes(excludes.toArray(new String[excludes.size()]));
}
Expand All @@ -57,6 +67,10 @@ public Collection<String> findScripts() {
final List<String> result = asList(scanner.getIncludedFiles());
if (result.isEmpty()) {
getLogger().warn("No files found in directory " + baseDir + " matching criterias");
} else {
for (final String r : result) {
getLogger().debug("found \"" + r + "\"");
}
}

return result;
Expand Down

0 comments on commit 1c3c590

Please sign in to comment.