diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/PathWatcher.java b/jetty-util/src/main/java/org/eclipse/jetty/util/PathWatcher.java index c095f488b53..5a48684b27b 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/PathWatcher.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/PathWatcher.java @@ -376,11 +376,16 @@ public class PathWatcher extends AbstractLifeCycle implements Runnable boolean needDelim = false; // Add root (aka "C:\" for Windows) - if (path.getRoot() != null) + Path root = path.getRoot(); + if (root != null) { - for (char c : path.getRoot().toString().toCharArray()) + if (NOISY_LOG.isDebugEnabled()) { - if (c != '\\') + NOISY_LOG.debug("Path: {} -> Root: {}",path,root); + } + for (char c : root.toString().toCharArray()) + { + if (c == '\\') { s.append(PATTERN_SEP); } diff --git a/jetty-util/src/test/resources/jetty-logging.properties b/jetty-util/src/test/resources/jetty-logging.properties index 0e3f8af5906..76035ea1ee8 100644 --- a/jetty-util/src/test/resources/jetty-logging.properties +++ b/jetty-util/src/test/resources/jetty-logging.properties @@ -2,4 +2,4 @@ org.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog #org.eclipse.jetty.util.LEVEL=DEBUG -org.eclipse.jetty.util.PathWatcher.Noisy.LEVEL=OFF +#org.eclipse.jetty.util.PathWatcher.Noisy.LEVEL=OFF