pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1865862 - in /pdfbox/branches/2.0/debugger/src/main/java/org/apache/pdfbox/debugger: streampane/tooltip/FontToolTip.java streampane/tooltip/KToolTip.java streampane/tooltip/SCNToolTip.java ui/textsearcher/SearchEngine.java
Date Sat, 24 Aug 2019 18:02:06 GMT
Author: tilman
Date: Sat Aug 24 18:02:05 2019
New Revision: 1865862

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

Modified:
    pdfbox/branches/2.0/debugger/src/main/java/org/apache/pdfbox/debugger/streampane/tooltip/FontToolTip.java
    pdfbox/branches/2.0/debugger/src/main/java/org/apache/pdfbox/debugger/streampane/tooltip/KToolTip.java
    pdfbox/branches/2.0/debugger/src/main/java/org/apache/pdfbox/debugger/streampane/tooltip/SCNToolTip.java
    pdfbox/branches/2.0/debugger/src/main/java/org/apache/pdfbox/debugger/ui/textsearcher/SearchEngine.java

Modified: pdfbox/branches/2.0/debugger/src/main/java/org/apache/pdfbox/debugger/streampane/tooltip/FontToolTip.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/debugger/src/main/java/org/apache/pdfbox/debugger/streampane/tooltip/FontToolTip.java?rev=1865862&r1=1865861&r2=1865862&view=diff
==============================================================================
--- pdfbox/branches/2.0/debugger/src/main/java/org/apache/pdfbox/debugger/streampane/tooltip/FontToolTip.java
(original)
+++ pdfbox/branches/2.0/debugger/src/main/java/org/apache/pdfbox/debugger/streampane/tooltip/FontToolTip.java
Sat Aug 24 18:02:05 2019
@@ -18,6 +18,8 @@
 package org.apache.pdfbox.debugger.streampane.tooltip;
 
 import java.io.IOException;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.apache.pdfbox.cos.COSName;
 import org.apache.pdfbox.pdmodel.PDResources;
 import org.apache.pdfbox.pdmodel.font.PDFont;
@@ -28,6 +30,7 @@ import org.apache.pdfbox.pdmodel.font.PD
  */
 final class FontToolTip implements ToolTip
 {
+    private static final Log LOG = LogFactory.getLog(FontToolTip.class);
     private String markup;
 
     /**
@@ -54,7 +57,7 @@ final class FontToolTip implements ToolT
                 }
                 catch (IOException e)
                 {
-                    e.printStackTrace();
+                    LOG.error(e.getMessage(), e);
                 }
             }
         }

Modified: pdfbox/branches/2.0/debugger/src/main/java/org/apache/pdfbox/debugger/streampane/tooltip/KToolTip.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/debugger/src/main/java/org/apache/pdfbox/debugger/streampane/tooltip/KToolTip.java?rev=1865862&r1=1865861&r2=1865862&view=diff
==============================================================================
--- pdfbox/branches/2.0/debugger/src/main/java/org/apache/pdfbox/debugger/streampane/tooltip/KToolTip.java
(original)
+++ pdfbox/branches/2.0/debugger/src/main/java/org/apache/pdfbox/debugger/streampane/tooltip/KToolTip.java
Sat Aug 24 18:02:05 2019
@@ -23,6 +23,8 @@ import java.awt.color.ICC_Profile;
 import java.io.IOException;
 import java.io.InputStream;
 import java.net.URL;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.apache.pdfbox.pdmodel.graphics.color.PDDeviceCMYK;
 
 /**
@@ -30,8 +32,9 @@ import org.apache.pdfbox.pdmodel.graphic
  *  A class that provide tooltip for K and k.
  */
 final class KToolTip extends ColorToolTip
-
 {
+    private static final Log LOG = LogFactory.getLog(KToolTip.class);
+
     /**
      * Constructor.
      * @param rowText String instance.
@@ -53,7 +56,7 @@ final class KToolTip extends ColorToolTi
             }
             catch (IOException e)
             {
-                e.printStackTrace();
+                LOG.error(e.getMessage(), e);
             }
         }
     }

Modified: pdfbox/branches/2.0/debugger/src/main/java/org/apache/pdfbox/debugger/streampane/tooltip/SCNToolTip.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/debugger/src/main/java/org/apache/pdfbox/debugger/streampane/tooltip/SCNToolTip.java?rev=1865862&r1=1865861&r2=1865862&view=diff
==============================================================================
--- pdfbox/branches/2.0/debugger/src/main/java/org/apache/pdfbox/debugger/streampane/tooltip/SCNToolTip.java
(original)
+++ pdfbox/branches/2.0/debugger/src/main/java/org/apache/pdfbox/debugger/streampane/tooltip/SCNToolTip.java
Sat Aug 24 18:02:05 2019
@@ -19,6 +19,8 @@ package org.apache.pdfbox.debugger.strea
 
 import java.awt.Color;
 import java.io.IOException;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.apache.pdfbox.cos.COSName;
 import org.apache.pdfbox.pdmodel.PDResources;
 import org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace;
@@ -30,6 +32,8 @@ import org.apache.pdfbox.pdmodel.graphic
  */
 final class SCNToolTip extends ColorToolTip
 {
+    private static final Log LOG = LogFactory.getLog(SCNToolTip.class);
+
     /**
      * Constructor.
      * @param rowText String instance.
@@ -48,7 +52,7 @@ final class SCNToolTip extends ColorTool
         }
         catch (IOException e)
         {
-            e.printStackTrace();
+            LOG.error(e.getMessage(), e);
         }
         if (colorSpace instanceof PDPattern)
         {
@@ -68,7 +72,7 @@ final class SCNToolTip extends ColorTool
             }
             catch (IOException e)
             {
-                e.printStackTrace();
+                LOG.error(e.getMessage(), e);
             }
         }
     }

Modified: pdfbox/branches/2.0/debugger/src/main/java/org/apache/pdfbox/debugger/ui/textsearcher/SearchEngine.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/debugger/src/main/java/org/apache/pdfbox/debugger/ui/textsearcher/SearchEngine.java?rev=1865862&r1=1865861&r2=1865862&view=diff
==============================================================================
--- pdfbox/branches/2.0/debugger/src/main/java/org/apache/pdfbox/debugger/ui/textsearcher/SearchEngine.java
(original)
+++ pdfbox/branches/2.0/debugger/src/main/java/org/apache/pdfbox/debugger/ui/textsearcher/SearchEngine.java
Sat Aug 24 18:02:05 2019
@@ -23,6 +23,8 @@ import javax.swing.text.BadLocationExcep
 import javax.swing.text.Document;
 import javax.swing.text.Highlighter;
 import javax.swing.text.JTextComponent;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 /**
  * @author Khyrul Bashar
@@ -30,6 +32,8 @@ import javax.swing.text.JTextComponent;
  */
 class SearchEngine
 {
+    private static final Log LOG = LogFactory.getLog(SearchEngine.class);
+
     private final Document document;
     private final Highlighter highlighter;
     private final Highlighter.HighlightPainter painter;
@@ -73,7 +77,7 @@ class SearchEngine
             }
             catch (BadLocationException e)
             {
-                e.printStackTrace();
+                LOG.error(e.getMessage(), e);
                 return highlights;
             }
             if (!isCaseSensitive)
@@ -97,7 +101,7 @@ class SearchEngine
                 }
                 catch (BadLocationException e)
                 {
-                    e.printStackTrace();
+                    LOG.error(e.getMessage(), e);
                 }
             }
         }



Mime
View raw message