You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2017/11/07 09:56:54 UTC
[sling-org-apache-sling-pipes] 10/31: SLING-5728 enhance filterpipe
logging (patch provided by Nicolas Peltier)
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag org.apache.sling.pipes-0.0.10
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-pipes.git
commit 43bda66136aaad110630a1c3d02e02a1df7ec3aa
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Tue Jun 21 15:56:05 2016 +0000
SLING-5728 enhance filterpipe logging (patch provided by Nicolas Peltier)
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/contrib/extensions/sling-pipes@1749562 13f79535-47bb-0310-9956-ffa450edef68
---
src/main/java/org/apache/sling/pipes/FilterPipe.java | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/main/java/org/apache/sling/pipes/FilterPipe.java b/src/main/java/org/apache/sling/pipes/FilterPipe.java
index 918723b..5b3a73a 100644
--- a/src/main/java/org/apache/sling/pipes/FilterPipe.java
+++ b/src/main/java/org/apache/sling/pipes/FilterPipe.java
@@ -44,9 +44,12 @@ public class FilterPipe extends BasePipe {
boolean propertiesPass(ValueMap current, ValueMap filter){
if (filter.containsKey(PN_TEST)){
- if (!(Boolean) bindings.instantiateObject(filter.get(PN_TEST, "${false}"))){
+ Object test = bindings.instantiateObject(filter.get(PN_TEST, "${false}"));
+ if (! (test instanceof Boolean)){
+ logger.error("instatiated test {} is not a boolean, filtering out", test);
return false;
}
+ return (Boolean) test;
}
for (String key : filter.keySet()){
if (! IGNORED_PROPERTIES.contains(key) && !key.startsWith(PREFIX_FILTER)){
@@ -101,7 +104,7 @@ public class FilterPipe extends BasePipe {
logger.debug("filter passes for {}", resource.getPath());
return super.getOutput();
} else {
- logger.info("{} got filtered out", resource.getPath());
+ logger.debug("{} got filtered out", resource.getPath());
}
}
return Collections.emptyIterator();
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.