thomasmueller commented on code in PR #569:
URL: https://github.com/apache/jackrabbit-oak/pull/569#discussion_r874776266


##########
oak-run/src/main/java/org/apache/jackrabbit/oak/plugins/tika/TextExtractor.java:
##########
@@ -272,10 +272,11 @@ public InputStream get() {
             // not being present. This is equivalent to disabling
             // selected media types in configuration, so we can simply
             // ignore these errors.
-            String format = "Failed to extract text from a binary property: 
{}."
-                            + " This often happens when some media types are 
disabled by configuration."
-                            + " The stack trace is included to flag some 
'unintended' failures";
-            log.warn(format, linkageErrorFound ? path : new Object[]{path, e});
+            String infoMsgFmt = "Did not extract text from a binary property: 
{}.";
+            String debugMsgFmt = "This often happens when some media types are 
disabled by configuration."
+                    + " The stack trace is included to flag some 'unintended' 
failures. {}";
+            log.info(infoMsgFmt, path);
+            log.debug(debugMsgFmt, linkageErrorFound ? "Stacktrace suppressed 
due to multiple occurrence of same error." : e);

Review Comment:
   There is no need to suppress the stack trace for log.debug, because 
log.debug is disabled by default. That means, linkageErrorFound is not needed.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to