This is an automated email from the ASF dual-hosted git repository.
fortino pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git
The following commit(s) were added to refs/heads/trunk by this push:
new 549d3b6dbf OAK-10375: remove binary data from logs (#1353)
549d3b6dbf is described below
commit 549d3b6dbf79139a82e97c1e9bf014a5a9c016c4
Author: Steffen Van <[email protected]>
AuthorDate: Wed Apr 3 13:59:16 2024 +0200
OAK-10375: remove binary data from logs (#1353)
* fix: remove binary from log. Log only truncated property value
* added constant for truncation and tests
* rename tests and clean up test variables
* applied pr comments
* remove truncating and logging property values. Just remove the binary in
the logs and removed unused string interpolation
* added path
---
.../plugins/index/search/spi/editor/FulltextDocumentMaker.java | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git
a/oak-search/src/main/java/org/apache/jackrabbit/oak/plugins/index/search/spi/editor/FulltextDocumentMaker.java
b/oak-search/src/main/java/org/apache/jackrabbit/oak/plugins/index/search/spi/editor/FulltextDocumentMaker.java
index f26ecee728..864ace265e 100644
---
a/oak-search/src/main/java/org/apache/jackrabbit/oak/plugins/index/search/spi/editor/FulltextDocumentMaker.java
+++
b/oak-search/src/main/java/org/apache/jackrabbit/oak/plugins/index/search/spi/editor/FulltextDocumentMaker.java
@@ -21,7 +21,6 @@ package
org.apache.jackrabbit.oak.plugins.index.search.spi.editor;
import java.io.IOException;
import java.util.Arrays;
import java.util.Collections;
-import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
@@ -264,7 +263,9 @@ public abstract class FulltextDocumentMaker<D> implements
DocumentMaker<D> {
dirty = true;
}
} catch (Exception e) {
- log.error("could not index similarity field for property {}
and definition {}", property, pd);
+ log.error(
+ "could not index similarity field for property {} and
definition {} for path {}",
+ property.getName(), pd, path);
}
} else if (Type.BINARY.tag() == property.getType().tag()
&& includeTypeForFullText) {
@@ -317,7 +318,9 @@ public abstract class FulltextDocumentMaker<D> implements
DocumentMaker<D> {
indexSimilarityStrings(doc, pd, value);
}
} catch (Exception e) {
- log.error("could not index similarity field
for property {} and definition {}", property, pd);
+ log.error(
+ "could not index similarity field for
property {} and definition {} for path {}",
+ property.getName(), pd, path);
}
}
}