pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1865888 - /pdfbox/branches/issue4569/debugger/src/main/java/org/apache/pdfbox/debugger/ui/textsearcher/Searcher.java
Date Sun, 25 Aug 2019 10:01:55 GMT
Author: tilman
Date: Sun Aug 25 10:01:55 2019
New Revision: 1865888

URL: http://svn.apache.org/viewvc?rev=1865888&view=rev
Log:
PDFBOX-4071: improve logging

Modified:
    pdfbox/branches/issue4569/debugger/src/main/java/org/apache/pdfbox/debugger/ui/textsearcher/Searcher.java

Modified: pdfbox/branches/issue4569/debugger/src/main/java/org/apache/pdfbox/debugger/ui/textsearcher/Searcher.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue4569/debugger/src/main/java/org/apache/pdfbox/debugger/ui/textsearcher/Searcher.java?rev=1865888&r1=1865887&r2=1865888&view=diff
==============================================================================
--- pdfbox/branches/issue4569/debugger/src/main/java/org/apache/pdfbox/debugger/ui/textsearcher/Searcher.java
(original)
+++ pdfbox/branches/issue4569/debugger/src/main/java/org/apache/pdfbox/debugger/ui/textsearcher/Searcher.java
Sun Aug 25 10:01:55 2019
@@ -34,6 +34,8 @@ import javax.swing.text.BadLocationExcep
 import javax.swing.text.DefaultHighlighter;
 import javax.swing.text.Highlighter;
 import javax.swing.text.JTextComponent;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 import org.apache.pdfbox.debugger.PDFDebugger;
 
@@ -42,6 +44,8 @@ import org.apache.pdfbox.debugger.PDFDeb
  */
 public class Searcher implements DocumentListener, ChangeListener, ComponentListener
 {
+    private static final Log LOG = LogFactory.getLog(Searcher.class);
+
     private static final Highlighter.HighlightPainter PAINTER =
             new DefaultHighlighter.DefaultHighlightPainter(Color.yellow);
     private static final Highlighter.HighlightPainter SELECTION_PAINTER =
@@ -139,7 +143,7 @@ public class Searcher implements Documen
         }
         catch (BadLocationException e)
         {
-            e.printStackTrace();
+            LOG.error(e.getMessage(), e);
         }
     }
 
@@ -192,7 +196,7 @@ public class Searcher implements Documen
         }
         catch (BadLocationException e)
         {
-            e.printStackTrace();
+            LOG.error(e.getMessage(), e);
         }
     }
 
@@ -218,7 +222,7 @@ public class Searcher implements Documen
         }
         catch (BadLocationException e)
         {
-            e.printStackTrace();
+            LOG.error(e.getMessage(), e);
         }
     }
 



Mime
View raw message