Ewocker commented on code in PR #561:
URL: https://github.com/apache/jackrabbit-oak/pull/561#discussion_r867283424


##########
oak-run/src/main/java/org/apache/jackrabbit/oak/plugins/tika/TextExtractor.java:
##########
@@ -270,22 +272,22 @@ public InputStream get() {
             // not being present. This is equivalent to disabling
             // selected media types in configuration, so we can simply
             // ignore these errors.
-            log.debug("Failed to extract text from a binary property: {}."
+            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",
-                    path, e);
+                            + " The stack trace is included to flag some 
'unintended' failures";
+            log.warn(format, linkageErrorFound ? path : new Object[]{path, e});
             parserErrorCount.incrementAndGet();
             return ERROR_TEXT;
         } catch (Throwable t) {
             // Capture and report any other full text extraction problems.
             // The special STOP exception is used for normal termination.
             if (!handler.isWriteLimitReached(t)) {
                 parserErrorCount.incrementAndGet();
-                parserError.debug("Failed to extract text from a binary 
property: "
-                        + path
+                String format = "Failed to extract text from a binary 
property: {}"
                         + " This is a fairly common case, and nothing to"
                         + " worry about. The stack trace is included to"
-                        + " help improve the text extraction feature.", t);
+                        + " help improve the text extraction feature.";
+                parserError.warn(format, throwableErrorFound ? path : new 
Object[]{path, t});

Review Comment:
   Correct, I believe the error is for any sort of failure here... so not 
necessary just jar missing.
   And no, we do not have any test case for this.



-- 
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: dev-unsubscr...@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to