From 1c3c5903012ecbb01d5a60fb735790fe9d7ac46d Mon Sep 17 00:00:00 2001 From: Benoit Guerin Date: Tue, 26 Jul 2016 15:52:11 +0200 Subject: [PATCH] Add debug messages --- .../casperjsrunner/DefaultScriptsFinder.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/main/java/com/github/casperjs/casperjsrunner/DefaultScriptsFinder.java b/src/main/java/com/github/casperjs/casperjsrunner/DefaultScriptsFinder.java index 80156cb..e51d71f 100644 --- a/src/main/java/com/github/casperjs/casperjsrunner/DefaultScriptsFinder.java +++ b/src/main/java/com/github/casperjs/casperjsrunner/DefaultScriptsFinder.java @@ -42,13 +42,23 @@ public Collection findScripts() { if (specific != null && !specific.isEmpty()) { final List temp = new ArrayList(); 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()])); } @@ -57,6 +67,10 @@ public Collection findScripts() { final List 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;