poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ye...@apache.org
Subject svn commit: r1410318 - in /poi/trunk/src: documentation/content/xdocs/ java/org/apache/poi/ java/org/apache/poi/hpsf/ java/org/apache/poi/hssf/eventusermodel/ java/org/apache/poi/hssf/record/ java/org/apache/poi/hssf/record/common/ java/org/apache/poi/...
Date Fri, 16 Nov 2012 12:21:54 GMT
Author: yegor
Date: Fri Nov 16 12:21:49 2012
New Revision: 1410318

URL: http://svn.apache.org/viewvc?rev=1410318&view=rev
Log:
Bug 52628 - Replace System.err info messages with a POILogger

Modified:
    poi/trunk/src/documentation/content/xdocs/status.xml
    poi/trunk/src/java/org/apache/poi/POIDocument.java
    poi/trunk/src/java/org/apache/poi/hpsf/HPSFRuntimeException.java
    poi/trunk/src/java/org/apache/poi/hpsf/VariantSupport.java
    poi/trunk/src/java/org/apache/poi/hssf/eventusermodel/FormatTrackingHSSFListener.java
    poi/trunk/src/java/org/apache/poi/hssf/record/EmbeddedObjectRefSubRecord.java
    poi/trunk/src/java/org/apache/poi/hssf/record/FeatRecord.java
    poi/trunk/src/java/org/apache/poi/hssf/record/HyperlinkRecord.java
    poi/trunk/src/java/org/apache/poi/hssf/record/SSTDeserializer.java
    poi/trunk/src/java/org/apache/poi/hssf/record/common/UnicodeString.java
    poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFEvaluationWorkbook.java
    poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFPicture.java
    poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFPolygon.java
    poi/trunk/src/java/org/apache/poi/poifs/filesystem/EntryUtils.java
    poi/trunk/src/java/org/apache/poi/ss/formula/constant/ErrorConstant.java
    poi/trunk/src/java/org/apache/poi/ss/util/DateFormatConverter.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hdgf/chunks/ChunkFactory.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hdgf/streams/ChunkStream.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hmef/attribute/MAPIDateAttribute.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hmef/attribute/MAPIStringAttribute.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hmef/attribute/TNEFDateAttribute.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hmef/attribute/TNEFStringAttribute.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/Sheet.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/CurrentUserAtom.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/Record.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/datatypes/AttachmentChunks.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/datatypes/MessageSubmissionChunk.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/datatypes/RecipientChunks.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/parsers/POIFSChunkParser.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/converter/AbstractWordUtils.java

Modified: poi/trunk/src/documentation/content/xdocs/status.xml
URL: http://svn.apache.org/viewvc/poi/trunk/src/documentation/content/xdocs/status.xml?rev=1410318&r1=1410317&r2=1410318&view=diff
==============================================================================
--- poi/trunk/src/documentation/content/xdocs/status.xml (original)
+++ poi/trunk/src/documentation/content/xdocs/status.xml Fri Nov 16 12:21:49 2012
@@ -34,6 +34,7 @@
 
     <changes>
         <release version="3.9-beta1" date="2012-??-??">
+          <action dev="poi-developers" type="fix">52628 - Replace System.err info messages with a POILogger</action>
           <action dev="poi-developers" type="fix">54137 - improved performance of DataFormatter with Fractions</action>
           <action dev="poi-developers" type="fix">54099 - Ensure that CTHMerge and CTTcBorders go to poi-ooxml-schemas jar</action>
           <action dev="poi-developers" type="fix">54111 - Fixed extracting text from table cells in HSLF</action>

Modified: poi/trunk/src/java/org/apache/poi/POIDocument.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/POIDocument.java?rev=1410318&r1=1410317&r2=1410318&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/POIDocument.java (original)
+++ poi/trunk/src/java/org/apache/poi/POIDocument.java Fri Nov 16 12:21:49 2012
@@ -221,7 +221,7 @@ public abstract class POIDocument {
 
 			logger.log(POILogger.INFO, "Wrote property set " + name + " of size " + data.length);
 		} catch(org.apache.poi.hpsf.WritingNotSupportedException wnse) {
-			System.err.println("Couldn't write property set with name " + name + " as not supported by HPSF yet");
+			logger.log( POILogger.ERROR, "Couldn't write property set with name " + name + " as not supported by HPSF yet");
 		}
 	}
 	

Modified: poi/trunk/src/java/org/apache/poi/hpsf/HPSFRuntimeException.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hpsf/HPSFRuntimeException.java?rev=1410318&r1=1410317&r2=1410318&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hpsf/HPSFRuntimeException.java (original)
+++ poi/trunk/src/java/org/apache/poi/hpsf/HPSFRuntimeException.java Fri Nov 16 12:21:49 2012
@@ -17,8 +17,6 @@
 
 package org.apache.poi.hpsf;
 
-import java.io.PrintStream;
-import java.io.PrintWriter;
 
 /**
  * <p>This exception is the superclass of all other unchecked
@@ -30,8 +28,8 @@ import java.io.PrintWriter;
  */
 public class HPSFRuntimeException extends RuntimeException
 {
-
-    /** <p>The underlying reason for this exception - may be
+	private static final long serialVersionUID = -7804271670232727159L;
+	/** <p>The underlying reason for this exception - may be
      * <code>null</code>.</p> */
     private Throwable reason;
 
@@ -105,44 +103,44 @@ public class HPSFRuntimeException extend
 
 
 
-    /**
-     * @see Throwable#printStackTrace()
-     */
-    public void printStackTrace()
-    {
-        printStackTrace(System.err);
-    }
+//    /**
+//     * @see Throwable#printStackTrace()
+//     */
+//    public void printStackTrace()
+//    {
+//        printStackTrace(System.err);
+//    }
 
 
 
-    /**
-     * @see Throwable#printStackTrace(java.io.PrintStream)
-     */
-    public void printStackTrace(final PrintStream p)
-    {
-        final Throwable reason = getReason();
-        super.printStackTrace(p);
-        if (reason != null)
-        {
-            p.println("Caused by:");
-            reason.printStackTrace(p);
-        }
-    }
+//    /**
+//     * @see Throwable#printStackTrace(java.io.PrintStream)
+//     */
+//    public void printStackTrace(final PrintStream p)
+//    {
+//        final Throwable reason = getReason();
+//        super.printStackTrace(p);
+//        if (reason != null)
+//        {
+//            p.println("Caused by:");
+//            reason.printStackTrace(p);
+//        }
+//    }
 
 
 
-    /**
-     * @see Throwable#printStackTrace(java.io.PrintWriter)
-     */
-    public void printStackTrace(final PrintWriter p)
-    {
-        final Throwable reason = getReason();
-        super.printStackTrace(p);
-        if (reason != null)
-        {
-            p.println("Caused by:");
-            reason.printStackTrace(p);
-        }
-    }
+//    /**
+//     * @see Throwable#printStackTrace(java.io.PrintWriter)
+//     */
+//    public void printStackTrace(final PrintWriter p)
+//    {
+//        final Throwable reason = getReason();
+//        super.printStackTrace(p);
+//        if (reason != null)
+//        {
+//            p.println("Caused by:");
+//            reason.printStackTrace(p);
+//        }
+//    }
 
 }

Modified: poi/trunk/src/java/org/apache/poi/hpsf/VariantSupport.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hpsf/VariantSupport.java?rev=1410318&r1=1410317&r2=1410318&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hpsf/VariantSupport.java (original)
+++ poi/trunk/src/java/org/apache/poi/hpsf/VariantSupport.java Fri Nov 16 12:21:49 2012
@@ -24,6 +24,9 @@ import java.util.Date;
 import java.util.LinkedList;
 import java.util.List;
 
+import org.apache.poi.util.POILogFactory;
+import org.apache.poi.util.POILogger;
+
 /**
  * <p>Supports reading and writing of variant data.</p>
  *
@@ -45,7 +48,7 @@ import java.util.List;
  */
 public class VariantSupport extends Variant
 {
-
+	private static POILogger logger = POILogFactory.getLogger(VariantSupport.class);
     private static boolean logUnsupportedTypes = false;
 
     /**
@@ -78,7 +81,7 @@ public class VariantSupport extends Vari
      * <p>Keeps a list of the variant types an "unsupported" message has already
      * been issued for.</p>
      */
-    protected static List unsupportedMessage;
+    protected static List<Long> unsupportedMessage;
 
     /**
      * <p>Writes a warning to <code>System.err</code> that a variant type is
@@ -93,11 +96,11 @@ public class VariantSupport extends Vari
         if (isLogUnsupportedTypes())
         {
             if (unsupportedMessage == null)
-                unsupportedMessage = new LinkedList();
+                unsupportedMessage = new LinkedList<Long>();
             Long vt = Long.valueOf(ex.getVariantType());
             if (!unsupportedMessage.contains(vt))
             {
-                System.err.println(ex.getMessage());
+            	logger.log( POILogger.ERROR, ex.getMessage());
                 unsupportedMessage.add(vt);
             }
         }

Modified: poi/trunk/src/java/org/apache/poi/hssf/eventusermodel/FormatTrackingHSSFListener.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/eventusermodel/FormatTrackingHSSFListener.java?rev=1410318&r1=1410317&r2=1410318&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/eventusermodel/FormatTrackingHSSFListener.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/eventusermodel/FormatTrackingHSSFListener.java Fri Nov 16 12:21:49 2012
@@ -31,6 +31,8 @@ import org.apache.poi.hssf.record.Number
 import org.apache.poi.hssf.record.Record;
 import org.apache.poi.hssf.usermodel.HSSFDataFormat;
 import org.apache.poi.hssf.usermodel.HSSFDataFormatter;
+import org.apache.poi.util.POILogFactory;
+import org.apache.poi.util.POILogger;
 
 /**
  * A proxy HSSFListener that keeps track of the document formatting records, and
@@ -38,6 +40,7 @@ import org.apache.poi.hssf.usermodel.HSS
  * ids.
  */
 public class FormatTrackingHSSFListener implements HSSFListener {
+	private static POILogger logger = POILogFactory.getLogger(FormatTrackingHSSFListener.class);
 	private final HSSFListener _childListener;
 	private final HSSFDataFormatter _formatter;
 	private final NumberFormat _defaultFormat;
@@ -137,7 +140,7 @@ public class FormatTrackingHSSFListener 
 		if (formatIndex >= HSSFDataFormat.getNumberOfBuiltinBuiltinFormats()) {
 			FormatRecord tfr = _customFormatRecords.get(Integer.valueOf(formatIndex));
 			if (tfr == null) {
-				System.err.println("Requested format at index " + formatIndex
+				logger.log( POILogger.ERROR, "Requested format at index " + formatIndex
 						+ ", but it wasn't found");
 			} else {
 				format = tfr.getFormatString();
@@ -167,7 +170,7 @@ public class FormatTrackingHSSFListener 
 	public int getFormatIndex(CellValueRecordInterface cell) {
 		ExtendedFormatRecord xfr = _xfRecords.get(cell.getXFIndex());
 		if (xfr == null) {
-			System.err.println("Cell " + cell.getRow() + "," + cell.getColumn()
+			logger.log( POILogger.ERROR, "Cell " + cell.getRow() + "," + cell.getColumn()
 					+ " uses XF with index " + cell.getXFIndex() + ", but we don't have that");
 			return -1;
 		}

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/EmbeddedObjectRefSubRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/EmbeddedObjectRefSubRecord.java?rev=1410318&r1=1410317&r2=1410318&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/EmbeddedObjectRefSubRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/EmbeddedObjectRefSubRecord.java Fri Nov 16 12:21:49 2012
@@ -29,6 +29,8 @@ import org.apache.poi.util.LittleEndian;
 import org.apache.poi.util.LittleEndianInput;
 import org.apache.poi.util.LittleEndianInputStream;
 import org.apache.poi.util.LittleEndianOutput;
+import org.apache.poi.util.POILogFactory;
+import org.apache.poi.util.POILogger;
 import org.apache.poi.util.StringUtil;
 
 /**
@@ -39,6 +41,7 @@ import org.apache.poi.util.StringUtil;
  * @author Daniel Noll
  */
 public final class EmbeddedObjectRefSubRecord extends SubRecord {
+	private static POILogger logger = POILogFactory.getLogger(EmbeddedObjectRefSubRecord.class);
 	public static final short sid = 0x0009;
 
 	private static final byte[] EMPTY_BYTE_ARRAY = { };
@@ -137,7 +140,7 @@ public final class EmbeddedObjectRefSubR
 		int nUnexpectedPadding = remaining - dataLenAfterFormula;
 
 		if (nUnexpectedPadding > 0) {
-			System.err.println("Discarding " + nUnexpectedPadding + " unexpected padding bytes ");
+			logger.log( POILogger.ERROR, "Discarding " + nUnexpectedPadding + " unexpected padding bytes ");
 			readRawData(in, nUnexpectedPadding);
 			remaining-=nUnexpectedPadding;
 		}

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/FeatRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/FeatRecord.java?rev=1410318&r1=1410317&r2=1410318&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/FeatRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/FeatRecord.java Fri Nov 16 12:21:49 2012
@@ -24,6 +24,8 @@ import org.apache.poi.hssf.record.common
 import org.apache.poi.hssf.record.common.SharedFeature;
 import org.apache.poi.ss.util.CellRangeAddress;
 import org.apache.poi.util.LittleEndianOutput;
+import org.apache.poi.util.POILogFactory;
+import org.apache.poi.util.POILogger;
 
 /**
  * Title: Feat (Feature) Record
@@ -32,6 +34,7 @@ import org.apache.poi.util.LittleEndianO
  *  up with a {@link FeatHdrRecord}.
  */
 public final class FeatRecord extends StandardRecord  {
+	private static POILogger logger = POILogFactory.getLogger(FeatRecord.class);
 	public final static short sid = 0x0868;
 	
 	private FtrHeader futureHeader;
@@ -90,7 +93,7 @@ public final class FeatRecord extends St
 			sharedFeature = new FeatSmartTag(in);
 			break;
 		default:
-			System.err.println("Unknown Shared Feature " + isf_sharedFeatureType + " found!");
+			logger.log( POILogger.ERROR, "Unknown Shared Feature " + isf_sharedFeatureType + " found!");
 		}
 	}
 

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/HyperlinkRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/HyperlinkRecord.java?rev=1410318&r1=1410317&r2=1410318&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/HyperlinkRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/HyperlinkRecord.java Fri Nov 16 12:21:49 2012
@@ -41,7 +41,7 @@ import org.apache.poi.util.StringUtil;
  */
 public final class HyperlinkRecord extends StandardRecord {
     public final static short sid = 0x01B8;
-    private POILogger logger = POILogFactory.getLogger(getClass());
+    private static POILogger logger = POILogFactory.getLogger(HyperlinkRecord.class);
 
     static final class GUID {
 		/*
@@ -641,7 +641,7 @@ public final class HyperlinkRecord exten
     	if (false) { // Quite a few examples in the unit tests which don't have the exact expected tail
             for (int i = 0; i < expectedTail.length; i++) {
                 if (expectedTail[i] != result[i]) {
-                    System.err.println("Mismatch in tail byte [" + i + "]"
+                	logger.log( POILogger.ERROR, "Mismatch in tail byte [" + i + "]"
                     		+ "expected " + (expectedTail[i] & 0xFF) + " but got " + (result[i] & 0xFF));
                 }
             }

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/SSTDeserializer.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/SSTDeserializer.java?rev=1410318&r1=1410317&r2=1410318&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/SSTDeserializer.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/SSTDeserializer.java Fri Nov 16 12:21:49 2012
@@ -21,6 +21,8 @@ package org.apache.poi.hssf.record;
 
 import org.apache.poi.hssf.record.common.UnicodeString;
 import org.apache.poi.util.IntMapper;
+import org.apache.poi.util.POILogFactory;
+import org.apache.poi.util.POILogger;
 
 /**
  * Handles the task of deserializing a SST string.  The two main entry points are
@@ -30,7 +32,7 @@ import org.apache.poi.util.IntMapper;
  */
 class SSTDeserializer
 {
-
+	private static POILogger logger = POILogFactory.getLogger(SSTDeserializer.class);
     private IntMapper<UnicodeString> strings;
 
     public SSTDeserializer( IntMapper<UnicodeString> strings )
@@ -49,7 +51,7 @@ class SSTDeserializer
          // Extract exactly the count of strings from the SST record.
          UnicodeString str;
          if(in.available() == 0 && ! in.hasNextRecord()) {
-            System.err.println("Ran out of data before creating all the strings! String at index " + i + "");
+        	 logger.log( POILogger.ERROR, "Ran out of data before creating all the strings! String at index " + i + "");
             str = new UnicodeString("");
          } else {
             str = new UnicodeString(in);

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/common/UnicodeString.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/common/UnicodeString.java?rev=1410318&r1=1410317&r2=1410318&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/common/UnicodeString.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/common/UnicodeString.java Fri Nov 16 12:21:49 2012
@@ -179,7 +179,7 @@ public class UnicodeString implements Co
 
           int extraDataLength = runData - (numRuns*6);
           if(extraDataLength < 0) {
-             System.err.println("Warning - ExtRst overran by " + (0-extraDataLength) + " bytes");
+        	 _logger.log( POILogger.WARN, "Warning - ExtRst overran by " + (0-extraDataLength) + " bytes");
              extraDataLength = 0;
           }
           extraData = new byte[extraDataLength];

Modified: poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFEvaluationWorkbook.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFEvaluationWorkbook.java?rev=1410318&r1=1410317&r2=1410318&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFEvaluationWorkbook.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFEvaluationWorkbook.java Fri Nov 16 12:21:49 2012
@@ -34,6 +34,8 @@ import org.apache.poi.ss.formula.Formula
 import org.apache.poi.ss.formula.FormulaRenderingWorkbook;
 import org.apache.poi.ss.formula.FormulaType;
 import org.apache.poi.ss.formula.udf.UDFFinder;
+import org.apache.poi.util.POILogFactory;
+import org.apache.poi.util.POILogger;
 
 /**
  * Internal POI use only
@@ -41,7 +43,7 @@ import org.apache.poi.ss.formula.udf.UDF
  * @author Josh Micich
  */
 public final class HSSFEvaluationWorkbook implements FormulaRenderingWorkbook, EvaluationWorkbook, FormulaParsingWorkbook {
-
+	private static POILogger logger = POILogFactory.getLogger(HSSFEvaluationWorkbook.class);
 	private final HSSFWorkbook _uBook;
 	private final InternalWorkbook _iBook;
 
@@ -139,7 +141,7 @@ public final class HSSFEvaluationWorkboo
 				// Note - as of Bugzilla 48036 (svn r828244, r828247) POI is capable of evaluating
 				// IntesectionPtg.  However it is still not capable of parsing it.
 				// So FormulaEvalTestData.xls now contains a few formulas that produce errors here.
-				System.err.println(e.getMessage());
+				logger.log( POILogger.ERROR, e.getMessage());
 			}
 		}
 		FormulaRecordAggregate fra = (FormulaRecordAggregate) cell.getCellValueRecord();

Modified: poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFPicture.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFPicture.java?rev=1410318&r1=1410317&r2=1410318&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFPicture.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFPicture.java Fri Nov 16 12:21:49 2012
@@ -27,6 +27,8 @@ import org.apache.poi.hssf.record.Escher
 import org.apache.poi.hssf.record.ObjRecord;
 import org.apache.poi.ss.usermodel.Picture;
 import org.apache.poi.ss.util.ImageUtils;
+import org.apache.poi.util.POILogFactory;
+import org.apache.poi.util.POILogger;
 import org.apache.poi.hssf.model.InternalWorkbook;
 
 /**
@@ -36,6 +38,8 @@ import org.apache.poi.hssf.model.Interna
  * @author Yegor Kozlov (yegor at apache.org)
  */
 public class HSSFPicture extends HSSFSimpleShape implements Picture {
+	private static POILogger logger = POILogFactory.getLogger(HSSFPicture.class);
+	
     public static final int PICTURE_TYPE_EMF = HSSFWorkbook.PICTURE_TYPE_EMF;                // Windows Enhanced Metafile
     public static final int PICTURE_TYPE_WMF = HSSFWorkbook.PICTURE_TYPE_WMF;                // Windows Metafile
     public static final int PICTURE_TYPE_PICT = HSSFWorkbook.PICTURE_TYPE_PICT;              // Macintosh PICT
@@ -283,7 +287,7 @@ public class HSSFPicture extends HSSFSim
             EscherComplexProperty prop = new EscherComplexProperty(EscherProperties.BLIP__BLIPFILENAME, true, data.getBytes("UTF-16LE"));
             setPropertyValue(prop);
         } catch (UnsupportedEncodingException e) {
-            System.out.println("Unsupported encoding: UTF-16LE");
+        	logger.log( POILogger.ERROR, "Unsupported encoding: UTF-16LE");
         }
     }
 

Modified: poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFPolygon.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFPolygon.java?rev=1410318&r1=1410317&r2=1410318&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFPolygon.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFPolygon.java Fri Nov 16 12:21:49 2012
@@ -20,12 +20,14 @@ package org.apache.poi.hssf.usermodel;
 import org.apache.poi.ddf.*;
 import org.apache.poi.hssf.record.*;
 import org.apache.poi.util.LittleEndian;
+import org.apache.poi.util.POILogFactory;
+import org.apache.poi.util.POILogger;
 
 /**
  * @author Glen Stampoultzis  (glens at superlinksoftware.com)
  */
 public class HSSFPolygon  extends HSSFSimpleShape {
-
+	private static POILogger logger = POILogFactory.getLogger(HSSFPolygon.class);
     public final static short OBJECT_TYPE_MICROSOFT_OFFICE_DRAWING = 0x1E;
 
     public HSSFPolygon(EscherContainerRecord spContainer, ObjRecord objRecord, TextObjectRecord _textObjectRecord) {
@@ -157,11 +159,11 @@ public class HSSFPolygon  extends HSSFSi
      */
     public void setPoints(int[] xPoints, int[] yPoints) {
         if (xPoints.length != yPoints.length){
-            System.out.println("xPoint.length must be equal to yPoints.length");
+        	logger.log( POILogger.ERROR, "xPoint.length must be equal to yPoints.length");
             return;
         }
         if (xPoints.length == 0){
-            System.out.println("HSSFPolygon must have at least one point");
+        	logger.log( POILogger.ERROR, "HSSFPolygon must have at least one point");
         }
         EscherArrayProperty verticesProp = new EscherArrayProperty(EscherProperties.GEOMETRY__VERTICES, false, new byte[0] );
         verticesProp.setNumberOfElementsInArray(xPoints.length+1);

Modified: poi/trunk/src/java/org/apache/poi/poifs/filesystem/EntryUtils.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/poifs/filesystem/EntryUtils.java?rev=1410318&r1=1410317&r2=1410318&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/poifs/filesystem/EntryUtils.java (original)
+++ poi/trunk/src/java/org/apache/poi/poifs/filesystem/EntryUtils.java Fri Nov 16 12:21:49 2012
@@ -36,7 +36,7 @@ public class EntryUtils
     public static void copyNodeRecursively( Entry entry, DirectoryEntry target )
             throws IOException
     {
-        // System.err.println("copyNodeRecursively called with "+entry.getName()+
+        // logger.log( POILogger.ERROR, "copyNodeRecursively called with "+entry.getName()+
         // ","+target.getName());
         DirectoryEntry newTarget = null;
         if ( entry.isDirectoryEntry() )

Modified: poi/trunk/src/java/org/apache/poi/ss/formula/constant/ErrorConstant.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/constant/ErrorConstant.java?rev=1410318&r1=1410317&r2=1410318&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/formula/constant/ErrorConstant.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/constant/ErrorConstant.java Fri Nov 16 12:21:49 2012
@@ -18,6 +18,8 @@
 package org.apache.poi.ss.formula.constant;
 
 import org.apache.poi.ss.usermodel.ErrorConstants;
+import org.apache.poi.util.POILogFactory;
+import org.apache.poi.util.POILogger;
 /**
  * Represents a constant error code value as encoded in a constant values array. <p/>
  * 
@@ -27,6 +29,7 @@ import org.apache.poi.ss.usermodel.Error
  * @author Josh Micich
  */
 public class ErrorConstant {
+	private static POILogger logger = POILogFactory.getLogger(ErrorConstant.class);
 	// convenient access to name space
 	private static final ErrorConstants EC = null;
 
@@ -64,7 +67,7 @@ public class ErrorConstant {
 			case ErrorConstants.ERROR_NUM:   return NUM;
 			case ErrorConstants.ERROR_NA:	return NA;
 		}
-		System.err.println("Warning - unexpected error code (" + errorCode + ")");
+		logger.log( POILogger.WARN, "Warning - unexpected error code (" + errorCode + ")");
 		return new ErrorConstant(errorCode);
 	}
 	public String toString() {

Modified: poi/trunk/src/java/org/apache/poi/ss/util/DateFormatConverter.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/util/DateFormatConverter.java?rev=1410318&r1=1410317&r2=1410318&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/util/DateFormatConverter.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/util/DateFormatConverter.java Fri Nov 16 12:21:49 2012
@@ -24,6 +24,9 @@ import java.util.List;
 import java.util.Locale;
 import java.util.Map;
 
+import org.apache.poi.util.POILogFactory;
+import org.apache.poi.util.POILogger;
+
 /**
  *  Convert java DateFormat patterns into Excel custom number formats.
  *  For example, to format a date in excel using the "dd MMMM, yyyy" pattern and Japanese
@@ -45,6 +48,7 @@ import java.util.Map;
  *
  */
 public class DateFormatConverter  {
+	private static POILogger logger = POILogFactory.getLogger(DateFormatConverter.class);
 	
 	public static class DateFormatTokenizer {
 		String format;
@@ -329,7 +333,7 @@ public class DateFormatConverter  {
 			result = localePrefixes.get( localeString.substring( 0, 2 ) );
 			if( result ==  null ) {
 				Locale parentLocale = new Locale(localeString.substring( 0, 2 ));
-				System.out.println( "Unable to find prefix for " + locale + "(" + locale.getDisplayName() + ") or " 
+				logger.log( POILogger.ERROR, "Unable to find prefix for " + locale + "(" + locale.getDisplayName() + ") or " 
 						+ localeString.substring( 0, 2 ) + "(" + parentLocale.getDisplayName() + ")" );
 				return "";
 			}

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hdgf/chunks/ChunkFactory.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hdgf/chunks/ChunkFactory.java?rev=1410318&r1=1410317&r2=1410318&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hdgf/chunks/ChunkFactory.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hdgf/chunks/ChunkFactory.java Fri Nov 16 12:21:49 2012
@@ -51,7 +51,7 @@ public final class ChunkFactory {
 		"/org/apache/poi/hdgf/chunks_parse_cmds.tbl";
 
 	/** For logging problems we spot with the file */
-	private POILogger logger = POILogFactory.getLogger(ChunkFactory.class);
+	private static POILogger logger = POILogFactory.getLogger(ChunkFactory.class);
 
 	public ChunkFactory(int version) throws IOException {
 		this.version = version;
@@ -153,7 +153,7 @@ public final class ChunkFactory {
 					data, endOfDataPos);
 				endOfDataPos += 8;
 			} else {
-				System.err.println("Header claims a length to " + endOfDataPos + " there's then no space for the trailer in the data (" + data.length + ")");
+				logger.log(POILogger.ERROR, "Header claims a length to " + endOfDataPos + " there's then no space for the trailer in the data (" + data.length + ")");
 			}
 		}
 		if(header.hasSeparator()) {
@@ -161,7 +161,7 @@ public final class ChunkFactory {
 				separator = new ChunkSeparator(
 						data, endOfDataPos);
 			} else {
-				System.err.println("Header claims a length to " + endOfDataPos + " there's then no space for the separator in the data (" + data.length + ")");
+				logger.log(POILogger.ERROR, "Header claims a length to " + endOfDataPos + " there's then no space for the separator in the data (" + data.length + ")");
 			}
 		}
 

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hdgf/streams/ChunkStream.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hdgf/streams/ChunkStream.java?rev=1410318&r1=1410317&r2=1410318&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hdgf/streams/ChunkStream.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hdgf/streams/ChunkStream.java Fri Nov 16 12:21:49 2012
@@ -23,8 +23,12 @@ import org.apache.poi.hdgf.chunks.Chunk;
 import org.apache.poi.hdgf.chunks.ChunkFactory;
 import org.apache.poi.hdgf.chunks.ChunkHeader;
 import org.apache.poi.hdgf.pointers.Pointer;
+import org.apache.poi.util.POILogFactory;
+import org.apache.poi.util.POILogger;
 
 public final class ChunkStream extends Stream {
+	private static POILogger logger = POILogFactory.getLogger(ChunkStream.class);
+	
 	private ChunkFactory chunkFactory;
 	/** All the Chunks we contain */
 	private Chunk[] chunks;
@@ -62,14 +66,14 @@ public final class ChunkStream extends S
 
 					pos += chunk.getOnDiskSize();
 				} else {
-					System.err.println("Needed " + headerSize + " bytes to create the next chunk header, but only found " + (contents.length-pos) + " bytes, ignoring rest of data");
+					logger.log(POILogger.WARN, "Needed " + headerSize + " bytes to create the next chunk header, but only found " + (contents.length-pos) + " bytes, ignoring rest of data");
 					pos = contents.length;
 				}
 			}
 		}
 		catch (Exception e)
 		{
-			System.err.println("Failed to create chunk at " + pos + ", ignoring rest of data." + e);
+			logger.log(POILogger.ERROR, "Failed to create chunk at " + pos + ", ignoring rest of data." + e);
 		}
 
 		chunks = chunksA.toArray(new Chunk[chunksA.size()]);

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hmef/attribute/MAPIDateAttribute.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hmef/attribute/MAPIDateAttribute.java?rev=1410318&r1=1410317&r2=1410318&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hmef/attribute/MAPIDateAttribute.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hmef/attribute/MAPIDateAttribute.java Fri Nov 16 12:21:49 2012
@@ -24,12 +24,15 @@ import org.apache.poi.hmef.HMEFMessage;
 import org.apache.poi.hpsf.Util;
 import org.apache.poi.hsmf.datatypes.MAPIProperty;
 import org.apache.poi.util.LittleEndian;
+import org.apache.poi.util.POILogFactory;
+import org.apache.poi.util.POILogger;
 
 /**
  * A pure-MAPI attribute holding a Date, which applies 
  *  to a {@link HMEFMessage} or one of its {@link Attachment}s.
  */
 public final class MAPIDateAttribute extends MAPIAttribute {
+   private static POILogger logger = POILogFactory.getLogger(MAPIDateAttribute.class);
    private Date data;
    
    /**
@@ -64,7 +67,7 @@ public final class MAPIDateAttribute ext
          return ((MAPIDateAttribute)attr).getDate();
       }
       
-      System.err.println("Warning, non date property found: " + attr.toString());
+      logger.log(POILogger.WARN, "Warning, non date property found: " + attr.toString());
       return null;
   }
 }

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hmef/attribute/MAPIStringAttribute.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hmef/attribute/MAPIStringAttribute.java?rev=1410318&r1=1410317&r2=1410318&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hmef/attribute/MAPIStringAttribute.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hmef/attribute/MAPIStringAttribute.java Fri Nov 16 12:21:49 2012
@@ -23,6 +23,8 @@ import org.apache.poi.hmef.Attachment;
 import org.apache.poi.hmef.HMEFMessage;
 import org.apache.poi.hsmf.datatypes.MAPIProperty;
 import org.apache.poi.hsmf.datatypes.Types;
+import org.apache.poi.util.POILogFactory;
+import org.apache.poi.util.POILogger;
 import org.apache.poi.util.StringUtil;
 
 /**
@@ -30,6 +32,7 @@ import org.apache.poi.util.StringUtil;
  *  to a {@link HMEFMessage} or one of its {@link Attachment}s.
  */
 public final class MAPIStringAttribute extends MAPIAttribute {
+   private static POILogger logger = POILogFactory.getLogger(MAPIStringAttribute.class);
    private static final String CODEPAGE = "CP1252";
    private final String data;
    
@@ -78,7 +81,7 @@ public final class MAPIStringAttribute e
          return ((MAPIRtfAttribute)attr).getDataString();
       }
       
-      System.err.println("Warning, non string property found: " + attr.toString());
+      logger.log(POILogger.WARN, "Warning, non string property found: " + attr.toString());
       return null;
   }
 }

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hmef/attribute/TNEFDateAttribute.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hmef/attribute/TNEFDateAttribute.java?rev=1410318&r1=1410317&r2=1410318&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hmef/attribute/TNEFDateAttribute.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hmef/attribute/TNEFDateAttribute.java Fri Nov 16 12:21:49 2012
@@ -27,12 +27,15 @@ import org.apache.poi.hmef.Attachment;
 import org.apache.poi.hmef.HMEFMessage;
 import org.apache.poi.hpsf.Util;
 import org.apache.poi.util.LittleEndian;
+import org.apache.poi.util.POILogFactory;
+import org.apache.poi.util.POILogger;
 
 /**
  * A Date attribute which applies to a {@link HMEFMessage}
  *  or one of its {@link Attachment}s.
  */
 public final class TNEFDateAttribute extends TNEFAttribute {
+   private static POILogger logger = POILogFactory.getLogger(TNEFDateAttribute.class);
    private Date data;
    
    /**
@@ -85,7 +88,7 @@ public final class TNEFDateAttribute ext
          return ((TNEFDateAttribute)attr).getDate();
       }
       
-      System.err.println("Warning, non date property found: " + attr.toString());
+      logger.log(POILogger.WARN, "Warning, non date property found: " + attr.toString());
       return null;
   }
 }

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hmef/attribute/TNEFStringAttribute.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hmef/attribute/TNEFStringAttribute.java?rev=1410318&r1=1410317&r2=1410318&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hmef/attribute/TNEFStringAttribute.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hmef/attribute/TNEFStringAttribute.java Fri Nov 16 12:21:49 2012
@@ -22,6 +22,8 @@ import java.io.InputStream;
 
 import org.apache.poi.hmef.Attachment;
 import org.apache.poi.hmef.HMEFMessage;
+import org.apache.poi.util.POILogFactory;
+import org.apache.poi.util.POILogger;
 import org.apache.poi.util.StringUtil;
 
 /**
@@ -29,6 +31,7 @@ import org.apache.poi.util.StringUtil;
  *  or one of its {@link Attachment}s.
  */
 public final class TNEFStringAttribute extends TNEFAttribute {
+   private static POILogger logger = POILogFactory.getLogger(TNEFStringAttribute.class);
    private String data;
    
    /**
@@ -75,7 +78,7 @@ public final class TNEFStringAttribute e
          return ((TNEFStringAttribute)attr).getString();
       }
       
-      System.err.println("Warning, non string property found: " + attr.toString());
+      logger.log(POILogger.WARN, "Warning, non string property found: " + attr.toString());
       return null;
   }
 }

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/Sheet.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/Sheet.java?rev=1410318&r1=1410317&r2=1410318&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/Sheet.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/Sheet.java Fri Nov 16 12:21:49 2012
@@ -20,6 +20,8 @@ package org.apache.poi.hslf.model;
 import org.apache.poi.ddf.*;
 import org.apache.poi.hslf.record.*;
 import org.apache.poi.hslf.usermodel.SlideShow;
+import org.apache.poi.util.POILogFactory;
+import org.apache.poi.util.POILogger;
 
 import java.util.ArrayList;
 import java.util.Iterator;
@@ -35,6 +37,8 @@ import java.awt.*;
  */
 
 public abstract class Sheet {
+	private static POILogger logger = POILogFactory.getLogger(Sheet.class);
+
     /**
      * The <code>SlideShow</code> we belong to
      */
@@ -194,7 +198,7 @@ public abstract class Sheet {
                 } else if (records[i + 1].getRecordType() == 4010l) {
                     // TextSpecInfoAtom - Safe to ignore
                 } else {
-                    System.err.println("Found a TextHeaderAtom not followed by a TextBytesAtom or TextCharsAtom: Followed by " + records[i + 1].getRecordType());
+                	logger.log(POILogger.ERROR, "Found a TextHeaderAtom not followed by a TextBytesAtom or TextCharsAtom: Followed by " + records[i + 1].getRecordType());
                 }
 
                 if (trun != null) {

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/CurrentUserAtom.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/CurrentUserAtom.java?rev=1410318&r1=1410317&r2=1410318&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/CurrentUserAtom.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/CurrentUserAtom.java Fri Nov 16 12:21:49 2012
@@ -23,6 +23,8 @@ package org.apache.poi.hslf.record;
 import java.io.*;
 import org.apache.poi.poifs.filesystem.*;
 import org.apache.poi.util.LittleEndian;
+import org.apache.poi.util.POILogFactory;
+import org.apache.poi.util.POILogger;
 import org.apache.poi.util.StringUtil;
 import org.apache.poi.hslf.exceptions.CorruptPowerPointFileException;
 import org.apache.poi.hslf.exceptions.EncryptedPowerPointFileException;
@@ -39,6 +41,8 @@ import org.apache.poi.hslf.exceptions.Ol
 
 public class CurrentUserAtom
 {
+	private static POILogger logger = POILogFactory.getLogger(CurrentUserAtom.class);
+
 	/** Standard Atom header */
 	public static final byte[] atomHeader = new byte[] { 0, 0, -10, 15 };
 	/** The PowerPoint magic number for a non-encrypted file */
@@ -128,7 +132,7 @@ public class CurrentUserAtom
 			if(_contents.length >= 4) {
 				// PPT95 has 4 byte size, then data
 				int size = LittleEndian.getInt(_contents);
-				System.err.println(size);
+				//System.err.println(size);
 				if(size + 4 == _contents.length) {
 					throw new OldPowerPointFormatException("Based on the Current User stream, you seem to have supplied a PowerPoint95 file, which isn't supported");
 				}
@@ -173,7 +177,7 @@ public class CurrentUserAtom
 		long usernameLen = LittleEndian.getUShort(_contents,20);
 		if(usernameLen > 512) {
 			// Handle the case of it being garbage
-			System.err.println("Warning - invalid username length " + usernameLen + " found, treating as if there was no username set");
+			logger.log(POILogger.WARN, "Warning - invalid username length " + usernameLen + " found, treating as if there was no username set");
 			usernameLen = 0;
 		}
 

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/Record.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/Record.java?rev=1410318&r1=1410317&r2=1410318&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/Record.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/Record.java Fri Nov 16 12:21:49 2012
@@ -38,7 +38,7 @@ import org.apache.poi.util.POILogger;
 public abstract class Record
 {
     // For logging
-    protected POILogger logger = POILogFactory.getLogger(this.getClass());
+	protected static POILogger logger = POILogFactory.getLogger(Record.class);
 
 	/**
 	 * Is this record type an Atom record (only has data),
@@ -155,7 +155,7 @@ public abstract class Record
 		// Handle case of a corrupt last record, whose claimed length
 		//  would take us passed the end of the file
 		if(start + len > b.length) {
-			System.err.println("Warning: Skipping record of type " + type + " at position " + start + " which claims to be longer than the file! (" + len + " vs " + (b.length-start) + ")");
+			logger.log(POILogger.WARN, "Warning: Skipping record of type " + type + " at position " + start + " which claims to be longer than the file! (" + len + " vs " + (b.length-start) + ")");
 			return null;
 		}
 

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/datatypes/AttachmentChunks.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/datatypes/AttachmentChunks.java?rev=1410318&r1=1410317&r2=1410318&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/datatypes/AttachmentChunks.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/datatypes/AttachmentChunks.java Fri Nov 16 12:21:49 2012
@@ -37,11 +37,14 @@ import java.util.Comparator;
 import java.util.List;
 
 import org.apache.poi.hsmf.MAPIMessage;
+import org.apache.poi.util.POILogFactory;
+import org.apache.poi.util.POILogger;
 
 /**
  * Collection of convenence chunks for standard parts of the MSG file attachment.
  */
 public class AttachmentChunks implements ChunkGroup {
+   private static POILogger logger = POILogFactory.getLogger(AttachmentChunks.class);
    public static final String PREFIX = "__attach_version1.0_#";
    
    public ByteChunk attachData;
@@ -131,7 +134,7 @@ public class AttachmentChunks implements
          } else if(chunk instanceof DirectoryChunk) {
              attachmentDirectory = (DirectoryChunk)chunk;
          } else {
-             System.err.println("Unexpected data chunk of type " + chunk);
+        	 logger.log(POILogger.ERROR, "Unexpected data chunk of type " + chunk);
          }
       }
       else if(chunk.getChunkId() == ATTACH_DISPOSITION.id) {

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/datatypes/MessageSubmissionChunk.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/datatypes/MessageSubmissionChunk.java?rev=1410318&r1=1410317&r2=1410318&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/datatypes/MessageSubmissionChunk.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/datatypes/MessageSubmissionChunk.java Fri Nov 16 12:21:49 2012
@@ -26,6 +26,8 @@ import java.util.regex.Pattern;
 
 import org.apache.poi.hsmf.datatypes.Types.MAPIType;
 import org.apache.poi.util.IOUtils;
+import org.apache.poi.util.POILogFactory;
+import org.apache.poi.util.POILogger;
 
 /**
  * A Chunk that holds the details given back by the
@@ -36,6 +38,7 @@ import org.apache.poi.util.IOUtils;
  */
 
 public class MessageSubmissionChunk extends Chunk {
+	private static POILogger logger = POILogFactory.getLogger(MessageSubmissionChunk.class);
 	private String rawId;
 	private Calendar date;
 	
@@ -87,7 +90,7 @@ public class MessageSubmissionChunk exte
                   date.set(Calendar.SECOND,      Integer.parseInt(m.group(6)));
                   date.set(Calendar.MILLISECOND, 0);
                } else {
-                  System.err.println("Warning - unable to make sense of date " + dateS);
+            	   logger.log(POILogger.WARN, "Warning - unable to make sense of date " + dateS);
                }
             }
          }

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/datatypes/RecipientChunks.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/datatypes/RecipientChunks.java?rev=1410318&r1=1410317&r2=1410318&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/datatypes/RecipientChunks.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/datatypes/RecipientChunks.java Fri Nov 16 12:21:49 2012
@@ -21,6 +21,9 @@ import java.util.ArrayList;
 import java.util.Comparator;
 import java.util.List;
 
+import org.apache.poi.util.POILogFactory;
+import org.apache.poi.util.POILogger;
+
 
 /**
  * Collection of convenience chunks for the
@@ -30,6 +33,8 @@ import java.util.List;
  *  several of these.
  */
 public final class RecipientChunks implements ChunkGroup {
+   private static POILogger logger = POILogFactory.getLogger(RecipientChunks.class);
+
    public static final String PREFIX = "__recip_version1.0_#";
    
    public static final MAPIProperty RECIPIENT_NAME   = MAPIProperty.DISPLAY_NAME;
@@ -82,7 +87,7 @@ public final class RecipientChunks imple
          try {
             recipientNumber = Integer.parseInt(number, 16);
          } catch(NumberFormatException e) {
-            System.err.println("Invalid recipient number in name " + name);
+        	 logger.log(POILogger.ERROR, "Invalid recipient number in name " + name);
          }
       }
    }

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/parsers/POIFSChunkParser.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/parsers/POIFSChunkParser.java?rev=1410318&r1=1410317&r2=1410318&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/parsers/POIFSChunkParser.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/parsers/POIFSChunkParser.java Fri Nov 16 12:21:49 2012
@@ -41,6 +41,8 @@ import org.apache.poi.poifs.filesystem.D
 import org.apache.poi.poifs.filesystem.DocumentNode;
 import org.apache.poi.poifs.filesystem.Entry;
 import org.apache.poi.poifs.filesystem.POIFSFileSystem;
+import org.apache.poi.util.POILogFactory;
+import org.apache.poi.util.POILogger;
 
 /**
  * Processes a POIFS of a .msg file into groups of Chunks, such as
@@ -48,6 +50,8 @@ import org.apache.poi.poifs.filesystem.P
  * data and so on.
  */
 public final class POIFSChunkParser {
+   private static POILogger logger = POILogFactory.getLogger(POIFSChunkParser.class);
+
    public static ChunkGroup[] parse(POIFSFileSystem fs) throws IOException {
       return parse(fs.getRoot());
    }
@@ -200,7 +204,7 @@ public final class POIFSChunkParser {
                 chunk.readValue(inp);
                 grouping.record(chunk);
              } catch(IOException e) {
-                System.err.println("Error reading from part " + entry.getName() + " - " + e.toString());
+            	 logger.log(POILogger.ERROR, "Error reading from part " + entry.getName() + " - " + e.toString());
              }
           } else {
              grouping.record(chunk);

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/converter/AbstractWordUtils.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/converter/AbstractWordUtils.java?rev=1410318&r1=1410317&r2=1410318&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/converter/AbstractWordUtils.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/converter/AbstractWordUtils.java Fri Nov 16 12:21:49 2012
@@ -453,7 +453,7 @@ public class AbstractWordUtils
     {
 
         if ( format != 0 )
-            System.err.println( "NYI: toListItemNumberLabel(): " + format );
+        	logger.log( POILogger.INFO, "NYI: toListItemNumberLabel(): " + format );
 
         return String.valueOf( number );
     }



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message