fix #2511 improve log messages

This commit is contained in:
Shinsuke Sugaya 2020-12-25 07:22:38 +09:00
parent be91848439
commit e9a376b473

View file

@ -258,23 +258,30 @@ public class LabelTypeHelper {
if (includedPaths.matcher(path).matches()) {
if (excludedPaths != null && excludedPaths.matcher(path).matches()) {
if (logger.isDebugEnabled()) {
logger.debug("Path {} matched against the excludes paths expression {}", path, excludedPaths);
logger.debug("Path {} matches the include/exclude path expression {} on {} of label.", path, excludedPaths,
value);
}
return false;
}
if (logger.isDebugEnabled()) {
logger.debug("Path {} matches the include path expression {} on {} of label.", path, excludedPaths, value);
}
return true;
}
if (logger.isDebugEnabled()) {
logger.debug("Path {} wasn't matched against the include paths expression {}", path, includedPaths);
logger.debug("Path {} does not match the include path expression {} on {} of label.", path, excludedPaths, value);
}
return false;
} else {
if (excludedPaths != null && excludedPaths.matcher(path).matches()) {
if (logger.isDebugEnabled()) {
logger.debug("Path {} matched against the excludes paths expression {}", path, excludedPaths);
logger.debug("Path {} matches the exclude path expression {} on {} of label.", path, excludedPaths, value);
}
return false;
}
if (logger.isDebugEnabled()) {
logger.debug("Path {} does not match the exclude path expression {} on {} of label.", path, excludedPaths, value);
}
return true;
}
}