From e0e307be5e6f3ec0752a166aa0ce5dbdd086c788 Mon Sep 17 00:00:00 2001 From: Nick Burch Date: Mon, 14 Apr 2008 11:47:47 +0000 Subject: [PATCH] Switch to using our own logger, rather than the commons one git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@647738 13f79535-47bb-0310-9956-ffa450edef68 --- src/documentation/content/xdocs/changes.xml | 1 + src/documentation/content/xdocs/status.xml | 1 + .../org/apache/poi/poifs/filesystem/POIFSFileSystem.java | 9 +++++---- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/documentation/content/xdocs/changes.xml b/src/documentation/content/xdocs/changes.xml index 1cd4891fd7..62e84c6460 100644 --- a/src/documentation/content/xdocs/changes.xml +++ b/src/documentation/content/xdocs/changes.xml @@ -37,6 +37,7 @@ + Fix the logger used by POIFSFileSystem, so that commons-logging isn't required when not used Update HSLFSlideShow and HSSFWorkbook to take advantage of POIFS updates, and allow reading embeded documents Improve how POIFS works with directory entries, and update HWPFDocument to support reading an embeded word document Initial support for getting and changing chart and series titles diff --git a/src/documentation/content/xdocs/status.xml b/src/documentation/content/xdocs/status.xml index 33bfce8cef..2c30a5552a 100644 --- a/src/documentation/content/xdocs/status.xml +++ b/src/documentation/content/xdocs/status.xml @@ -34,6 +34,7 @@ + Fix the logger used by POIFSFileSystem, so that commons-logging isn't required when not used Update HSLFSlideShow and HSSFWorkbook to take advantage of POIFS updates, and allow reading embeded documents Improve how POIFS works with directory entries, and update HWPFDocument to support reading an embeded word document Initial support for getting and changing chart and series titles diff --git a/src/java/org/apache/poi/poifs/filesystem/POIFSFileSystem.java b/src/java/org/apache/poi/poifs/filesystem/POIFSFileSystem.java index 7c693a5de8..92348ceaff 100644 --- a/src/java/org/apache/poi/poifs/filesystem/POIFSFileSystem.java +++ b/src/java/org/apache/poi/poifs/filesystem/POIFSFileSystem.java @@ -31,8 +31,6 @@ import java.util.Collections; import java.util.Iterator; import java.util.List; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.apache.poi.poifs.common.POIFSConstants; import org.apache.poi.poifs.dev.POIFSViewable; import org.apache.poi.poifs.property.DirectoryProperty; @@ -51,6 +49,8 @@ import org.apache.poi.poifs.storage.SmallBlockTableReader; import org.apache.poi.poifs.storage.SmallBlockTableWriter; import org.apache.poi.util.IOUtils; import org.apache.poi.util.LongField; +import org.apache.poi.util.POILogFactory; +import org.apache.poi.util.POILogger; /** * This is the main class of the POIFS system; it manages the entire @@ -62,7 +62,8 @@ import org.apache.poi.util.LongField; public class POIFSFileSystem implements POIFSViewable { - private static final Log _logger = LogFactory.getLog(POIFSFileSystem.class); + private static final POILogger _logger = + POILogFactory.getLogger(POIFSFileSystem.class); private static final class CloseIgnoringInputStream extends InputStream { @@ -190,7 +191,7 @@ public class POIFSFileSystem + "This will be a problem for the caller if the stream will still be used. " + "If that is the case the caller should wrap the input stream to avoid this close logic. " + "This warning is only temporary and will not be present in future versions of POI."; - _logger.warn(msg); + _logger.log(POILogger.WARN, msg); } try { stream.close(); -- 2.39.5