diff options
author | PJ Fanning <fanningpj@apache.org> | 2024-11-24 19:48:55 +0000 |
---|---|---|
committer | PJ Fanning <fanningpj@apache.org> | 2024-11-24 19:48:55 +0000 |
commit | 924d8e78940d2941788e70c9863ddb9d57b7146d (patch) | |
tree | 2bb55ab9929531bc04e3802c9a371dee50a2b789 | |
parent | e400a0cc0dcb7ee7000b1edf29e8af751ca88d66 (diff) | |
download | poi-924d8e78940d2941788e70c9863ddb9d57b7146d.tar.gz poi-924d8e78940d2941788e70c9863ddb9d57b7146d.zip |
PoiLogManager
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1922055 13f79535-47bb-0310-9956-ffa450edef68
251 files changed, 2477 insertions, 500 deletions
diff --git a/poi-examples/src/main/java/org/apache/poi/examples/hssf/usermodel/InCellLists.java b/poi-examples/src/main/java/org/apache/poi/examples/hssf/usermodel/InCellLists.java index 28c03a9bc4..d995b95d67 100644 --- a/poi-examples/src/main/java/org/apache/poi/examples/hssf/usermodel/InCellLists.java +++ b/poi-examples/src/main/java/org/apache/poi/examples/hssf/usermodel/InCellLists.java @@ -23,7 +23,6 @@ import java.io.IOException; import java.util.ArrayList; import java.util.List; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.poi.hssf.usermodel.HSSFCell; import org.apache.poi.hssf.usermodel.HSSFCellStyle; @@ -32,6 +31,7 @@ import org.apache.poi.hssf.usermodel.HSSFRichTextString; import org.apache.poi.hssf.usermodel.HSSFRow; import org.apache.poi.hssf.usermodel.HSSFSheet; import org.apache.poi.hssf.usermodel.HSSFWorkbook; +import org.apache.poi.logging.PoiLogManager; /** * This class contains code that demonstrates how to insert plain, numbered @@ -50,7 +50,7 @@ import org.apache.poi.hssf.usermodel.HSSFWorkbook; */ @SuppressWarnings({"java:S106","java:S4823"}) public class InCellLists { - private static final Logger LOG = LogManager.getLogger(InCellLists.class); + private static final Logger LOG = PoiLogManager.getLogger(InCellLists.class); // This character looks like a solid, black, loser case letter 'o' diff --git a/poi-examples/src/main/java/org/apache/poi/examples/hssf/usermodel/Outlines.java b/poi-examples/src/main/java/org/apache/poi/examples/hssf/usermodel/Outlines.java index 42f1b16fc3..3a90f49cea 100644 --- a/poi-examples/src/main/java/org/apache/poi/examples/hssf/usermodel/Outlines.java +++ b/poi-examples/src/main/java/org/apache/poi/examples/hssf/usermodel/Outlines.java @@ -22,12 +22,12 @@ import java.io.FileOutputStream; import java.io.IOException; import java.lang.reflect.InvocationTargetException; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.poi.hssf.usermodel.HSSFCell; import org.apache.poi.hssf.usermodel.HSSFRow; import org.apache.poi.hssf.usermodel.HSSFSheet; import org.apache.poi.hssf.usermodel.HSSFWorkbook; +import org.apache.poi.logging.PoiLogManager; /** * Creates outlines. @@ -35,7 +35,7 @@ import org.apache.poi.hssf.usermodel.HSSFWorkbook; public class Outlines implements Closeable { public static void main(String[] args) throws IOException, IllegalAccessException, InvocationTargetException, NoSuchMethodException { - Logger LOGGER = LogManager.getLogger(Outlines.class); + Logger LOGGER = PoiLogManager.getLogger(Outlines.class); for (int i=1; i<=13; i++) { try (Outlines o = new Outlines()) { String log = (String) Outlines.class.getDeclaredMethod("test" + i).invoke(o); diff --git a/poi-examples/src/main/java/org/apache/poi/examples/ss/ToCSV.java b/poi-examples/src/main/java/org/apache/poi/examples/ss/ToCSV.java index 8c1058341d..87543c7351 100644 --- a/poi-examples/src/main/java/org/apache/poi/examples/ss/ToCSV.java +++ b/poi-examples/src/main/java/org/apache/poi/examples/ss/ToCSV.java @@ -28,8 +28,8 @@ import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.util.ArrayList; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.ss.usermodel.Cell; import org.apache.poi.ss.usermodel.CellType; import org.apache.poi.ss.usermodel.DataFormatter; @@ -134,7 +134,7 @@ import org.apache.poi.ss.usermodel.WorkbookFactory; */ @SuppressWarnings({"java:S106","java:S4823","java:S1192"}) public class ToCSV { - private static final Logger LOG = LogManager.getLogger(ToCSV.class); + private static final Logger LOG = PoiLogManager.getLogger(ToCSV.class); private Workbook workbook; private ArrayList<ArrayList<String>> csvData; diff --git a/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/BigGridDemo.java b/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/BigGridDemo.java index f0562be0b8..022d50044d 100644 --- a/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/BigGridDemo.java +++ b/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/BigGridDemo.java @@ -35,8 +35,8 @@ import java.util.Random; import org.apache.commons.compress.archivers.zip.ZipArchiveEntry; import org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream; import org.apache.commons.compress.archivers.zip.ZipFile; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.openxml4j.opc.internal.ZipHelper; import org.apache.poi.ss.usermodel.DateUtil; import org.apache.poi.ss.usermodel.FillPatternType; @@ -77,7 +77,7 @@ import org.apache.poi.xssf.usermodel.XSSFWorkbook; * See <a href="https://poi.apache.org/spreadsheet/how-to.html#sxssf">SXSSF (Streaming Usermodel API)</a>. */ public final class BigGridDemo { - private static final Logger LOG = LogManager.getLogger(BigGridDemo.class); + private static final Logger LOG = PoiLogManager.getLogger(BigGridDemo.class); private static final Random rnd = new Random(); diff --git a/poi-integration/src/test/java/org/apache/poi/stress/HSLFFileHandler.java b/poi-integration/src/test/java/org/apache/poi/stress/HSLFFileHandler.java index f25da02fa8..7bf228cef2 100644 --- a/poi-integration/src/test/java/org/apache/poi/stress/HSLFFileHandler.java +++ b/poi-integration/src/test/java/org/apache/poi/stress/HSLFFileHandler.java @@ -23,15 +23,15 @@ import java.io.File; import java.io.FileInputStream; import java.io.InputStream; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.hslf.usermodel.HSLFSlideShow; import org.apache.poi.hslf.usermodel.HSLFSlideShowImpl; import org.junit.jupiter.api.Test; public class HSLFFileHandler extends SlideShowHandler { - private static final Logger LOGGER = LogManager.getLogger(HSLFFileHandler.class); + private static final Logger LOGGER = PoiLogManager.getLogger(HSLFFileHandler.class); @Override public void handleFile(InputStream stream, String path) throws Exception { diff --git a/poi-ooxml/src/main/java/org/apache/poi/ooxml/POIXMLDocumentPart.java b/poi-ooxml/src/main/java/org/apache/poi/ooxml/POIXMLDocumentPart.java index 53a7ebc1bd..200b035091 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/ooxml/POIXMLDocumentPart.java +++ b/poi-ooxml/src/main/java/org/apache/poi/ooxml/POIXMLDocumentPart.java @@ -26,8 +26,8 @@ import java.util.Map; import java.util.Objects; import java.util.Set; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.openxml4j.exceptions.InvalidFormatException; import org.apache.poi.openxml4j.exceptions.OpenXML4JException; import org.apache.poi.openxml4j.exceptions.PartAlreadyExistsException; @@ -53,7 +53,7 @@ import org.apache.poi.xwpf.usermodel.XWPFRelation; * </p> */ public class POIXMLDocumentPart { - private static final Logger LOG = LogManager.getLogger(POIXMLDocumentPart.class); + private static final Logger LOG = PoiLogManager.getLogger(POIXMLDocumentPart.class); private String coreDocumentRel = PackageRelationshipTypes.CORE_DOCUMENT; private PackagePart packagePart; diff --git a/poi-ooxml/src/main/java/org/apache/poi/ooxml/POIXMLFactory.java b/poi-ooxml/src/main/java/org/apache/poi/ooxml/POIXMLFactory.java index 0e91da3be9..bc4ed76961 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/ooxml/POIXMLFactory.java +++ b/poi-ooxml/src/main/java/org/apache/poi/ooxml/POIXMLFactory.java @@ -18,8 +18,8 @@ package org.apache.poi.ooxml; import java.io.IOException; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.ooxml.POIXMLRelation.PackagePartConstructor; import org.apache.poi.ooxml.POIXMLRelation.ParentPartConstructor; import org.apache.poi.openxml4j.exceptions.InvalidFormatException; @@ -31,7 +31,7 @@ import org.apache.xmlbeans.XmlException; * Defines a factory API that enables sub-classes to create instances of <code>POIXMLDocumentPart</code> */ public abstract class POIXMLFactory { - private static final Logger LOGGER = LogManager.getLogger(POIXMLFactory.class); + private static final Logger LOGGER = PoiLogManager.getLogger(POIXMLFactory.class); /** * Create a POIXMLDocumentPart from existing package part and relation. This method is called diff --git a/poi-ooxml/src/main/java/org/apache/poi/ooxml/POIXMLRelation.java b/poi-ooxml/src/main/java/org/apache/poi/ooxml/POIXMLRelation.java index ada90eb75d..aa1812aa25 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/ooxml/POIXMLRelation.java +++ b/poi-ooxml/src/main/java/org/apache/poi/ooxml/POIXMLRelation.java @@ -20,8 +20,8 @@ import java.io.IOException; import java.io.InputStream; import java.util.Iterator; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.openxml4j.exceptions.InvalidFormatException; import org.apache.poi.openxml4j.opc.PackagePart; import org.apache.poi.openxml4j.opc.PackagePartName; @@ -51,7 +51,7 @@ public abstract class POIXMLRelation { POIXMLDocumentPart init(POIXMLDocumentPart parent, PackagePart part) throws IOException, XmlException; } - private static final Logger LOGGER = LogManager.getLogger(POIXMLRelation.class); + private static final Logger LOGGER = PoiLogManager.getLogger(POIXMLRelation.class); /** * Describes the content stored in a part. diff --git a/poi-ooxml/src/main/java/org/apache/poi/ooxml/util/XPathHelper.java b/poi-ooxml/src/main/java/org/apache/poi/ooxml/util/XPathHelper.java index 74b96109e2..26b2b2e737 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/ooxml/util/XPathHelper.java +++ b/poi-ooxml/src/main/java/org/apache/poi/ooxml/util/XPathHelper.java @@ -24,8 +24,8 @@ import javax.xml.namespace.QName; import javax.xml.xpath.XPathFactory; import com.microsoft.schemas.compatibility.AlternateContentDocument; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.util.Internal; import org.apache.poi.xslf.usermodel.XSLFShape; import org.apache.xmlbeans.XmlCursor; @@ -34,7 +34,7 @@ import org.apache.xmlbeans.XmlObject; import org.apache.xmlbeans.impl.values.XmlAnyTypeImpl; public final class XPathHelper { - private static final Logger LOG = LogManager.getLogger(XPathHelper.class); + private static final Logger LOG = PoiLogManager.getLogger(XPathHelper.class); private static final String OSGI_ERROR = "Schemas (*.xsb) for <CLASS> can't be loaded - usually this happens when OSGI " + diff --git a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/OPCPackage.java b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/OPCPackage.java index d43ccef578..d7680bb616 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/OPCPackage.java +++ b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/OPCPackage.java @@ -42,8 +42,8 @@ import java.util.Optional; import java.util.regex.Matcher; import java.util.regex.Pattern; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.openxml4j.exceptions.InvalidFormatException; import org.apache.poi.openxml4j.exceptions.InvalidOperationException; import org.apache.poi.openxml4j.exceptions.OpenXML4JRuntimeException; @@ -72,7 +72,7 @@ public abstract class OPCPackage implements RelationshipSource, Closeable { /** * Logger. */ - private static final Logger LOG = LogManager.getLogger(OPCPackage.class); + private static final Logger LOG = PoiLogManager.getLogger(OPCPackage.class); /** * Default package access. diff --git a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/PackageRelationshipCollection.java b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/PackageRelationshipCollection.java index 44feeefeb4..e2d3943266 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/PackageRelationshipCollection.java +++ b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/PackageRelationshipCollection.java @@ -21,8 +21,8 @@ import java.net.URI; import java.net.URISyntaxException; import java.util.*; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.openxml4j.exceptions.InvalidFormatException; import org.apache.poi.openxml4j.exceptions.InvalidOperationException; import org.apache.poi.ooxml.util.DocumentHelper; @@ -37,7 +37,7 @@ import org.w3c.dom.NodeList; */ public final class PackageRelationshipCollection implements Iterable<PackageRelationship> { - private static final Logger LOG = LogManager.getLogger(PackageRelationshipCollection.class); + private static final Logger LOG = PoiLogManager.getLogger(PackageRelationshipCollection.class); /** * Package relationships ordered by ID. diff --git a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/PackagingURIHelper.java b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/PackagingURIHelper.java index 6d04232947..bb58523580 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/PackagingURIHelper.java +++ b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/PackagingURIHelper.java @@ -23,8 +23,8 @@ import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.util.regex.Pattern; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.openxml4j.exceptions.InvalidFormatException; import org.apache.poi.openxml4j.exceptions.InvalidOperationException; @@ -37,7 +37,7 @@ public final class PackagingURIHelper { // FIXME: this class implements a lot of path joining and splitting logic that // is already implemented in java.nio.file.Path. // This class should heavily leverage Java library code to reduce the number of lines of code that POI has to maintain and test - private static final Logger LOG = LogManager.getLogger(PackagingURIHelper.class); + private static final Logger LOG = PoiLogManager.getLogger(PackagingURIHelper.class); /** * Package root URI. diff --git a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/ZipPackage.java b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/ZipPackage.java index 7811627c33..e4b58a239b 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/ZipPackage.java +++ b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/ZipPackage.java @@ -34,8 +34,8 @@ import java.util.stream.Collectors; import org.apache.commons.compress.archivers.zip.ZipArchiveEntry; import org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream; import org.apache.commons.compress.archivers.zip.ZipFile; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.logging.log4j.message.SimpleMessage; import org.apache.poi.UnsupportedFileFormatException; import org.apache.poi.openxml4j.exceptions.InvalidFormatException; @@ -63,7 +63,7 @@ public final class ZipPackage extends OPCPackage { private static boolean useTempFilePackageParts = false; private static boolean encryptTempFilePackageParts = false; - private static final Logger LOG = LogManager.getLogger(ZipPackage.class); + private static final Logger LOG = PoiLogManager.getLogger(ZipPackage.class); /** * Zip archive, as either a file on disk, diff --git a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/EncryptedTempFilePackagePart.java b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/EncryptedTempFilePackagePart.java index 1ec18cf584..ee28a3937d 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/EncryptedTempFilePackagePart.java +++ b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/EncryptedTempFilePackagePart.java @@ -17,8 +17,8 @@ package org.apache.poi.openxml4j.opc.internal; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.openxml4j.exceptions.InvalidFormatException; import org.apache.poi.openxml4j.exceptions.OpenXML4JException; import org.apache.poi.openxml4j.opc.OPCPackage; @@ -38,7 +38,7 @@ import java.io.*; */ @Beta public final class EncryptedTempFilePackagePart extends PackagePart { - private static final Logger LOG = LogManager.getLogger(EncryptedTempFilePackagePart.class); + private static final Logger LOG = PoiLogManager.getLogger(EncryptedTempFilePackagePart.class); /** * Storage for the part data. diff --git a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/TempFilePackagePart.java b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/TempFilePackagePart.java index 600851722a..4872599dc1 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/TempFilePackagePart.java +++ b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/TempFilePackagePart.java @@ -17,8 +17,8 @@ package org.apache.poi.openxml4j.opc.internal; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.openxml4j.exceptions.InvalidFormatException; import org.apache.poi.openxml4j.exceptions.OpenXML4JException; import org.apache.poi.openxml4j.opc.OPCPackage; @@ -39,7 +39,7 @@ import java.nio.file.Files; */ @Beta public final class TempFilePackagePart extends PackagePart { - private static final Logger LOG = LogManager.getLogger(TempFilePackagePart.class); + private static final Logger LOG = PoiLogManager.getLogger(TempFilePackagePart.class); /** * Storage for the part data. diff --git a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/ZipContentTypeManager.java b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/ZipContentTypeManager.java index c87d5f061a..52f327fe75 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/ZipContentTypeManager.java +++ b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/ZipContentTypeManager.java @@ -23,8 +23,8 @@ import java.io.OutputStream; import org.apache.commons.compress.archivers.zip.ZipArchiveEntry; import org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.openxml4j.exceptions.InvalidFormatException; import org.apache.poi.openxml4j.opc.OPCPackage; import org.apache.poi.openxml4j.opc.StreamHelper; @@ -37,7 +37,7 @@ import org.w3c.dom.Document; * @see ContentTypeManager */ public class ZipContentTypeManager extends ContentTypeManager { - private static final Logger LOG = LogManager.getLogger(ZipContentTypeManager.class); + private static final Logger LOG = PoiLogManager.getLogger(ZipContentTypeManager.class); /** * Delegate constructor to the super constructor. diff --git a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/marshallers/ZipPartMarshaller.java b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/marshallers/ZipPartMarshaller.java index 61eb8a9b55..4fd41915e2 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/marshallers/ZipPartMarshaller.java +++ b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/marshallers/ZipPartMarshaller.java @@ -25,8 +25,8 @@ import java.util.Objects; import org.apache.commons.compress.archivers.zip.ZipArchiveEntry; import org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.openxml4j.exceptions.OpenXML4JException; import org.apache.poi.openxml4j.opc.PackageNamespaces; import org.apache.poi.openxml4j.opc.PackagePart; @@ -49,7 +49,7 @@ import org.w3c.dom.Element; * Zip part marshaller. This marshaller is use to save any part in a zip stream. */ public final class ZipPartMarshaller implements PartMarshaller { - private static final Logger LOG = LogManager.getLogger(ZipPartMarshaller.class); + private static final Logger LOG = PoiLogManager.getLogger(ZipPartMarshaller.class); /** * Save the specified part to the given stream. diff --git a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/util/ZipArchiveFakeEntry.java b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/util/ZipArchiveFakeEntry.java index f5a5ee5159..a10e43c277 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/util/ZipArchiveFakeEntry.java +++ b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/util/ZipArchiveFakeEntry.java @@ -22,8 +22,8 @@ import java.nio.file.Files; import org.apache.commons.compress.archivers.zip.ZipArchiveEntry; import org.apache.commons.io.input.UnsynchronizedByteArrayInputStream; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.poifs.crypt.temp.EncryptedTempData; import org.apache.poi.util.IOUtils; import org.apache.poi.util.TempFile; @@ -36,7 +36,7 @@ import org.apache.poi.util.TempFile; * @see ZipInputStreamZipEntrySource#setThresholdBytesForTempFiles(int) */ /* package */ class ZipArchiveFakeEntry extends ZipArchiveEntry implements Closeable { - private static final Logger LOG = LogManager.getLogger(ZipArchiveFakeEntry.class); + private static final Logger LOG = PoiLogManager.getLogger(ZipArchiveFakeEntry.class); // how large a single entry in a zip-file should become at max // can be overwritten via IOUtils.setByteArrayMaxOverride() diff --git a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/util/ZipSecureFile.java b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/util/ZipSecureFile.java index f022737f69..b5eb53a1cc 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/util/ZipSecureFile.java +++ b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/util/ZipSecureFile.java @@ -26,8 +26,8 @@ import java.util.Set; import org.apache.commons.compress.archivers.zip.ZipArchiveEntry; import org.apache.commons.compress.archivers.zip.ZipFile; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.openxml4j.opc.internal.InvalidZipException; import org.apache.poi.util.Internal; import org.apache.poi.util.Removal; @@ -42,7 +42,7 @@ import org.apache.poi.util.Removal; */ @Internal public class ZipSecureFile extends ZipFile { - private static final Logger LOG = LogManager.getLogger(ZipSecureFile.class); + private static final Logger LOG = PoiLogManager.getLogger(ZipSecureFile.class); /* package */ static double MIN_INFLATE_RATIO = 0.01d; /* package */ static final long DEFAULT_MAX_ENTRY_SIZE = 0xFFFFFFFFL; /* package */ static final long DEFAULT_MAX_FILE_COUNT = 1000; diff --git a/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/KeyInfoKeySelector.java b/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/KeyInfoKeySelector.java index e7a4eba080..b10cb40e80 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/KeyInfoKeySelector.java +++ b/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/KeyInfoKeySelector.java @@ -38,8 +38,8 @@ import javax.xml.crypto.XMLStructure; import javax.xml.crypto.dsig.keyinfo.KeyInfo; import javax.xml.crypto.dsig.keyinfo.X509Data; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; /** * JSR105 key selector implementation using the ds:KeyInfo data of the signature @@ -47,7 +47,7 @@ import org.apache.logging.log4j.Logger; */ public class KeyInfoKeySelector extends KeySelector implements KeySelectorResult { - private static final Logger LOG = LogManager.getLogger(KeyInfoKeySelector.class); + private static final Logger LOG = PoiLogManager.getLogger(KeyInfoKeySelector.class); private final List<X509Certificate> certChain = new ArrayList<>(); diff --git a/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/OOXMLURIDereferencer.java b/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/OOXMLURIDereferencer.java index 01c05652bd..1a53cd9236 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/OOXMLURIDereferencer.java +++ b/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/OOXMLURIDereferencer.java @@ -38,8 +38,8 @@ import javax.xml.crypto.XMLCryptoContext; import org.apache.commons.io.IOUtils; import org.apache.commons.io.output.UnsynchronizedByteArrayOutputStream; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.openxml4j.exceptions.InvalidFormatException; import org.apache.poi.openxml4j.opc.PackagePart; import org.apache.poi.openxml4j.opc.PackagePartName; @@ -50,7 +50,7 @@ import org.apache.poi.openxml4j.opc.PackagingURIHelper; */ public class OOXMLURIDereferencer implements URIDereferencer { - private static final Logger LOG = LogManager.getLogger(OOXMLURIDereferencer.class); + private static final Logger LOG = PoiLogManager.getLogger(OOXMLURIDereferencer.class); private SignatureInfo signatureInfo; private URIDereferencer baseUriDereferencer; diff --git a/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/SignatureConfig.java b/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/SignatureConfig.java index 2764644812..a36a0b2bbe 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/SignatureConfig.java +++ b/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/SignatureConfig.java @@ -52,8 +52,8 @@ import javax.xml.crypto.dsig.CanonicalizationMethod; import javax.xml.crypto.dsig.DigestMethod; import javax.xml.crypto.dsig.Transform; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.EncryptedDocumentException; import org.apache.poi.hpsf.ClassID; import org.apache.poi.poifs.crypt.HashAlgorithm; @@ -107,7 +107,7 @@ public class SignatureConfig { public static final String SIGNATURE_TIME_FORMAT = "yyyy-MM-dd'T'HH:mm:ss'Z'"; - private static final Logger LOG = LogManager.getLogger(SignatureConfig.class); + private static final Logger LOG = PoiLogManager.getLogger(SignatureConfig.class); private static final String DigestMethod_SHA224 = "http://www.w3.org/2001/04/xmldsig-more#sha224"; private static final String DigestMethod_SHA384 = "http://www.w3.org/2001/04/xmldsig-more#sha384"; private static final String XMLSEC_SANTUARIO = "org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI"; diff --git a/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/SignatureInfo.java b/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/SignatureInfo.java index 0800943a41..a2987a742b 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/SignatureInfo.java +++ b/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/SignatureInfo.java @@ -62,8 +62,8 @@ import javax.xml.crypto.dsig.spec.C14NMethodParameterSpec; import org.apache.jcp.xml.dsig.internal.dom.DOMReference; import org.apache.jcp.xml.dsig.internal.dom.DOMSignedInfo; import org.apache.jcp.xml.dsig.internal.dom.DOMSubTreeData; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.EncryptedDocumentException; import org.apache.poi.ooxml.util.DocumentHelper; import org.apache.poi.openxml4j.exceptions.InvalidFormatException; @@ -161,7 +161,7 @@ import org.w3c.dom.events.MutationEvent; */ public class SignatureInfo { - private static final Logger LOG = LogManager.getLogger(SignatureInfo.class); + private static final Logger LOG = PoiLogManager.getLogger(SignatureInfo.class); private SignatureConfig signatureConfig; private OPCPackage opcPackage; diff --git a/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/SignaturePart.java b/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/SignaturePart.java index 291f34a434..b8991e80b0 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/SignaturePart.java +++ b/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/SignaturePart.java @@ -41,8 +41,8 @@ import javax.xml.xpath.XPath; import javax.xml.xpath.XPathConstants; import javax.xml.xpath.XPathExpressionException; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.EncryptedDocumentException; import org.apache.poi.ooxml.util.DocumentHelper; import org.apache.poi.ooxml.util.XPathHelper; @@ -55,7 +55,7 @@ import org.w3c.dom.NodeList; import org.xml.sax.SAXException; public class SignaturePart { - private static final Logger LOG = LogManager.getLogger(SignaturePart.class); + private static final Logger LOG = PoiLogManager.getLogger(SignaturePart.class); private static final String XMLSEC_VALIDATE_MANIFEST = "org.jcp.xml.dsig.validateManifests"; private static final String XMLSEC_VALIDATE_SECURE = "org.apache.jcp.xml.dsig.secureValidation"; diff --git a/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/facets/KeyInfoSignatureFacet.java b/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/facets/KeyInfoSignatureFacet.java index 43be4656c3..c079b3def5 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/facets/KeyInfoSignatureFacet.java +++ b/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/facets/KeyInfoSignatureFacet.java @@ -40,8 +40,8 @@ import javax.xml.crypto.dsig.keyinfo.KeyValue; import javax.xml.crypto.dsig.keyinfo.X509Data; import org.apache.jcp.xml.dsig.internal.dom.DOMKeyInfo; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.poifs.crypt.dsig.SignatureConfig; import org.apache.poi.poifs.crypt.dsig.SignatureInfo; import org.w3c.dom.Document; @@ -54,7 +54,7 @@ import org.w3c.dom.NodeList; */ public class KeyInfoSignatureFacet implements SignatureFacet { - private static final Logger LOG = LogManager.getLogger(KeyInfoSignatureFacet.class); + private static final Logger LOG = PoiLogManager.getLogger(KeyInfoSignatureFacet.class); @Override public void postSign(SignatureInfo signatureInfo, Document document) diff --git a/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/facets/OOXMLSignatureFacet.java b/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/facets/OOXMLSignatureFacet.java index d573c12eee..d7c6d070bd 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/facets/OOXMLSignatureFacet.java +++ b/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/facets/OOXMLSignatureFacet.java @@ -54,8 +54,8 @@ import javax.xml.crypto.dsig.XMLSignatureFactory; import com.microsoft.schemas.office.x2006.digsig.CTSignatureInfoV1; import com.microsoft.schemas.office.x2006.digsig.SignatureInfoV1Document; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.openxml4j.exceptions.InvalidFormatException; import org.apache.poi.openxml4j.opc.ContentTypes; import org.apache.poi.openxml4j.opc.OPCPackage; @@ -82,7 +82,7 @@ import org.w3c.dom.Element; */ public class OOXMLSignatureFacet implements SignatureFacet { - private static final Logger LOG = LogManager.getLogger(OOXMLSignatureFacet.class); + private static final Logger LOG = PoiLogManager.getLogger(OOXMLSignatureFacet.class); private static final String ID_PACKAGE_OBJECT = "idPackageObject"; @Override diff --git a/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/facets/XAdESSignatureFacet.java b/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/facets/XAdESSignatureFacet.java index f69bb33e1e..79fb4fc096 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/facets/XAdESSignatureFacet.java +++ b/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/facets/XAdESSignatureFacet.java @@ -49,8 +49,8 @@ import javax.xml.crypto.dsig.XMLObject; import javax.xml.crypto.dsig.XMLSignatureException; import javax.xml.namespace.QName; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.poifs.crypt.CryptoFunctions; import org.apache.poi.poifs.crypt.HashAlgorithm; import org.apache.poi.poifs.crypt.dsig.SignatureConfig; @@ -94,7 +94,7 @@ import org.w3c.dom.Element; */ public class XAdESSignatureFacet implements SignatureFacet { - private static final Logger LOG = LogManager.getLogger(XAdESSignatureFacet.class); + private static final Logger LOG = PoiLogManager.getLogger(XAdESSignatureFacet.class); private static final String XADES_TYPE = "http://uri.etsi.org/01903#SignedProperties"; diff --git a/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/facets/XAdESXLSignatureFacet.java b/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/facets/XAdESXLSignatureFacet.java index b3c849f4a5..bfa674f254 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/facets/XAdESXLSignatureFacet.java +++ b/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/facets/XAdESXLSignatureFacet.java @@ -46,8 +46,8 @@ import javax.xml.crypto.MarshalException; import org.apache.commons.io.input.UnsynchronizedByteArrayInputStream; import org.apache.commons.io.output.UnsynchronizedByteArrayOutputStream; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.poifs.crypt.dsig.SignatureConfig; import org.apache.poi.poifs.crypt.dsig.SignatureInfo; import org.apache.poi.poifs.crypt.dsig.services.RevocationData; @@ -86,7 +86,7 @@ import org.w3c.dom.NodeList; */ public class XAdESXLSignatureFacet implements SignatureFacet { - private static final Logger LOG = LogManager.getLogger(XAdESXLSignatureFacet.class); + private static final Logger LOG = PoiLogManager.getLogger(XAdESXLSignatureFacet.class); private final CertificateFactory certificateFactory; diff --git a/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/services/RelationshipTransformService.java b/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/services/RelationshipTransformService.java index 2bb1c6a4d0..6d03c2d9fa 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/services/RelationshipTransformService.java +++ b/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/services/RelationshipTransformService.java @@ -50,8 +50,8 @@ import javax.xml.crypto.dsig.TransformService; import javax.xml.crypto.dsig.spec.TransformParameterSpec; import org.apache.jcp.xml.dsig.internal.dom.ApacheNodeSetData; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.ooxml.util.DocumentHelper; import org.apache.poi.util.SuppressForbidden; import org.apache.xml.security.signature.XMLSignatureInput; @@ -78,7 +78,7 @@ public class RelationshipTransformService extends TransformService { private final List<String> sourceIds; - private static final Logger LOG = LogManager.getLogger(RelationshipTransformService.class); + private static final Logger LOG = PoiLogManager.getLogger(RelationshipTransformService.class); /** * Relationship Transform parameter specification class. diff --git a/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/services/TSPTimeStampService.java b/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/services/TSPTimeStampService.java index e429c22d22..3e23a4985e 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/services/TSPTimeStampService.java +++ b/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/services/TSPTimeStampService.java @@ -45,8 +45,8 @@ import java.util.stream.Stream; import javax.security.auth.x500.X500Principal; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.poifs.crypt.CryptoFunctions; import org.apache.poi.poifs.crypt.HashAlgorithm; import org.apache.poi.poifs.crypt.dsig.SignatureConfig; @@ -86,7 +86,7 @@ import org.bouncycastle.tsp.TimeStampToken; */ public class TSPTimeStampService implements TimeStampService { - private static final Logger LOG = LogManager.getLogger(TSPTimeStampService.class); + private static final Logger LOG = PoiLogManager.getLogger(TSPTimeStampService.class); /** * Maps the digest algorithm to corresponding OID value. diff --git a/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/services/TimeStampSimpleHttpClient.java b/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/services/TimeStampSimpleHttpClient.java index f112f48d98..f7e3b9aeb1 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/services/TimeStampSimpleHttpClient.java +++ b/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/dsig/services/TimeStampSimpleHttpClient.java @@ -37,8 +37,8 @@ import javax.net.ssl.SSLContext; import javax.net.ssl.TrustManager; import javax.net.ssl.X509TrustManager; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.poifs.crypt.dsig.SignatureConfig; import org.apache.poi.util.IOUtils; import org.apache.poi.util.RandomSingleton; @@ -54,7 +54,7 @@ public class TimeStampSimpleHttpClient implements TimeStampHttpClient { protected static final String BASIC_AUTH = "Authorization"; protected static final String REDIRECT_LOCATION = "Location"; - private static final Logger LOG = LogManager.getLogger(TimeStampSimpleHttpClient.class); + private static final Logger LOG = PoiLogManager.getLogger(TimeStampSimpleHttpClient.class); // how large a timestamp response is expected to be // can be overwritten via IOUtils.setByteArrayMaxOverride() diff --git a/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/temp/AesZipFileZipEntrySource.java b/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/temp/AesZipFileZipEntrySource.java index 2969bbf581..f9d5b6fd2f 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/temp/AesZipFileZipEntrySource.java +++ b/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/temp/AesZipFileZipEntrySource.java @@ -36,8 +36,8 @@ import org.apache.commons.compress.archivers.zip.ZipArchiveInputStream; import org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream; import org.apache.commons.compress.archivers.zip.ZipFile; import org.apache.commons.io.output.CloseShieldOutputStream; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.openxml4j.util.ZipEntrySource; import org.apache.poi.poifs.crypt.ChainingMode; import org.apache.poi.poifs.crypt.CipherAlgorithm; @@ -53,7 +53,7 @@ import org.apache.poi.util.TempFile; */ @Beta public final class AesZipFileZipEntrySource implements ZipEntrySource { - private static final Logger LOG = LogManager.getLogger(AesZipFileZipEntrySource.class); + private static final Logger LOG = PoiLogManager.getLogger(AesZipFileZipEntrySource.class); private static final String PADDING = "PKCS5Padding"; diff --git a/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/temp/EncryptedTempData.java b/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/temp/EncryptedTempData.java index d5cc96585d..5f50ee88a3 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/temp/EncryptedTempData.java +++ b/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/temp/EncryptedTempData.java @@ -31,8 +31,8 @@ import javax.crypto.CipherOutputStream; import javax.crypto.spec.SecretKeySpec; import org.apache.commons.io.output.CountingOutputStream; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.poifs.crypt.ChainingMode; import org.apache.poi.poifs.crypt.CipherAlgorithm; import org.apache.poi.poifs.crypt.CryptoFunctions; @@ -46,7 +46,7 @@ import org.apache.poi.util.TempFile; @Beta public class EncryptedTempData { - private static final Logger LOG = LogManager.getLogger(EncryptedTempData.class); + private static final Logger LOG = PoiLogManager.getLogger(EncryptedTempData.class); private static final CipherAlgorithm cipherAlgorithm = CipherAlgorithm.aes128; private static final String PADDING = "PKCS5Padding"; private final SecretKeySpec skeySpec; diff --git a/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/temp/SXSSFWorkbookWithCustomZipEntrySource.java b/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/temp/SXSSFWorkbookWithCustomZipEntrySource.java index d660241915..eef30b44d7 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/temp/SXSSFWorkbookWithCustomZipEntrySource.java +++ b/poi-ooxml/src/main/java/org/apache/poi/poifs/crypt/temp/SXSSFWorkbookWithCustomZipEntrySource.java @@ -23,8 +23,8 @@ import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.openxml4j.util.ZipEntrySource; import org.apache.poi.util.Beta; import org.apache.poi.util.IOUtils; @@ -35,7 +35,7 @@ import static org.apache.logging.log4j.util.Unbox.box; @Beta public class SXSSFWorkbookWithCustomZipEntrySource extends SXSSFWorkbook { - private static final Logger LOG = LogManager.getLogger(SXSSFWorkbookWithCustomZipEntrySource.class); + private static final Logger LOG = PoiLogManager.getLogger(SXSSFWorkbookWithCustomZipEntrySource.class); public SXSSFWorkbookWithCustomZipEntrySource() { super(20); diff --git a/poi-ooxml/src/main/java/org/apache/poi/xddf/usermodel/chart/XDDFChartData.java b/poi-ooxml/src/main/java/org/apache/poi/xddf/usermodel/chart/XDDFChartData.java index ae2ae1c12c..1dc47d47a4 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xddf/usermodel/chart/XDDFChartData.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xddf/usermodel/chart/XDDFChartData.java @@ -23,8 +23,8 @@ import java.util.List; import java.util.Locale; import java.util.Map; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.ss.util.CellReference; import org.apache.poi.util.Beta; import org.apache.poi.util.Internal; @@ -47,7 +47,7 @@ import org.openxmlformats.schemas.drawingml.x2006.chart.CTUnsignedInt; */ @Beta public abstract class XDDFChartData { - private static final Logger LOGGER = LogManager.getLogger(XDDFChartData.class); + private static final Logger LOGGER = PoiLogManager.getLogger(XDDFChartData.class); protected XDDFChart parent; protected List<Series> series; diff --git a/poi-ooxml/src/main/java/org/apache/poi/xslf/draw/SVGUserAgent.java b/poi-ooxml/src/main/java/org/apache/poi/xslf/draw/SVGUserAgent.java index 3b6034198e..4fb1f6cde1 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xslf/draw/SVGUserAgent.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xslf/draw/SVGUserAgent.java @@ -27,8 +27,8 @@ import org.apache.batik.parser.LengthHandler; import org.apache.batik.parser.LengthParser; import org.apache.batik.parser.ParseException; import org.apache.batik.util.SVGConstants; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.util.Dimension2DDouble; import org.apache.poi.util.Internal; import org.w3c.dom.svg.SVGDocument; @@ -39,7 +39,7 @@ import org.w3c.dom.svg.SVGSVGElement; */ @Internal public class SVGUserAgent extends UserAgentAdapter { - private static final Logger LOG = LogManager.getLogger(SVGUserAgent.class); + private static final Logger LOG = PoiLogManager.getLogger(SVGUserAgent.class); private Rectangle2D viewbox; public SVGUserAgent() { diff --git a/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XMLSlideShow.java b/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XMLSlideShow.java index e1178470a4..3f7e0df090 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XMLSlideShow.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XMLSlideShow.java @@ -35,8 +35,8 @@ import java.util.OptionalLong; import java.util.regex.Pattern; import java.util.stream.Stream; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.ooxml.POIXMLDocument; import org.apache.poi.ooxml.POIXMLDocumentPart; import org.apache.poi.ooxml.POIXMLException; @@ -74,7 +74,7 @@ import org.openxmlformats.schemas.presentationml.x2006.main.PresentationDocument @Beta public class XMLSlideShow extends POIXMLDocument implements SlideShow<XSLFShape, XSLFTextParagraph> { - private static final Logger LOG = LogManager.getLogger(XMLSlideShow.class); + private static final Logger LOG = PoiLogManager.getLogger(XMLSlideShow.class); //arbitrarily selected; may need to increase private static final int DEFAULT_MAX_RECORD_LENGTH = 1_000_000; private static int MAX_RECORD_LENGTH = DEFAULT_MAX_RECORD_LENGTH; diff --git a/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFColor.java b/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFColor.java index 796a072b9f..b19fdd0c47 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFColor.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFColor.java @@ -22,8 +22,8 @@ import java.awt.Color; import javax.xml.namespace.QName; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.ooxml.util.POIXMLUnits; import org.apache.poi.sl.draw.DrawPaint; import org.apache.poi.sl.usermodel.AbstractColorStyle; @@ -50,7 +50,7 @@ import org.openxmlformats.schemas.drawingml.x2006.main.CTSystemColor; @Beta @Internal public class XSLFColor { - private static final Logger LOGGER = LogManager.getLogger(XSLFColor.class); + private static final Logger LOGGER = PoiLogManager.getLogger(XSLFColor.class); private static final QName VAL_ATTR = new QName("val"); private final XmlObject _xmlObject; diff --git a/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFFreeformShape.java b/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFFreeformShape.java index 102cd4f785..5757250f7a 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFFreeformShape.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFFreeformShape.java @@ -24,8 +24,8 @@ import java.awt.geom.Path2D; import java.awt.geom.PathIterator; import java.awt.geom.Rectangle2D; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.ooxml.util.POIXMLUnits; import org.apache.poi.sl.draw.geom.CustomGeometry; import org.apache.poi.sl.usermodel.FreeformShape; @@ -57,7 +57,7 @@ import org.openxmlformats.schemas.presentationml.x2006.main.CTShapeNonVisual; public class XSLFFreeformShape extends XSLFAutoShape implements FreeformShape<XSLFShape,XSLFTextParagraph> { - private static final Logger LOG = LogManager.getLogger(XSLFFreeformShape.class); + private static final Logger LOG = PoiLogManager.getLogger(XSLFFreeformShape.class); /*package*/ XSLFFreeformShape(CTShape shape, XSLFSheet sheet) { super(shape, sheet); diff --git a/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFGraphicFrame.java b/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFGraphicFrame.java index 746afd001e..b554cdd6a9 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFGraphicFrame.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFGraphicFrame.java @@ -27,8 +27,8 @@ import java.io.IOException; import javax.xml.namespace.QName; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.ooxml.POIXMLException; import org.apache.poi.ooxml.util.POIXMLUnits; import org.apache.poi.openxml4j.exceptions.InvalidFormatException; @@ -55,7 +55,7 @@ import org.openxmlformats.schemas.presentationml.x2006.main.CTGroupShape; @Beta public class XSLFGraphicFrame extends XSLFShape implements GraphicalFrame<XSLFShape, XSLFTextParagraph> { private static final String DRAWINGML_CHART_URI = "http://schemas.openxmlformats.org/drawingml/2006/chart"; - private static final Logger LOG = LogManager.getLogger(XSLFGraphicFrame.class); + private static final Logger LOG = PoiLogManager.getLogger(XSLFGraphicFrame.class); /*package*/ XSLFGraphicFrame(CTGraphicalObjectFrame shape, XSLFSheet sheet){ super(shape,sheet); diff --git a/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFGroupShape.java b/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFGroupShape.java index 34e9e5a624..d01408d717 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFGroupShape.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFGroupShape.java @@ -25,8 +25,8 @@ import java.util.ArrayList; import java.util.Iterator; import java.util.List; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.ooxml.POIXMLDocumentPart.RelationPart; import org.apache.poi.ooxml.util.POIXMLUnits; import org.apache.poi.sl.draw.DrawPictureShape; @@ -55,7 +55,7 @@ import org.openxmlformats.schemas.presentationml.x2006.main.CTShape; @Beta public class XSLFGroupShape extends XSLFShape implements XSLFShapeContainer, GroupShape<XSLFShape,XSLFTextParagraph> { - private static final Logger LOG = LogManager.getLogger(XSLFGroupShape.class); + private static final Logger LOG = PoiLogManager.getLogger(XSLFGroupShape.class); private final List<XSLFShape> _shapes; private final CTGroupShapeProperties _grpSpPr; diff --git a/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFPictureShape.java b/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFPictureShape.java index 18a83f6273..4cb437c5f1 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFPictureShape.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFPictureShape.java @@ -34,8 +34,8 @@ import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamReader; import org.apache.commons.io.output.UnsynchronizedByteArrayOutputStream; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.ooxml.util.POIXMLUnits; import org.apache.poi.ooxml.util.XPathHelper; import org.apache.poi.openxml4j.opc.PackagePart; @@ -69,7 +69,7 @@ import org.openxmlformats.schemas.presentationml.x2006.main.CTPictureNonVisual; @Beta public class XSLFPictureShape extends XSLFSimpleShape implements PictureShape<XSLFShape,XSLFTextParagraph> { - private static final Logger LOG = LogManager.getLogger(XSLFPictureShape.class); + private static final Logger LOG = PoiLogManager.getLogger(XSLFPictureShape.class); private static final String MS_DML_NS = "http://schemas.microsoft.com/office/drawing/2010/main"; private static final String MS_SVG_NS = "http://schemas.microsoft.com/office/drawing/2016/SVG/main"; diff --git a/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFPropertiesDelegate.java b/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFPropertiesDelegate.java index cf188e3367..9faba886eb 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFPropertiesDelegate.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFPropertiesDelegate.java @@ -17,8 +17,8 @@ package org.apache.poi.xslf.usermodel; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.util.Internal; import org.apache.xmlbeans.XmlCursor; import org.apache.xmlbeans.XmlObject; @@ -50,7 +50,7 @@ import org.openxmlformats.schemas.presentationml.x2006.main.CTBackgroundProperti */ @Internal /* package */ class XSLFPropertiesDelegate { - private static final Logger LOG = LogManager.getLogger(XSLFPropertiesDelegate.class); + private static final Logger LOG = PoiLogManager.getLogger(XSLFPropertiesDelegate.class); public static XSLFFillProperties getFillDelegate(XmlObject props) { diff --git a/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFSheet.java b/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFSheet.java index ef1891da2c..37c853b83e 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFSheet.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFSheet.java @@ -34,8 +34,8 @@ import java.util.Map; import javax.xml.namespace.QName; import com.zaxxer.sparsebits.SparseBitSet; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.ooxml.POIXMLDocumentPart; import org.apache.poi.ooxml.POIXMLException; import org.apache.poi.openxml4j.opc.OPCPackage; @@ -75,7 +75,7 @@ import org.openxmlformats.schemas.presentationml.x2006.main.CTShape; @Beta public abstract class XSLFSheet extends POIXMLDocumentPart implements XSLFShapeContainer, Sheet<XSLFShape,XSLFTextParagraph> { - private static final Logger LOG = LogManager.getLogger(XSLFSheet.class); + private static final Logger LOG = PoiLogManager.getLogger(XSLFSheet.class); private XSLFDrawing _drawing; private List<XSLFShape> _shapes; diff --git a/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFSimpleShape.java b/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFSimpleShape.java index 16c32e1c6d..4d3c78b933 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFSimpleShape.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFSimpleShape.java @@ -22,8 +22,8 @@ package org.apache.poi.xslf.usermodel; import java.awt.Color; import java.awt.geom.Rectangle2D; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.ooxml.util.POIXMLUnits; import org.apache.poi.openxml4j.opc.PackagePart; import org.apache.poi.sl.draw.DrawPaint; @@ -59,7 +59,7 @@ import org.openxmlformats.schemas.drawingml.x2006.main.*; public abstract class XSLFSimpleShape extends XSLFShape implements SimpleShape<XSLFShape,XSLFTextParagraph> { private static final CTOuterShadowEffect NO_SHADOW = CTOuterShadowEffect.Factory.newInstance(); - private static final Logger LOG = LogManager.getLogger(XSLFSimpleShape.class); + private static final Logger LOG = PoiLogManager.getLogger(XSLFSimpleShape.class); /* package */XSLFSimpleShape(XmlObject shape, XSLFSheet sheet) { super(shape,sheet); diff --git a/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFTable.java b/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFTable.java index 4954fe3f60..3434788c24 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFTable.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFTable.java @@ -27,8 +27,8 @@ import java.util.List; import javax.xml.namespace.QName; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.ooxml.util.POIXMLUnits; import org.apache.poi.sl.draw.DrawFactory; import org.apache.poi.sl.draw.DrawTableShape; @@ -54,7 +54,7 @@ import org.openxmlformats.schemas.presentationml.x2006.main.CTGraphicalObjectFra public class XSLFTable extends XSLFGraphicFrame implements Iterable<XSLFTableRow>, TableShape<XSLFShape,XSLFTextParagraph> { /* package */ static final String TABLE_URI = "http://schemas.openxmlformats.org/drawingml/2006/table"; - private static final Logger LOG = LogManager.getLogger(XSLFTable.class); + private static final Logger LOG = PoiLogManager.getLogger(XSLFTable.class); private final CTTable _table; private final List<XSLFTableRow> _rows; diff --git a/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFTextRun.java b/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFTextRun.java index c9f3cfd0c0..1fa3a60cd5 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFTextRun.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xslf/usermodel/XSLFTextRun.java @@ -19,8 +19,8 @@ package org.apache.poi.xslf.usermodel; import java.awt.Color; import java.util.function.Consumer; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.common.usermodel.fonts.FontCharset; import org.apache.poi.common.usermodel.fonts.FontFamily; import org.apache.poi.common.usermodel.fonts.FontGroup; @@ -66,7 +66,7 @@ import org.openxmlformats.schemas.drawingml.x2006.main.impl.CTSRgbColorImpl; */ @Beta public class XSLFTextRun implements TextRun, HighlightColorSupport { - private static final Logger LOG = LogManager.getLogger(XSLFTextRun.class); + private static final Logger LOG = PoiLogManager.getLogger(XSLFTextRun.class); private final XmlObject _r; private final XSLFTextParagraph _p; diff --git a/poi-ooxml/src/main/java/org/apache/poi/xslf/util/PPTX2PNG.java b/poi-ooxml/src/main/java/org/apache/poi/xslf/util/PPTX2PNG.java index 0dcbf813f5..ecd3757de8 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xslf/util/PPTX2PNG.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xslf/util/PPTX2PNG.java @@ -36,8 +36,8 @@ import java.util.Set; import java.util.regex.Pattern; import java.util.stream.Collectors; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.common.usermodel.GenericRecord; import org.apache.poi.poifs.filesystem.FileMagic; import org.apache.poi.sl.draw.Drawable; @@ -50,7 +50,7 @@ import org.apache.poi.util.LocaleUtil; * An utility to convert slides of a .pptx slide show to a PNG image */ public final class PPTX2PNG { - private static final Logger LOG = LogManager.getLogger(PPTX2PNG.class); + private static final Logger LOG = PoiLogManager.getLogger(PPTX2PNG.class); private static final String INPUT_PAT_REGEX = "(?<slideno>[^|]+)\\|(?<format>[^|]+)\\|(?<basename>.+)\\.(?<ext>[^.]++)"; diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/eventusermodel/XSSFBReader.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/eventusermodel/XSSFBReader.java index 2ec15c4a32..f3f2b1cfc3 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/eventusermodel/XSSFBReader.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/eventusermodel/XSSFBReader.java @@ -28,8 +28,8 @@ import java.util.List; import java.util.Set; import com.zaxxer.sparsebits.SparseBitSet; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.openxml4j.exceptions.InvalidFormatException; import org.apache.poi.openxml4j.exceptions.OpenXML4JException; import org.apache.poi.openxml4j.opc.OPCPackage; @@ -58,7 +58,7 @@ import org.apache.poi.xssf.usermodel.XSSFRelation; */ public class XSSFBReader extends XSSFReader { - private static final Logger LOGGER = LogManager.getLogger(XSSFBReader.class); + private static final Logger LOGGER = PoiLogManager.getLogger(XSSFBReader.class); private static final Set<String> WORKSHEET_RELS = Collections.unmodifiableSet(new HashSet<>( Arrays.asList( diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/eventusermodel/XSSFReader.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/eventusermodel/XSSFReader.java index a81bb59bfe..0910795230 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/eventusermodel/XSSFReader.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/eventusermodel/XSSFReader.java @@ -31,8 +31,8 @@ import java.util.Set; import javax.xml.parsers.ParserConfigurationException; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.ooxml.POIXMLException; import org.apache.poi.openxml4j.exceptions.InvalidFormatException; import org.apache.poi.openxml4j.exceptions.OpenXML4JException; @@ -70,7 +70,7 @@ public class XSSFReader { XSSFRelation.CHARTSHEET.getRelation(), XSSFRelation.MACRO_SHEET_XML.getRelation()) )); - private static final Logger LOGGER = LogManager.getLogger(XSSFReader.class); + private static final Logger LOGGER = PoiLogManager.getLogger(XSSFReader.class); protected OPCPackage pkg; protected PackagePart workbookPart; diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/eventusermodel/XSSFSheetXMLHandler.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/eventusermodel/XSSFSheetXMLHandler.java index ec6d1a0872..5e9a58f511 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/eventusermodel/XSSFSheetXMLHandler.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/eventusermodel/XSSFSheetXMLHandler.java @@ -22,8 +22,8 @@ import java.util.Iterator; import java.util.LinkedList; import java.util.Queue; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.ss.usermodel.BuiltinFormats; import org.apache.poi.ss.usermodel.DataFormatter; import org.apache.poi.ss.usermodel.RichTextString; @@ -48,7 +48,7 @@ import org.xml.sax.helpers.DefaultHandler; * you need to implement for reading information from a file. */ public class XSSFSheetXMLHandler extends DefaultHandler { - private static final Logger LOG = LogManager.getLogger(XSSFSheetXMLHandler.class); + private static final Logger LOG = PoiLogManager.getLogger(XSSFSheetXMLHandler.class); /** * These are the different kinds of cells we support. diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/extractor/XSSFBEventBasedExcelExtractor.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/extractor/XSSFBEventBasedExcelExtractor.java index 238a533868..ba60163b8e 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/extractor/XSSFBEventBasedExcelExtractor.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/extractor/XSSFBEventBasedExcelExtractor.java @@ -21,8 +21,8 @@ import java.io.InputStream; import java.util.Collections; import java.util.List; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.openxml4j.exceptions.OpenXML4JException; import org.apache.poi.openxml4j.opc.OPCPackage; import org.apache.poi.ss.usermodel.DataFormatter; @@ -46,7 +46,7 @@ import org.xml.sax.SAXException; */ public class XSSFBEventBasedExcelExtractor extends XSSFEventBasedExcelExtractor { - private static final Logger LOGGER = LogManager.getLogger(XSSFBEventBasedExcelExtractor.class); + private static final Logger LOGGER = PoiLogManager.getLogger(XSSFBEventBasedExcelExtractor.class); public static final List<XSSFRelation> SUPPORTED_TYPES = Collections.singletonList( XSSFRelation.XLSB_BINARY_WORKBOOK diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/extractor/XSSFEventBasedExcelExtractor.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/extractor/XSSFEventBasedExcelExtractor.java index c79024e3b4..2cf729307f 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/extractor/XSSFEventBasedExcelExtractor.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/extractor/XSSFEventBasedExcelExtractor.java @@ -25,8 +25,8 @@ import java.util.Map; import javax.xml.parsers.ParserConfigurationException; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.ooxml.POIXMLDocument; import org.apache.poi.ooxml.POIXMLProperties; import org.apache.poi.ooxml.POIXMLProperties.CoreProperties; @@ -63,7 +63,7 @@ import org.xml.sax.XMLReader; public class XSSFEventBasedExcelExtractor implements POIXMLTextExtractor, ExcelExtractor { - private static final Logger LOGGER = LogManager.getLogger(XSSFEventBasedExcelExtractor.class); + private static final Logger LOGGER = PoiLogManager.getLogger(XSSFEventBasedExcelExtractor.class); protected final OPCPackage container; protected final POIXMLProperties properties; diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/extractor/XSSFExportToXml.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/extractor/XSSFExportToXml.java index f893c8b61a..65d0f6c3d5 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/extractor/XSSFExportToXml.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/extractor/XSSFExportToXml.java @@ -38,8 +38,8 @@ import javax.xml.validation.Schema; import javax.xml.validation.SchemaFactory; import javax.xml.validation.Validator; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.ooxml.util.DocumentHelper; import org.apache.poi.ss.usermodel.CellType; import org.apache.poi.ss.usermodel.DateUtil; @@ -79,7 +79,7 @@ import org.xml.sax.SAXException; * </ul> */ public class XSSFExportToXml implements Comparator<String>{ - private static final Logger LOG = LogManager.getLogger(XSSFExportToXml.class); + private static final Logger LOG = PoiLogManager.getLogger(XSSFExportToXml.class); @FunctionalInterface diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/extractor/XSSFImportFromXML.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/extractor/XSSFImportFromXML.java index 289b08dda6..aee3afa186 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/extractor/XSSFImportFromXML.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/extractor/XSSFImportFromXML.java @@ -35,8 +35,8 @@ import javax.xml.xpath.XPath; import javax.xml.xpath.XPathConstants; import javax.xml.xpath.XPathExpressionException; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.ooxml.util.DocumentHelper; import org.apache.poi.ooxml.util.XPathHelper; import org.apache.poi.ss.usermodel.DateUtil; @@ -72,7 +72,7 @@ public class XSSFImportFromXML { private final XSSFMap _map; - private static final Logger LOG = LogManager.getLogger(XSSFImportFromXML.class); + private static final Logger LOG = PoiLogManager.getLogger(XSSFImportFromXML.class); public XSSFImportFromXML(XSSFMap map) { _map = map; diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/DeferredSXSSFWorkbook.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/DeferredSXSSFWorkbook.java index 37186f876d..5844eb9800 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/DeferredSXSSFWorkbook.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/DeferredSXSSFWorkbook.java @@ -21,8 +21,8 @@ import java.io.IOException; import java.io.OutputStream; import java.util.Iterator; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.ss.usermodel.Sheet; import org.apache.poi.util.Beta; import org.apache.poi.util.NotImplemented; @@ -39,7 +39,7 @@ import org.apache.poi.xssf.usermodel.XSSFWorkbook; */ @Beta public class DeferredSXSSFWorkbook extends SXSSFWorkbook { - private static final Logger LOG = LogManager.getLogger(DeferredSXSSFWorkbook.class); + private static final Logger LOG = PoiLogManager.getLogger(DeferredSXSSFWorkbook.class); public DeferredSXSSFWorkbook() { this(null); diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFFormulaEvaluator.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFFormulaEvaluator.java index ff9ae7b159..40b9dc4375 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFFormulaEvaluator.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFFormulaEvaluator.java @@ -17,8 +17,8 @@ package org.apache.poi.xssf.streaming; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.ss.formula.EvaluationCell; import org.apache.poi.ss.formula.IStabilityClassifier; import org.apache.poi.ss.formula.WorkbookEvaluator; @@ -36,7 +36,7 @@ import static org.apache.logging.log4j.util.Unbox.box; * lookup cells within the current Window. */ public final class SXSSFFormulaEvaluator extends BaseXSSFFormulaEvaluator { - private static final Logger LOG = LogManager.getLogger(SXSSFFormulaEvaluator.class); + private static final Logger LOG = PoiLogManager.getLogger(SXSSFFormulaEvaluator.class); private final SXSSFWorkbook wb; diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFPicture.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFPicture.java index 7f39c1b1cd..19117ec60f 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFPicture.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFPicture.java @@ -21,8 +21,8 @@ import java.awt.Dimension; import java.io.IOException; import java.io.InputStream; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.openxml4j.opc.PackagePart; import org.apache.poi.ss.usermodel.Picture; import org.apache.poi.ss.usermodel.Row; @@ -51,7 +51,7 @@ import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTCol; * The main change is to access the rows in the SXSSF sheet, not the always empty rows in the XSSF sheet when checking the row heights. */ public final class SXSSFPicture implements Picture { - private static final Logger LOG = LogManager.getLogger(SXSSFPicture.class); + private static final Logger LOG = PoiLogManager.getLogger(SXSSFPicture.class); /** * Column width measured as the number of characters of the maximum digit width of the * numbers 0, 1, 2, ..., 9 as rendered in the normal style's font. There are 4 pixels of margin diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFSheet.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFSheet.java index b177d8b0ca..08b7fb9c45 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFSheet.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFSheet.java @@ -21,8 +21,8 @@ import java.io.IOException; import java.io.InputStream; import java.util.*; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.ss.SpreadsheetVersion; import org.apache.poi.ss.usermodel.*; import org.apache.poi.ss.util.CellAddress; @@ -43,7 +43,7 @@ import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTWorksheet; * Streaming version of XSSFSheet implementing the "BigGridDemo" strategy. */ public class SXSSFSheet implements Sheet, OoxmlSheetExtensions { - private static final Logger LOG = LogManager.getLogger(SXSSFSheet.class); + private static final Logger LOG = PoiLogManager.getLogger(SXSSFSheet.class); /*package*/ final XSSFSheet _sh; protected final SXSSFWorkbook _workbook; diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFWorkbook.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFWorkbook.java index d4f8b7f817..aac908d299 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFWorkbook.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SXSSFWorkbook.java @@ -40,8 +40,8 @@ import org.apache.commons.compress.archivers.zip.ZipArchiveEntry; import org.apache.commons.compress.archivers.zip.ZipArchiveInputStream; import org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream; import org.apache.commons.io.output.UnsynchronizedByteArrayOutputStream; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.openxml4j.opc.OPCPackage; import org.apache.poi.openxml4j.util.ZipArchiveThresholdInputStream; import org.apache.poi.openxml4j.util.ZipEntrySource; @@ -113,7 +113,7 @@ public class SXSSFWorkbook implements Workbook { * via {@link SXSSFSheet#getRow} anymore. */ public static final int DEFAULT_WINDOW_SIZE = 100; - private static final Logger LOG = LogManager.getLogger(SXSSFWorkbook.class); + private static final Logger LOG = PoiLogManager.getLogger(SXSSFWorkbook.class); protected final XSSFWorkbook _wb; diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SheetDataWriter.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SheetDataWriter.java index 471b38dbef..1017686091 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SheetDataWriter.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SheetDataWriter.java @@ -33,8 +33,8 @@ import java.nio.charset.StandardCharsets; import java.util.Iterator; import java.util.PrimitiveIterator; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.ss.usermodel.Cell; import org.apache.poi.ss.usermodel.CellStyle; import org.apache.poi.ss.usermodel.CellType; @@ -54,7 +54,7 @@ import org.openxmlformats.schemas.spreadsheetml.x2006.main.STCellType; * so that it was renamed to "SheetDataWriter" */ public class SheetDataWriter implements Closeable { - private static final Logger LOG = LogManager.getLogger(SheetDataWriter.class); + private static final Logger LOG = PoiLogManager.getLogger(SheetDataWriter.class); private final File _fd; protected final Writer _out; diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/StreamingSheetWriter.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/StreamingSheetWriter.java index 91b7b95f86..382eb114dd 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/StreamingSheetWriter.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/StreamingSheetWriter.java @@ -26,8 +26,8 @@ import java.io.OutputStreamWriter; import java.io.Writer; import java.nio.charset.StandardCharsets; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.util.Beta; /** @@ -37,7 +37,7 @@ import org.apache.poi.util.Beta; */ @Beta public class StreamingSheetWriter extends SheetDataWriter { - private static final Logger LOG = LogManager.getLogger(StreamingSheetWriter.class); + private static final Logger LOG = PoiLogManager.getLogger(StreamingSheetWriter.class); private boolean closed = false; public StreamingSheetWriter() throws IOException { diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFDrawing.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFDrawing.java index 7d75ddf394..12f3fc711a 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFDrawing.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFDrawing.java @@ -29,8 +29,8 @@ import java.util.Spliterator; import javax.xml.namespace.QName; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.ooxml.POIXMLDocumentPart; import org.apache.poi.ooxml.POIXMLException; import org.apache.poi.openxml4j.exceptions.InvalidFormatException; @@ -77,7 +77,7 @@ import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTWorksheet; * Represents a SpreadsheetML drawing */ public final class XSSFDrawing extends POIXMLDocumentPart implements Drawing<XSSFShape> { - private static final Logger LOG = LogManager.getLogger(XSSFDrawing.class); + private static final Logger LOG = PoiLogManager.getLogger(XSSFDrawing.class); /** * Root element of the SpreadsheetML Drawing part diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFObjectData.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFObjectData.java index 824050b728..270ecfa65c 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFObjectData.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFObjectData.java @@ -22,8 +22,8 @@ import java.io.InputStream; import javax.xml.namespace.QName; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.ooxml.POIXMLDocumentPart; import org.apache.poi.ooxml.POIXMLException; import org.apache.poi.openxml4j.opc.PackagePart; @@ -51,7 +51,7 @@ import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTOleObject; * Represents binary object (i.e. OLE) data stored in the file. Eg. A GIF, JPEG etc... */ public class XSSFObjectData extends XSSFSimpleShape implements ObjectData { - private static final Logger LOG = LogManager.getLogger(XSSFObjectData.class); + private static final Logger LOG = PoiLogManager.getLogger(XSSFObjectData.class); /** * A default instance of CTShape used for creating new shapes. diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFPicture.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFPicture.java index 9a3c4056f3..fe59d4c6b6 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFPicture.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFPicture.java @@ -21,8 +21,8 @@ import java.awt.Dimension; import java.io.IOException; import java.io.InputStream; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.openxml4j.opc.PackagePart; import org.apache.poi.openxml4j.opc.PackageRelationship; import org.apache.poi.ss.usermodel.Picture; @@ -45,7 +45,7 @@ import org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTPictureNo * Represents a picture shape in a SpreadsheetML drawing. */ public final class XSSFPicture extends XSSFShape implements Picture { - private static final Logger LOG = LogManager.getLogger(XSSFPicture.class); + private static final Logger LOG = PoiLogManager.getLogger(XSSFPicture.class); /* * Column width measured as the number of characters of the maximum digit width of the diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFSheet.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFSheet.java index f931b2d58d..8c3c487db3 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFSheet.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFSheet.java @@ -30,8 +30,8 @@ import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.ooxml.POIXMLDocumentPart; import org.apache.poi.ooxml.POIXMLException; import org.apache.poi.openxml4j.exceptions.InvalidFormatException; @@ -76,7 +76,7 @@ import org.openxmlformats.schemas.spreadsheetml.x2006.main.*; * </p> */ public class XSSFSheet extends POIXMLDocumentPart implements Sheet, OoxmlSheetExtensions { - private static final Logger LOG = LogManager.getLogger(XSSFSheet.class); + private static final Logger LOG = PoiLogManager.getLogger(XSSFSheet.class); private static final double DEFAULT_ROW_HEIGHT = 15.0; private static final double DEFAULT_MARGIN_HEADER = 0.3; diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFTable.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFTable.java index d9f7189446..7a4f5c78bb 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFTable.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFTable.java @@ -28,8 +28,8 @@ import java.util.Collections; import java.util.List; import java.util.concurrent.ConcurrentSkipListMap; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.ooxml.POIXMLDocumentPart; import org.apache.poi.openxml4j.opc.PackagePart; import org.apache.poi.ss.SpreadsheetVersion; @@ -58,7 +58,7 @@ import org.openxmlformats.schemas.spreadsheetml.x2006.main.TableDocument; */ public class XSSFTable extends POIXMLDocumentPart implements Table { - private static final Logger LOG = LogManager.getLogger(XSSFTable.class); + private static final Logger LOG = PoiLogManager.getLogger(XSSFTable.class); private CTTable ctTable; private transient List<XSSFXmlColumnPr> xmlColumnPrs; diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFTableStyle.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFTableStyle.java index 652c377e1a..f5cfaf425b 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFTableStyle.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFTableStyle.java @@ -22,8 +22,8 @@ import java.util.EnumMap; import java.util.List; import java.util.Map; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.ss.usermodel.DifferentialStyleProvider; import org.apache.poi.ss.usermodel.TableStyle; import org.apache.poi.ss.usermodel.TableStyleType; @@ -41,7 +41,7 @@ import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTTableStyleElement; * Also used for built-in styles via dummy XML generated from presetTableStyles.xml. */ public class XSSFTableStyle implements TableStyle { - private static final Logger LOG = LogManager.getLogger(XSSFTableStyle.class); + private static final Logger LOG = PoiLogManager.getLogger(XSSFTableStyle.class); private final String name; private final int index; diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java index 3703f0dd4b..0c8ddce4a0 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java @@ -44,8 +44,8 @@ import javax.xml.namespace.QName; import org.apache.commons.collections4.ListValuedMap; import org.apache.commons.collections4.multimap.ArrayListValuedHashMap; import org.apache.commons.io.output.UnsynchronizedByteArrayOutputStream; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.hpsf.ClassIDPredefined; import org.apache.poi.ooxml.HyperlinkRelationship; import org.apache.poi.ooxml.POIXMLDocument; @@ -194,7 +194,7 @@ public class XSSFWorkbook extends POIXMLDocument implements Workbook, Date1904Su */ private List<XSSFPictureData> pictures; - private static final Logger LOG = LogManager.getLogger(XSSFWorkbook.class); + private static final Logger LOG = PoiLogManager.getLogger(XSSFWorkbook.class); /** * cached instance of XSSFCreationHelper for this workbook diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/helpers/XSSFRowColShifter.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/helpers/XSSFRowColShifter.java index d5def27059..df55c51673 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/helpers/XSSFRowColShifter.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/helpers/XSSFRowColShifter.java @@ -17,8 +17,8 @@ package org.apache.poi.xssf.usermodel.helpers; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.ss.formula.FormulaShifter; import org.apache.poi.ss.formula.FormulaParser; import org.apache.poi.ss.formula.FormulaType; @@ -44,7 +44,7 @@ import static org.apache.logging.log4j.util.Unbox.box; */ @Internal /*private*/ final class XSSFRowColShifter { - private static final Logger LOG = LogManager.getLogger(XSSFRowColShifter.class); + private static final Logger LOG = PoiLogManager.getLogger(XSSFRowColShifter.class); private XSSFRowColShifter() { /*no instances for static classes*/} diff --git a/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFDocument.java b/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFDocument.java index 544bd209cf..36d1350d59 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFDocument.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFDocument.java @@ -38,8 +38,8 @@ import java.util.Optional; import java.util.Spliterator; import javax.xml.namespace.QName; import org.apache.commons.io.output.UnsynchronizedByteArrayOutputStream; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.common.usermodel.PictureType; import org.apache.poi.ooxml.POIXMLDocument; import org.apache.poi.ooxml.POIXMLDocumentPart; @@ -103,7 +103,7 @@ import org.openxmlformats.schemas.wordprocessingml.x2006.main.StylesDocument; */ @SuppressWarnings("unused") public class XWPFDocument extends POIXMLDocument implements Document, IBody { - private static final Logger LOG = LogManager.getLogger(XWPFDocument.class); + private static final Logger LOG = PoiLogManager.getLogger(XWPFDocument.class); protected List<XWPFFooter> footers = new ArrayList<>(); protected List<XWPFHeader> headers = new ArrayList<>(); diff --git a/poi-ooxml/src/test/java/org/apache/poi/openxml4j/opc/TestListParts.java b/poi-ooxml/src/test/java/org/apache/poi/openxml4j/opc/TestListParts.java index a41d01971b..52890a6823 100644 --- a/poi-ooxml/src/test/java/org/apache/poi/openxml4j/opc/TestListParts.java +++ b/poi-ooxml/src/test/java/org/apache/poi/openxml4j/opc/TestListParts.java @@ -24,15 +24,15 @@ import java.io.IOException; import java.io.InputStream; import java.util.TreeMap; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.openxml4j.OpenXML4JTestDataSamples; import org.apache.poi.openxml4j.exceptions.InvalidFormatException; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; public final class TestListParts { - private static final Logger LOG = LogManager.getLogger(TestListParts.class); + private static final Logger LOG = PoiLogManager.getLogger(TestListParts.class); private TreeMap<PackagePartName, String> expectedValues; diff --git a/poi-ooxml/src/test/java/org/apache/poi/openxml4j/opc/TestPackage.java b/poi-ooxml/src/test/java/org/apache/poi/openxml4j/opc/TestPackage.java index 6973c0cbc5..520e1ce774 100644 --- a/poi-ooxml/src/test/java/org/apache/poi/openxml4j/opc/TestPackage.java +++ b/poi-ooxml/src/test/java/org/apache/poi/openxml4j/opc/TestPackage.java @@ -59,8 +59,8 @@ import org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream; import org.apache.commons.compress.archivers.zip.ZipFile; import org.apache.commons.io.output.CountingOutputStream; import org.apache.commons.io.output.UnsynchronizedByteArrayOutputStream; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.EncryptedDocumentException; import org.apache.poi.POIDataSamples; import org.apache.poi.POITestCase; @@ -100,7 +100,7 @@ import org.xml.sax.SAXException; import org.xml.sax.SAXParseException; public final class TestPackage { - private static final Logger LOG = LogManager.getLogger(TestPackage.class); + private static final Logger LOG = PoiLogManager.getLogger(TestPackage.class); private static final String CONTENT_EXT_PROPS = "application/vnd.openxmlformats-officedocument.extended-properties+xml"; private static final POIDataSamples xlsSamples = POIDataSamples.getSpreadSheetInstance(); diff --git a/poi-ooxml/src/test/java/org/apache/poi/openxml4j/opc/TestRelationships.java b/poi-ooxml/src/test/java/org/apache/poi/openxml4j/opc/TestRelationships.java index b00be391ac..8ede53b66b 100644 --- a/poi-ooxml/src/test/java/org/apache/poi/openxml4j/opc/TestRelationships.java +++ b/poi-ooxml/src/test/java/org/apache/poi/openxml4j/opc/TestRelationships.java @@ -30,8 +30,8 @@ import java.net.URI; import java.util.regex.Pattern; import org.apache.commons.io.output.UnsynchronizedByteArrayOutputStream; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.openxml4j.OpenXML4JTestDataSamples; import org.apache.poi.xssf.usermodel.XSSFRelation; import org.junit.jupiter.api.Test; @@ -45,7 +45,7 @@ class TestRelationships { private static final String SHEET_WITH_COMMENTS = "/xl/worksheets/sheet1.xml"; - private static final Logger LOG = LogManager.getLogger(TestRelationships.class); + private static final Logger LOG = PoiLogManager.getLogger(TestRelationships.class); /** * Test relationships are correctly loaded. This at the moment fails (as of r499) diff --git a/poi-ooxml/src/test/java/org/apache/poi/poifs/crypt/dsig/TestSignatureInfo.java b/poi-ooxml/src/test/java/org/apache/poi/poifs/crypt/dsig/TestSignatureInfo.java index e08c4bce06..241243a93e 100644 --- a/poi-ooxml/src/test/java/org/apache/poi/poifs/crypt/dsig/TestSignatureInfo.java +++ b/poi-ooxml/src/test/java/org/apache/poi/poifs/crypt/dsig/TestSignatureInfo.java @@ -62,8 +62,8 @@ import javax.xml.crypto.dsig.dom.DOMSignContext; import org.apache.commons.io.output.UnsynchronizedByteArrayOutputStream; import org.apache.jcp.xml.dsig.internal.dom.DOMSignedInfo; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.EncryptedDocumentException; import org.apache.poi.POIDataSamples; import org.apache.poi.POITestCase; @@ -126,7 +126,7 @@ import org.w3.x2000.x09.xmldsig.SignatureDocument; import org.w3c.dom.Document; class TestSignatureInfo { - private static final Logger LOG = LogManager.getLogger(TestSignatureInfo.class); + private static final Logger LOG = PoiLogManager.getLogger(TestSignatureInfo.class); private static final POIDataSamples testdata = POIDataSamples.getXmlDSignInstance(); private static final String STORE_PASS = "test"; diff --git a/poi-ooxml/src/test/java/org/apache/poi/ss/tests/TestWorkbookFactory.java b/poi-ooxml/src/test/java/org/apache/poi/ss/tests/TestWorkbookFactory.java index b306dc7712..4d34784561 100644 --- a/poi-ooxml/src/test/java/org/apache/poi/ss/tests/TestWorkbookFactory.java +++ b/poi-ooxml/src/test/java/org/apache/poi/ss/tests/TestWorkbookFactory.java @@ -34,8 +34,8 @@ import java.util.concurrent.Executors; import java.util.concurrent.Future; import java.util.stream.Stream; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.EmptyFileException; import org.apache.poi.EncryptedDocumentException; import org.apache.poi.POIDataSamples; @@ -62,7 +62,7 @@ public final class TestWorkbookFactory { private static final String[] xlsx_protected = new String[]{"protected_passtika.xlsx", "tika"}; private static final String txt = "SampleSS.txt"; - private static final Logger LOGGER = LogManager.getLogger(TestWorkbookFactory.class); + private static final Logger LOGGER = PoiLogManager.getLogger(TestWorkbookFactory.class); /** * Closes the sample workbook read in from filename. diff --git a/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestFormulaEvaluatorOnXSSF.java b/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestFormulaEvaluatorOnXSSF.java index 9d478cedc6..597c86a5b6 100644 --- a/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestFormulaEvaluatorOnXSSF.java +++ b/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestFormulaEvaluatorOnXSSF.java @@ -29,8 +29,8 @@ import java.util.List; import java.util.Locale; import java.util.stream.Stream; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.hssf.HSSFTestDataSamples; import org.apache.poi.openxml4j.opc.OPCPackage; import org.apache.poi.openxml4j.opc.PackageAccess; @@ -59,7 +59,7 @@ import org.junit.jupiter.params.provider.MethodSource; * */ public final class TestFormulaEvaluatorOnXSSF { - private static final Logger LOG = LogManager.getLogger(TestFormulaEvaluatorOnXSSF.class); + private static final Logger LOG = PoiLogManager.getLogger(TestFormulaEvaluatorOnXSSF.class); private static XSSFWorkbook workbook; private static Sheet sheet; diff --git a/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestMatrixFormulasFromXMLSpreadsheet.java b/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestMatrixFormulasFromXMLSpreadsheet.java index b7f32acd67..81ca20bf75 100644 --- a/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestMatrixFormulasFromXMLSpreadsheet.java +++ b/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestMatrixFormulasFromXMLSpreadsheet.java @@ -28,8 +28,8 @@ import java.util.List; import java.util.Locale; import java.util.stream.Stream; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.ss.formula.eval.ErrorEval; import org.apache.poi.ss.formula.functions.BaseTestNumeric; import org.apache.poi.ss.usermodel.Cell; @@ -47,7 +47,7 @@ import org.junit.jupiter.params.provider.MethodSource; public final class TestMatrixFormulasFromXMLSpreadsheet { - private static final Logger LOG = LogManager.getLogger(TestMatrixFormulasFromXMLSpreadsheet.class); + private static final Logger LOG = PoiLogManager.getLogger(TestMatrixFormulasFromXMLSpreadsheet.class); private static XSSFWorkbook workbook; private static Sheet sheet; diff --git a/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestMultiSheetFormulaEvaluatorOnXSSF.java b/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestMultiSheetFormulaEvaluatorOnXSSF.java index a6fb4aebbf..f73e917176 100644 --- a/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestMultiSheetFormulaEvaluatorOnXSSF.java +++ b/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestMultiSheetFormulaEvaluatorOnXSSF.java @@ -31,8 +31,8 @@ import java.util.List; import java.util.Locale; import java.util.stream.Stream; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.hssf.HSSFTestDataSamples; import org.apache.poi.openxml4j.opc.OPCPackage; import org.apache.poi.openxml4j.opc.PackageAccess; @@ -52,7 +52,7 @@ import org.junit.jupiter.params.provider.MethodSource; * Tests formulas for multi sheet reference (i.e. SUM(Sheet1:Sheet5!A1)) */ public final class TestMultiSheetFormulaEvaluatorOnXSSF { - private static final Logger LOG = LogManager.getLogger(TestMultiSheetFormulaEvaluatorOnXSSF.class); + private static final Logger LOG = PoiLogManager.getLogger(TestMultiSheetFormulaEvaluatorOnXSSF.class); private static XSSFWorkbook workbook; private static Sheet sheet; diff --git a/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFBugs.java b/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFBugs.java index ae2f3c37f2..5c0940b8be 100644 --- a/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFBugs.java +++ b/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFBugs.java @@ -49,8 +49,8 @@ import org.apache.commons.compress.archivers.zip.ZipArchiveEntry; import org.apache.commons.compress.archivers.zip.ZipFile; import org.apache.commons.io.output.NullOutputStream; import org.apache.commons.io.output.UnsynchronizedByteArrayOutputStream; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.POIDataSamples; import org.apache.poi.common.usermodel.HyperlinkType; import org.apache.poi.hssf.HSSFITestDataProvider; @@ -137,7 +137,7 @@ import org.xml.sax.SAXParseException; import org.xml.sax.XMLReader; public final class TestXSSFBugs extends BaseTestBugzillaIssues { - private static final Logger LOG = LogManager.getLogger(TestXSSFBugs.class); + private static final Logger LOG = PoiLogManager.getLogger(TestXSSFBugs.class); public TestXSSFBugs() { super(XSSFITestDataProvider.instance); diff --git a/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFColGrouping.java b/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFColGrouping.java index 69f4e79e62..27ea1be38a 100644 --- a/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFColGrouping.java +++ b/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFColGrouping.java @@ -23,8 +23,8 @@ import static org.junit.jupiter.api.Assertions.assertTrue; import java.io.IOException; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.xssf.XSSFTestDataSamples; import org.junit.jupiter.api.Test; import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTCol; @@ -43,7 +43,7 @@ import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTCols; */ class TestXSSFColGrouping { - private static final Logger LOG = LogManager.getLogger(TestXSSFColGrouping.class); + private static final Logger LOG = PoiLogManager.getLogger(TestXSSFColGrouping.class); /** diff --git a/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFSheetMergeRegions.java b/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFSheetMergeRegions.java index 1cce6eb861..18fac01ed3 100644 --- a/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFSheetMergeRegions.java +++ b/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFSheetMergeRegions.java @@ -22,15 +22,15 @@ import static org.junit.jupiter.api.Assertions.*; import java.io.IOException; import java.util.List; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.ss.util.CellRangeAddress; import org.apache.poi.xssf.XSSFTestDataSamples; import org.junit.jupiter.api.Test; class TestXSSFSheetMergeRegions { - private static final Logger LOG = LogManager.getLogger(TestXSSFSheetMergeRegions.class); + private static final Logger LOG = PoiLogManager.getLogger(TestXSSFSheetMergeRegions.class); @Test void testMergeRegionsSpeed() throws IOException { diff --git a/poi-scratchpad/src/main/java/org/apache/poi/extractor/ole2/OLE2ScratchpadExtractorFactory.java b/poi-scratchpad/src/main/java/org/apache/poi/extractor/ole2/OLE2ScratchpadExtractorFactory.java index 5bd8783294..28b8e0e934 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/extractor/ole2/OLE2ScratchpadExtractorFactory.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/extractor/ole2/OLE2ScratchpadExtractorFactory.java @@ -24,8 +24,8 @@ import java.util.List; import java.util.stream.StreamSupport; import org.apache.commons.io.input.UnsynchronizedByteArrayInputStream; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.extractor.ExtractorFactory; import org.apache.poi.extractor.ExtractorProvider; import org.apache.poi.extractor.POIOLE2TextExtractor; @@ -58,7 +58,7 @@ import org.apache.poi.sl.usermodel.SlideShowFactory; */ @SuppressWarnings("WeakerAccess") public class OLE2ScratchpadExtractorFactory implements ExtractorProvider { - private static final Logger LOG = LogManager.getLogger(OLE2ScratchpadExtractorFactory.class); + private static final Logger LOG = PoiLogManager.getLogger(OLE2ScratchpadExtractorFactory.class); private static final String[] OUTLOOK_ENTRY_NAMES = { // message bodies, saved as plain text (PtypString) diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hdgf/chunks/Chunk.java b/poi-scratchpad/src/main/java/org/apache/poi/hdgf/chunks/Chunk.java index b85592f112..edf45af7b7 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hdgf/chunks/Chunk.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hdgf/chunks/Chunk.java @@ -19,8 +19,8 @@ package org.apache.poi.hdgf.chunks; import java.util.ArrayList; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.hdgf.chunks.ChunkFactory.CommandDefinition; import org.apache.poi.util.LittleEndian; @@ -31,7 +31,7 @@ import static org.apache.logging.log4j.util.Unbox.box; */ public final class Chunk { /** For logging warnings about the structure of the file */ - private static final Logger LOG = LogManager.getLogger(Chunk.class); + private static final Logger LOG = PoiLogManager.getLogger(Chunk.class); /** * The contents of the chunk, excluding the header, diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hdgf/chunks/ChunkFactory.java b/poi-scratchpad/src/main/java/org/apache/poi/hdgf/chunks/ChunkFactory.java index 03f13b452f..04e67c2a20 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hdgf/chunks/ChunkFactory.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hdgf/chunks/ChunkFactory.java @@ -26,8 +26,8 @@ import java.util.HashMap; import java.util.Map; import java.util.StringTokenizer; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.util.IOUtils; import org.apache.poi.util.LocaleUtil; @@ -61,7 +61,7 @@ public final class ChunkFactory { "/org/apache/poi/hdgf/chunks_parse_cmds.tbl"; /** For logging problems we spot with the file */ - private static final Logger LOG = LogManager.getLogger(ChunkFactory.class); + private static final Logger LOG = PoiLogManager.getLogger(ChunkFactory.class); /** * @param length the max record length allowed for ChunkFactory diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hdgf/streams/ChunkStream.java b/poi-scratchpad/src/main/java/org/apache/poi/hdgf/streams/ChunkStream.java index b1c10ae3e7..82be5c17a8 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hdgf/streams/ChunkStream.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hdgf/streams/ChunkStream.java @@ -19,8 +19,8 @@ package org.apache.poi.hdgf.streams; import java.util.ArrayList; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.hdgf.chunks.Chunk; import org.apache.poi.hdgf.chunks.ChunkFactory; import org.apache.poi.hdgf.chunks.ChunkHeader; @@ -29,7 +29,7 @@ import org.apache.poi.hdgf.pointers.Pointer; import static org.apache.logging.log4j.util.Unbox.box; public final class ChunkStream extends Stream { - private static final Logger LOG = LogManager.getLogger(ChunkStream.class); + private static final Logger LOG = PoiLogManager.getLogger(ChunkStream.class); private final ChunkFactory chunkFactory; /** All the Chunks we contain */ diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hdgf/streams/PointerContainingStream.java b/poi-scratchpad/src/main/java/org/apache/poi/hdgf/streams/PointerContainingStream.java index 62817dd2c1..d783490f1f 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hdgf/streams/PointerContainingStream.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hdgf/streams/PointerContainingStream.java @@ -17,8 +17,8 @@ package org.apache.poi.hdgf.streams; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.hdgf.chunks.ChunkFactory; import org.apache.poi.hdgf.pointers.Pointer; import org.apache.poi.hdgf.pointers.PointerFactory; @@ -28,7 +28,7 @@ import org.apache.poi.hdgf.pointers.PointerFactory; * other data too. */ public class PointerContainingStream extends Stream { // TODO - instantiable superclass - private static final Logger LOG = LogManager.getLogger(PointerContainingStream.class); + private static final Logger LOG = PoiLogManager.getLogger(PointerContainingStream.class); private static final int MAX_CHILDREN_NESTING = 500; diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hemf/record/emf/HemfComment.java b/poi-scratchpad/src/main/java/org/apache/poi/hemf/record/emf/HemfComment.java index 692bf4ee25..04f37e409f 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hemf/record/emf/HemfComment.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hemf/record/emf/HemfComment.java @@ -31,8 +31,8 @@ import java.util.Map; import java.util.NoSuchElementException; import java.util.function.Supplier; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.common.usermodel.GenericRecord; import org.apache.poi.hemf.draw.HemfGraphics; import org.apache.poi.hemf.draw.HemfGraphics.EmfRenderState; @@ -55,7 +55,7 @@ import org.apache.poi.util.RecordFormatException; */ @Internal public class HemfComment { - private static final Logger LOG = LogManager.getLogger(HemfComment.class); + private static final Logger LOG = PoiLogManager.getLogger(HemfComment.class); public enum HemfCommentRecordType { emfGeneric(-1, EmfCommentDataGeneric::new, false), diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hmef/attribute/MAPIDateAttribute.java b/poi-scratchpad/src/main/java/org/apache/poi/hmef/attribute/MAPIDateAttribute.java index 59d7be584d..c267bd82ed 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hmef/attribute/MAPIDateAttribute.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hmef/attribute/MAPIDateAttribute.java @@ -23,8 +23,8 @@ import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.hmef.Attachment; import org.apache.poi.hmef.HMEFMessage; import org.apache.poi.hpsf.Filetime; @@ -42,7 +42,7 @@ import org.apache.poi.util.LocaleUtil; * @see <a href="https://msdn.microsoft.com/en-us/library/cc433490(v=exchg.80).aspx">[MS-OXPROPS]: Exchange Server Protocols Master Property List</a> */ public final class MAPIDateAttribute extends MAPIAttribute { - private static final Logger LOG = LogManager.getLogger(MAPIDateAttribute.class); + private static final Logger LOG = PoiLogManager.getLogger(MAPIDateAttribute.class); private final Date data; /** diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hmef/attribute/MAPIStringAttribute.java b/poi-scratchpad/src/main/java/org/apache/poi/hmef/attribute/MAPIStringAttribute.java index 9ad7a09997..c30ec513cb 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hmef/attribute/MAPIStringAttribute.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hmef/attribute/MAPIStringAttribute.java @@ -19,8 +19,8 @@ package org.apache.poi.hmef.attribute; import java.nio.charset.Charset; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.hmef.Attachment; import org.apache.poi.hmef.HMEFMessage; import org.apache.poi.hsmf.datatypes.MAPIProperty; @@ -32,7 +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 final Logger LOG = LogManager.getLogger(MAPIStringAttribute.class); + private static final Logger LOG = PoiLogManager.getLogger(MAPIStringAttribute.class); private static final String CODEPAGE = "CP1252"; private final String data; diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hmef/attribute/TNEFDateAttribute.java b/poi-scratchpad/src/main/java/org/apache/poi/hmef/attribute/TNEFDateAttribute.java index 1c64dbe3c1..ea6382b461 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hmef/attribute/TNEFDateAttribute.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hmef/attribute/TNEFDateAttribute.java @@ -26,8 +26,8 @@ import java.util.Calendar; import java.util.Date; import java.util.Locale; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.hmef.Attachment; import org.apache.poi.hmef.HMEFMessage; import org.apache.poi.hpsf.Filetime; @@ -39,7 +39,7 @@ import org.apache.poi.util.LocaleUtil; * or one of its {@link Attachment}s. */ public final class TNEFDateAttribute extends TNEFAttribute { - private static final Logger LOG = LogManager.getLogger(TNEFDateAttribute.class); + private static final Logger LOG = PoiLogManager.getLogger(TNEFDateAttribute.class); private final Date data; /** diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hmef/attribute/TNEFStringAttribute.java b/poi-scratchpad/src/main/java/org/apache/poi/hmef/attribute/TNEFStringAttribute.java index d42feaa51a..c403754edb 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hmef/attribute/TNEFStringAttribute.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hmef/attribute/TNEFStringAttribute.java @@ -20,8 +20,8 @@ package org.apache.poi.hmef.attribute; import java.io.IOException; import java.io.InputStream; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.hmef.Attachment; import org.apache.poi.hmef.HMEFMessage; import org.apache.poi.util.StringUtil; @@ -31,7 +31,7 @@ import org.apache.poi.util.StringUtil; * or one of its {@link Attachment}s. */ public final class TNEFStringAttribute extends TNEFAttribute { - private static final Logger LOG = LogManager.getLogger(TNEFStringAttribute.class); + private static final Logger LOG = PoiLogManager.getLogger(TNEFStringAttribute.class); private final String data; /** diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hpbf/model/QuillContents.java b/poi-scratchpad/src/main/java/org/apache/poi/hpbf/model/QuillContents.java index cd571679c2..74d766fbdc 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hpbf/model/QuillContents.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hpbf/model/QuillContents.java @@ -19,8 +19,8 @@ package org.apache.poi.hpbf.model; import java.io.IOException; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.hpbf.model.qcbits.QCBit; import org.apache.poi.hpbf.model.qcbits.QCPLCBit; import org.apache.poi.hpbf.model.qcbits.QCTextBit; @@ -34,7 +34,7 @@ import org.apache.poi.util.LocaleUtil; * Read Quill Contents (/Quill/QuillSub/CONTENTS) from an HPBF (Publisher .pub) document */ public final class QuillContents extends HPBFPart { - private static final Logger LOG = LogManager.getLogger(QuillContents.class); + private static final Logger LOG = PoiLogManager.getLogger(QuillContents.class); private static final String[] PATH = { "Quill", "QuillSub", "CONTENTS", }; private final QCBit[] bits; diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hslf/blip/PICT.java b/poi-scratchpad/src/main/java/org/apache/poi/hslf/blip/PICT.java index fdc23e9e3e..69c6b766b6 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hslf/blip/PICT.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hslf/blip/PICT.java @@ -28,8 +28,8 @@ import java.util.zip.InflaterInputStream; import org.apache.commons.io.input.UnsynchronizedByteArrayInputStream; import org.apache.commons.io.output.UnsynchronizedByteArrayOutputStream; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.ddf.EscherBSERecord; import org.apache.poi.ddf.EscherContainerRecord; import org.apache.poi.hslf.exceptions.HSLFException; @@ -44,7 +44,7 @@ import org.apache.poi.util.Units; * Represents Macintosh PICT picture data. */ public final class PICT extends Metafile { - private static final Logger LOG = LogManager.getLogger(PICT.class); + private static final Logger LOG = PoiLogManager.getLogger(PICT.class); /** * @deprecated Use {@link HSLFSlideShow#addPicture(byte[], org.apache.poi.sl.usermodel.PictureData.PictureType)} or one of its overloads to create new diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hslf/model/HSLFMetroShape.java b/poi-scratchpad/src/main/java/org/apache/poi/hslf/model/HSLFMetroShape.java index cc64c4c82f..adeb643ae4 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hslf/model/HSLFMetroShape.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hslf/model/HSLFMetroShape.java @@ -20,8 +20,8 @@ package org.apache.poi.hslf.model; import java.io.IOException; import java.util.ServiceLoader; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.ddf.AbstractEscherOptRecord; import org.apache.poi.ddf.EscherComplexProperty; import org.apache.poi.ddf.EscherPropertyTypes; @@ -42,7 +42,7 @@ public class HSLFMetroShape< S extends Shape<S,P>, P extends TextParagraph<S,P,? extends TextRun> > { - private static final Logger LOGGER = LogManager.getLogger(HSLFMetroShape.class); + private static final Logger LOGGER = PoiLogManager.getLogger(HSLFMetroShape.class); private final HSLFShape shape; diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hslf/model/textproperties/BitMaskTextProp.java b/poi-scratchpad/src/main/java/org/apache/poi/hslf/model/textproperties/BitMaskTextProp.java index 25418fe8e0..2e9b131850 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hslf/model/textproperties/BitMaskTextProp.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hslf/model/textproperties/BitMaskTextProp.java @@ -22,8 +22,8 @@ import static org.apache.poi.util.GenericRecordUtil.getBitsAsString; import java.util.Map; import java.util.function.Supplier; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.logging.log4j.message.SimpleMessage; import org.apache.poi.util.GenericRecordUtil; @@ -35,7 +35,7 @@ import org.apache.poi.util.GenericRecordUtil; * (but related) properties */ public abstract class BitMaskTextProp extends TextProp { - protected static final Logger LOG = LogManager.getLogger(BitMaskTextProp.class); + protected static final Logger LOG = PoiLogManager.getLogger(BitMaskTextProp.class); private final String[] subPropNames; private final int[] subPropMasks; diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hslf/model/textproperties/TextPropCollection.java b/poi-scratchpad/src/main/java/org/apache/poi/hslf/model/textproperties/TextPropCollection.java index fa9618483f..d1f10ee72e 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hslf/model/textproperties/TextPropCollection.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hslf/model/textproperties/TextPropCollection.java @@ -29,8 +29,8 @@ import java.util.Objects; import java.util.function.Supplier; import org.apache.commons.io.output.UnsynchronizedByteArrayOutputStream; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.common.Duplicatable; import org.apache.poi.common.usermodel.GenericRecord; import org.apache.poi.hslf.exceptions.HSLFException; @@ -45,7 +45,7 @@ import org.apache.poi.util.LittleEndian; * properties, and the indent level if required. */ public class TextPropCollection implements GenericRecord, Duplicatable { - private static final Logger LOG = LogManager.getLogger(TextPropCollection.class); + private static final Logger LOG = PoiLogManager.getLogger(TextPropCollection.class); /** All the different kinds of paragraph properties we might handle */ private static final TextProp[] paragraphTextPropTypes = { diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/CurrentUserAtom.java b/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/CurrentUserAtom.java index 8f6cdd9aa2..27e79a0fd3 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/CurrentUserAtom.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/CurrentUserAtom.java @@ -29,8 +29,8 @@ import java.io.InputStream; import java.io.OutputStream; import org.apache.commons.io.output.UnsynchronizedByteArrayOutputStream; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.hslf.exceptions.CorruptPowerPointFileException; import org.apache.poi.hslf.exceptions.OldPowerPointFormatException; import org.apache.poi.poifs.filesystem.DirectoryNode; @@ -47,7 +47,7 @@ import org.apache.poi.util.StringUtil; * document. As such, it has to be treated specially */ public class CurrentUserAtom { - private static final Logger LOG = LogManager.getLogger(CurrentUserAtom.class); + private static final Logger LOG = PoiLogManager.getLogger(CurrentUserAtom.class); /** Standard Atom header */ private static final byte[] atomHeader = new byte[] { 0, 0, -10, 15 }; diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/EscherPlaceholder.java b/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/EscherPlaceholder.java index 92088abca5..b884479dd4 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/EscherPlaceholder.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/EscherPlaceholder.java @@ -20,8 +20,8 @@ package org.apache.poi.hslf.record; import java.util.Map; import java.util.function.Supplier; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.ddf.EscherRecord; import org.apache.poi.ddf.EscherRecordFactory; import org.apache.poi.ddf.EscherSerializationListener; @@ -34,7 +34,7 @@ import org.apache.poi.util.LittleEndian; * the slide layout as specified in the SlideAtom record. */ public class EscherPlaceholder extends EscherRecord { - private static final Logger LOG = LogManager.getLogger(EscherPlaceholder.class); + private static final Logger LOG = PoiLogManager.getLogger(EscherPlaceholder.class); public static final short RECORD_ID = RecordTypes.OEPlaceholderAtom.typeID; public static final String RECORD_DESCRIPTION = "msofbtClientTextboxPlaceholder"; diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/Record.java b/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/Record.java index f1ad6045f1..33907c3ff7 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/Record.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/Record.java @@ -23,8 +23,8 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.logging.log4j.message.StringFormattedMessage; import org.apache.poi.common.usermodel.GenericRecord; import org.apache.poi.hslf.exceptions.CorruptPowerPointFileException; @@ -43,7 +43,7 @@ import static org.apache.logging.log4j.util.Unbox.box; public abstract class Record implements GenericRecord { // For logging - protected static final Logger LOG = LogManager.getLogger(Record.class); + protected static final Logger LOG = PoiLogManager.getLogger(Record.class); /** * Is this record type an Atom record (only has data), diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/TxMasterStyleAtom.java b/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/TxMasterStyleAtom.java index 610ad27c39..04e8b78d1d 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/TxMasterStyleAtom.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hslf/record/TxMasterStyleAtom.java @@ -26,8 +26,8 @@ import java.util.Map; import java.util.function.Supplier; import org.apache.commons.io.output.UnsynchronizedByteArrayOutputStream; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.hslf.exceptions.HSLFException; import org.apache.poi.hslf.model.textproperties.TextPropCollection; import org.apache.poi.hslf.model.textproperties.TextPropCollection.TextPropType; @@ -53,7 +53,7 @@ import org.apache.poi.util.LittleEndianOutputStream; * </p> */ public final class TxMasterStyleAtom extends RecordAtom { - private static final Logger LOG = LogManager.getLogger(TxMasterStyleAtom.class); + private static final Logger LOG = PoiLogManager.getLogger(TxMasterStyleAtom.class); /** * Maximum number of indentation levels allowed in PowerPoint documents diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFAutoShape.java b/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFAutoShape.java index c02561d8c7..20417dd464 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFAutoShape.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFAutoShape.java @@ -26,8 +26,8 @@ import java.awt.geom.Point2D; import java.awt.geom.Rectangle2D; import java.util.Iterator; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.ddf.AbstractEscherOptRecord; import org.apache.poi.ddf.EscherArrayProperty; import org.apache.poi.ddf.EscherContainerRecord; @@ -57,7 +57,7 @@ import org.apache.poi.util.LittleEndian; * See {@link ShapeTypes} */ public class HSLFAutoShape extends HSLFTextShape implements AutoShape<HSLFShape,HSLFTextParagraph> { - private static final Logger LOG = LogManager.getLogger(HSLFAutoShape.class); + private static final Logger LOG = PoiLogManager.getLogger(HSLFAutoShape.class); static final byte[] SEGMENTINFO_MOVETO = new byte[]{0x00, 0x40}; static final byte[] SEGMENTINFO_LINETO = new byte[]{0x00, (byte)0xAC}; diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFFill.java b/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFFill.java index 14ceaa5e6a..3f9f84b6d6 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFFill.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFFill.java @@ -24,8 +24,8 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.ddf.AbstractEscherOptRecord; import org.apache.poi.ddf.EscherArrayProperty; import org.apache.poi.ddf.EscherBSERecord; @@ -56,7 +56,7 @@ import static org.apache.logging.log4j.util.Unbox.box; */ @SuppressWarnings("WeakerAccess") public final class HSLFFill { - private static final Logger LOG = LogManager.getLogger(HSLFFill.class); + private static final Logger LOG = PoiLogManager.getLogger(HSLFFill.class); /** * Fill with a solid color diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFFreeformShape.java b/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFFreeformShape.java index 0a3bcc91bb..63b27582d9 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFFreeformShape.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFFreeformShape.java @@ -25,8 +25,8 @@ import java.awt.geom.Rectangle2D; import java.util.ArrayList; import java.util.List; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.ddf.AbstractEscherOptRecord; import org.apache.poi.ddf.EscherArrayProperty; import org.apache.poi.ddf.EscherContainerRecord; @@ -49,7 +49,7 @@ import static org.apache.logging.log4j.util.Unbox.box; * </p> */ public final class HSLFFreeformShape extends HSLFAutoShape implements FreeformShape<HSLFShape,HSLFTextParagraph> { - private static final Logger LOG = LogManager.getLogger(HSLFFreeformShape.class); + private static final Logger LOG = PoiLogManager.getLogger(HSLFFreeformShape.class); enum ShapePath { diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFGroupShape.java b/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFGroupShape.java index 49b2d4bc62..ffb1cbfe4f 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFGroupShape.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFGroupShape.java @@ -23,8 +23,8 @@ import java.util.Iterator; import java.util.List; import java.util.Spliterator; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.ddf.EscherChildAnchorRecord; import org.apache.poi.ddf.EscherClientAnchorRecord; import org.apache.poi.ddf.EscherContainerRecord; @@ -43,7 +43,7 @@ import org.apache.poi.util.Units; */ public class HSLFGroupShape extends HSLFShape implements HSLFShapeContainer, GroupShape<HSLFShape,HSLFTextParagraph> { - private static final Logger LOG = LogManager.getLogger(HSLFGroupShape.class); + private static final Logger LOG = PoiLogManager.getLogger(HSLFGroupShape.class); /** * Create a new ShapeGroup. This constructor is used when a new shape is created. diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFNotes.java b/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFNotes.java index baca28cd5d..3d98cf70d0 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFNotes.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFNotes.java @@ -20,8 +20,8 @@ package org.apache.poi.hslf.usermodel; import java.util.ArrayList; import java.util.List; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.hslf.model.HeadersFooters; import org.apache.poi.hslf.record.HeadersFootersContainer; import org.apache.poi.sl.usermodel.Notes; @@ -34,7 +34,7 @@ import org.apache.poi.sl.usermodel.Placeholder; */ public final class HSLFNotes extends HSLFSheet implements Notes<HSLFShape,HSLFTextParagraph> { - private static final Logger LOG = LogManager.getLogger(HSLFNotes.class); + private static final Logger LOG = PoiLogManager.getLogger(HSLFNotes.class); private final List<List<HSLFTextParagraph>> _paragraphs = new ArrayList<>(); diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFObjectShape.java b/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFObjectShape.java index 4739ddb907..096e9be336 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFObjectShape.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFObjectShape.java @@ -23,8 +23,8 @@ import java.io.OutputStream; import org.apache.commons.io.output.AbstractByteArrayOutputStream; import org.apache.commons.io.output.ByteArrayOutputStream; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.ddf.EscherContainerRecord; import org.apache.poi.ddf.EscherPropertyTypes; import org.apache.poi.ddf.EscherSpRecord; @@ -47,7 +47,7 @@ import org.apache.poi.sl.usermodel.ShapeContainer; * A shape representing embedded OLE object. */ public final class HSLFObjectShape extends HSLFPictureShape implements ObjectShape<HSLFShape,HSLFTextParagraph> { - private static final Logger LOG = LogManager.getLogger(HSLFObjectShape.class); + private static final Logger LOG = PoiLogManager.getLogger(HSLFObjectShape.class); private ExEmbed _exEmbed; diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFPictureData.java b/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFPictureData.java index cfb44383b9..98cdcbad9f 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFPictureData.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFPictureData.java @@ -30,8 +30,8 @@ import java.util.Map; import java.util.Objects; import java.util.function.Supplier; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.common.usermodel.GenericRecord; import org.apache.poi.ddf.EscherBSERecord; import org.apache.poi.ddf.EscherContainerRecord; @@ -55,7 +55,7 @@ import org.apache.poi.util.Units; */ public abstract class HSLFPictureData implements PictureData, GenericRecord { - private static final Logger LOGGER = LogManager.getLogger(HSLFPictureData.class); + private static final Logger LOGGER = PoiLogManager.getLogger(HSLFPictureData.class); /** * Size of the image checksum calculated using MD5 algorithm. diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFPictureShape.java b/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFPictureShape.java index 416fe4147b..1340d01821 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFPictureShape.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFPictureShape.java @@ -21,8 +21,8 @@ import java.awt.Insets; import java.awt.geom.Rectangle2D; import java.util.List; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.ddf.AbstractEscherOptRecord; import org.apache.poi.ddf.EscherBSERecord; import org.apache.poi.ddf.EscherComplexProperty; @@ -45,7 +45,7 @@ import static org.apache.logging.log4j.util.Unbox.box; * Represents a picture in a PowerPoint document. */ public class HSLFPictureShape extends HSLFSimpleShape implements PictureShape<HSLFShape,HSLFTextParagraph> { - private static final Logger LOG = LogManager.getLogger(HSLFPictureShape.class); + private static final Logger LOG = PoiLogManager.getLogger(HSLFPictureShape.class); /** * Create a new <code>Picture</code> diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFShape.java b/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFShape.java index 007259230f..dca66b799a 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFShape.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFShape.java @@ -23,8 +23,8 @@ import java.awt.geom.Rectangle2D; import java.util.Iterator; import java.util.List; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.ddf.AbstractEscherOptRecord; import org.apache.poi.ddf.EscherChildAnchorRecord; import org.apache.poi.ddf.EscherClientAnchorRecord; @@ -66,7 +66,7 @@ import org.apache.poi.util.Units; * in points (72 points = 1 inch). */ public abstract class HSLFShape implements Shape<HSLFShape,HSLFTextParagraph> { - private static final Logger LOG = LogManager.getLogger(HSLFShape.class); + private static final Logger LOG = PoiLogManager.getLogger(HSLFShape.class); /** * Either EscherSpContainer or EscheSpgrContainer record diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFShapeFactory.java b/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFShapeFactory.java index 9993a9e357..c97750cdfc 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFShapeFactory.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFShapeFactory.java @@ -19,8 +19,8 @@ package org.apache.poi.hslf.usermodel; import java.util.List; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.ddf.AbstractEscherOptRecord; import org.apache.poi.ddf.EscherClientDataRecord; import org.apache.poi.ddf.EscherContainerRecord; @@ -49,7 +49,7 @@ import org.apache.poi.util.RecordFormatException; */ public final class HSLFShapeFactory { // For logging - private static final Logger LOG = LogManager.getLogger(HSLFShapeFactory.class); + private static final Logger LOG = PoiLogManager.getLogger(HSLFShapeFactory.class); /** * Create a new shape from the data provided. diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFSimpleShape.java b/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFSimpleShape.java index cc9932a61c..da930b6899 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFSimpleShape.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFSimpleShape.java @@ -19,8 +19,8 @@ package org.apache.poi.hslf.usermodel; import java.awt.Color; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.ddf.AbstractEscherOptRecord; import org.apache.poi.ddf.EscherChildAnchorRecord; import org.apache.poi.ddf.EscherClientAnchorRecord; @@ -58,7 +58,7 @@ import org.apache.poi.util.Units; * This is the parent class for all primitive shapes like Line, Rectangle, etc. */ public abstract class HSLFSimpleShape extends HSLFShape implements SimpleShape<HSLFShape,HSLFTextParagraph> { - private static final Logger LOG = LogManager.getLogger(HSLFSimpleShape.class); + private static final Logger LOG = PoiLogManager.getLogger(HSLFSimpleShape.class); public static final double DEFAULT_LINE_WIDTH = 0.75; diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFSlideShow.java b/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFSlideShow.java index 99888a49a2..ffea9a6f5e 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFSlideShow.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFSlideShow.java @@ -35,8 +35,8 @@ import java.util.Map; import java.util.function.Supplier; import org.apache.commons.io.output.UnsynchronizedByteArrayOutputStream; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.POIDocument; import org.apache.poi.common.usermodel.GenericRecord; import org.apache.poi.common.usermodel.fonts.FontInfo; @@ -83,7 +83,7 @@ public final class HSLFSlideShow extends POIDocument implements SlideShow<HSLFSh public static final String PP95_DOCUMENT = "PP40"; // For logging - private static final Logger LOG = LogManager.getLogger(HSLFSlideShow.class); + private static final Logger LOG = PoiLogManager.getLogger(HSLFSlideShow.class); //arbitrarily selected; may need to increase private static final int DEFAULT_MAX_RECORD_LENGTH = 10_000_000; diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFSlideShowImpl.java b/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFSlideShowImpl.java index 29f76442e8..0f34562aaf 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFSlideShowImpl.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFSlideShowImpl.java @@ -47,8 +47,8 @@ import java.util.stream.Collectors; import org.apache.commons.collections4.IteratorUtils; import org.apache.commons.io.output.UnsynchronizedByteArrayOutputStream; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.POIDocument; import org.apache.poi.ddf.EscherBSERecord; import org.apache.poi.ddf.EscherContainerRecord; @@ -86,7 +86,7 @@ import org.apache.poi.util.LittleEndianConsts; * "reader". It is only a very basic class for now */ public final class HSLFSlideShowImpl extends POIDocument implements Closeable { - private static final Logger LOG = LogManager.getLogger(HSLFSlideShowImpl.class); + private static final Logger LOG = PoiLogManager.getLogger(HSLFSlideShowImpl.class); static final int UNSET_OFFSET = -1; diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFTextParagraph.java b/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFTextParagraph.java index 4e9c89dd37..f010e3d331 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFTextParagraph.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFTextParagraph.java @@ -30,8 +30,8 @@ import java.util.Spliterator; import java.util.function.Consumer; import java.util.stream.Collectors; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.common.usermodel.fonts.FontGroup; import org.apache.poi.common.usermodel.fonts.FontInfo; import org.apache.poi.hslf.exceptions.HSLFException; @@ -85,7 +85,7 @@ import org.apache.poi.util.Units; */ public final class HSLFTextParagraph implements TextParagraph<HSLFShape,HSLFTextParagraph,HSLFTextRun> { - private static final Logger LOG = LogManager.getLogger(HSLFTextParagraph.class); + private static final Logger LOG = PoiLogManager.getLogger(HSLFTextParagraph.class); private static final int MAX_NUMBER_OF_STYLES = 20_000; diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFTextRun.java b/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFTextRun.java index 5947765e3c..eb437bbdd2 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFTextRun.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFTextRun.java @@ -21,8 +21,8 @@ import java.awt.Color; import java.util.List; import java.util.stream.Stream; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.common.usermodel.fonts.FontGroup; import org.apache.poi.common.usermodel.fonts.FontInfo; import org.apache.poi.hslf.exceptions.HSLFException; @@ -48,7 +48,7 @@ import org.apache.poi.sl.usermodel.TextShape; */ @SuppressWarnings({"WeakerAccess", "Duplicates", "unused"}) public final class HSLFTextRun implements TextRun { - private static final Logger LOG = LogManager.getLogger(HSLFTextRun.class); + private static final Logger LOG = PoiLogManager.getLogger(HSLFTextRun.class); /** The TextRun we belong to */ private HSLFTextParagraph parentParagraph; diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFTextShape.java b/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFTextShape.java index 8d99617e7b..348907dd86 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFTextShape.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFTextShape.java @@ -30,8 +30,8 @@ import java.util.Iterator; import java.util.List; import java.util.Spliterator; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.ddf.AbstractEscherOptRecord; import org.apache.poi.ddf.EscherContainerRecord; import org.apache.poi.ddf.EscherPropertyTypes; @@ -65,7 +65,7 @@ import org.apache.poi.util.Units; */ public abstract class HSLFTextShape extends HSLFSimpleShape implements TextShape<HSLFShape,HSLFTextParagraph> { - private static final Logger LOG = LogManager.getLogger(HSLFTextShape.class); + private static final Logger LOG = PoiLogManager.getLogger(HSLFTextShape.class); /** * How to anchor the text diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hsmf/MAPIMessage.java b/poi-scratchpad/src/main/java/org/apache/poi/hsmf/MAPIMessage.java index 2c0d96303a..c568a66d52 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hsmf/MAPIMessage.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hsmf/MAPIMessage.java @@ -28,8 +28,8 @@ import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.POIReadOnlyDocument; import org.apache.poi.hmef.attribute.MAPIRtfAttribute; import org.apache.poi.hsmf.datatypes.AttachmentChunks; @@ -84,7 +84,7 @@ public class MAPIMessage extends POIReadOnlyDocument { /** * For logging problems we spot with the file */ - private static final Logger LOG = LogManager.getLogger(MAPIMessage.class); + private static final Logger LOG = PoiLogManager.getLogger(MAPIMessage.class); private static final Pattern GUESS_7_BIT_ENCODING_PATTERN = Pattern.compile("content-type:.*?charset=[\"']?([^;'\"]+)[\"']?", Pattern.CASE_INSENSITIVE); diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hsmf/datatypes/AttachmentChunks.java b/poi-scratchpad/src/main/java/org/apache/poi/hsmf/datatypes/AttachmentChunks.java index cabd8003c8..9261804bee 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hsmf/datatypes/AttachmentChunks.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hsmf/datatypes/AttachmentChunks.java @@ -35,8 +35,8 @@ import java.util.ArrayList; import java.util.Comparator; import java.util.List; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.hsmf.MAPIMessage; /** @@ -44,7 +44,7 @@ import org.apache.poi.hsmf.MAPIMessage; * attachment. */ public class AttachmentChunks implements ChunkGroup { - private static final Logger LOG = LogManager.getLogger(AttachmentChunks.class); + private static final Logger LOG = PoiLogManager.getLogger(AttachmentChunks.class); public static final String PREFIX = "__attach_version1.0_#"; private ByteChunk attachData; diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hsmf/datatypes/Chunks.java b/poi-scratchpad/src/main/java/org/apache/poi/hsmf/datatypes/Chunks.java index 37105fc8d0..bc7f7acca1 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hsmf/datatypes/Chunks.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hsmf/datatypes/Chunks.java @@ -23,8 +23,8 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; /** * Collection of convenience chunks for standard parts of the MSG file. @@ -37,7 +37,7 @@ import org.apache.logging.log4j.Logger; * TODO Deprecate the public Chunks in favour of Property Lookups */ public final class Chunks implements ChunkGroupWithProperties { - private static final Logger LOG = LogManager.getLogger(Chunks.class); + private static final Logger LOG = PoiLogManager.getLogger(Chunks.class); /** * Holds all the chunks that were found, indexed by their MAPIProperty. diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hsmf/datatypes/MessageSubmissionChunk.java b/poi-scratchpad/src/main/java/org/apache/poi/hsmf/datatypes/MessageSubmissionChunk.java index 482f8a941b..86edba47bd 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hsmf/datatypes/MessageSubmissionChunk.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hsmf/datatypes/MessageSubmissionChunk.java @@ -25,8 +25,8 @@ import java.util.Calendar; import java.util.regex.Matcher; import java.util.regex.Pattern; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.hsmf.datatypes.Types.MAPIType; import org.apache.poi.util.IOUtils; import org.apache.poi.util.LocaleUtil; @@ -37,7 +37,7 @@ import org.apache.poi.util.LocaleUtil; * used if you want to cancel a message or similar */ public class MessageSubmissionChunk extends Chunk { - private static final Logger LOG = LogManager.getLogger(MessageSubmissionChunk.class); + private static final Logger LOG = PoiLogManager.getLogger(MessageSubmissionChunk.class); private String rawId; private Calendar date; diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hsmf/datatypes/PropertiesChunk.java b/poi-scratchpad/src/main/java/org/apache/poi/hsmf/datatypes/PropertiesChunk.java index b409748504..91692e3897 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hsmf/datatypes/PropertiesChunk.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hsmf/datatypes/PropertiesChunk.java @@ -30,8 +30,8 @@ import java.util.Map; import java.util.Map.Entry; import org.apache.commons.io.output.UnsynchronizedByteArrayOutputStream; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.hsmf.datatypes.PropertyValue.BooleanPropertyValue; import org.apache.poi.hsmf.datatypes.PropertyValue.CurrencyPropertyValue; import org.apache.poi.hsmf.datatypes.PropertyValue.DoublePropertyValue; @@ -72,7 +72,7 @@ public abstract class PropertiesChunk extends Chunk { public static final int PROPERTIES_FLAG_WRITEABLE = 4; /** For logging problems we spot with the file */ - private static final Logger LOG = LogManager.getLogger(PropertiesChunk.class); + private static final Logger LOG = PoiLogManager.getLogger(PropertiesChunk.class); /** * Holds properties, indexed by type. If a property is multi-valued, or diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hsmf/datatypes/RecipientChunks.java b/poi-scratchpad/src/main/java/org/apache/poi/hsmf/datatypes/RecipientChunks.java index d333a7b55d..8eeb7bfc23 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hsmf/datatypes/RecipientChunks.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hsmf/datatypes/RecipientChunks.java @@ -24,8 +24,8 @@ import java.util.Comparator; import java.util.List; import java.util.Map; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; /** * Collection of convenience chunks for the Recip(ient) part of an outlook file. @@ -33,7 +33,7 @@ import org.apache.logging.log4j.Logger; * If a message has multiple recipients, there will be several of these. */ public final class RecipientChunks implements ChunkGroupWithProperties { - private static final Logger LOG = LogManager.getLogger(RecipientChunks.class); + private static final Logger LOG = PoiLogManager.getLogger(RecipientChunks.class); public static final String PREFIX = "__recip_version1.0_#"; diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hsmf/parsers/POIFSChunkParser.java b/poi-scratchpad/src/main/java/org/apache/poi/hsmf/parsers/POIFSChunkParser.java index 086a653086..9140957cd7 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hsmf/parsers/POIFSChunkParser.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hsmf/parsers/POIFSChunkParser.java @@ -24,8 +24,8 @@ import java.util.Map; import java.util.Objects; import java.util.TreeMap; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.hsmf.datatypes.AttachmentChunks; import org.apache.poi.hsmf.datatypes.ByteChunk; import org.apache.poi.hsmf.datatypes.ByteChunkDeferred; @@ -55,7 +55,7 @@ import org.apache.poi.poifs.filesystem.POIFSFileSystem; * data and so on. */ public final class POIFSChunkParser { - private static final Logger LOG = LogManager.getLogger(POIFSChunkParser.class); + private static final Logger LOG = PoiLogManager.getLogger(POIFSChunkParser.class); private POIFSChunkParser() {} diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hssf/converter/ExcelToFoConverter.java b/poi-scratchpad/src/main/java/org/apache/poi/hssf/converter/ExcelToFoConverter.java index 5724e024b0..3f31249da5 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hssf/converter/ExcelToFoConverter.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hssf/converter/ExcelToFoConverter.java @@ -34,8 +34,8 @@ import javax.xml.transform.Transformer; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.hpsf.SummaryInformation; import org.apache.poi.hssf.usermodel.HSSFCell; import org.apache.poi.hssf.usermodel.HSSFCellStyle; @@ -67,7 +67,7 @@ public class ExcelToFoConverter extends AbstractExcelConverter { private static final float DPI = 72; - private static final Logger LOG = LogManager.getLogger(ExcelToFoConverter.class); + private static final Logger LOG = PoiLogManager.getLogger(ExcelToFoConverter.class); private static final float PAPER_A4_HEIGHT_INCHES = 29.4f / CM_PER_INCH; diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hssf/converter/ExcelToHtmlConverter.java b/poi-scratchpad/src/main/java/org/apache/poi/hssf/converter/ExcelToHtmlConverter.java index e483bd8c96..08a5a71d2a 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hssf/converter/ExcelToHtmlConverter.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hssf/converter/ExcelToHtmlConverter.java @@ -40,8 +40,8 @@ import javax.xml.transform.Transformer; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.hpsf.SummaryInformation; import org.apache.poi.hssf.usermodel.HSSFCell; import org.apache.poi.hssf.usermodel.HSSFCellStyle; @@ -66,7 +66,7 @@ import org.w3c.dom.Text; */ @Beta public class ExcelToHtmlConverter extends AbstractExcelConverter { - private static final Logger LOG = LogManager.getLogger(ExcelToHtmlConverter.class); + private static final Logger LOG = PoiLogManager.getLogger(ExcelToHtmlConverter.class); /** * Java main() interface to interact with ExcelToHtmlConverter diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwmf/record/HwmfBitmapDib.java b/poi-scratchpad/src/main/java/org/apache/poi/hwmf/record/HwmfBitmapDib.java index 437d8cddc0..b6c59a2dfe 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwmf/record/HwmfBitmapDib.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwmf/record/HwmfBitmapDib.java @@ -36,8 +36,8 @@ import java.util.function.Supplier; import javax.imageio.ImageIO; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.common.usermodel.GenericRecord; import org.apache.poi.hwmf.usermodel.HwmfPicture; import org.apache.poi.util.GenericRecordJsonWriter; @@ -52,7 +52,7 @@ import org.apache.poi.util.RecordFormatException; */ public class HwmfBitmapDib implements GenericRecord { - private static final Logger LOG = LogManager.getLogger(HwmfBitmapDib.class); + private static final Logger LOG = PoiLogManager.getLogger(HwmfBitmapDib.class); private static final int BMP_HEADER_SIZE = 14; public enum BitCount { diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwmf/record/HwmfText.java b/poi-scratchpad/src/main/java/org/apache/poi/hwmf/record/HwmfText.java index f81c7dd49c..7710afddba 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwmf/record/HwmfText.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwmf/record/HwmfText.java @@ -31,8 +31,8 @@ import java.util.List; import java.util.Map; import java.util.function.Supplier; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.common.usermodel.GenericRecord; import org.apache.poi.hwmf.draw.HwmfDrawProperties; import org.apache.poi.hwmf.draw.HwmfGraphics; @@ -48,7 +48,7 @@ import org.apache.poi.util.LittleEndianInputStream; import org.apache.poi.util.LocaleUtil; public class HwmfText { - private static final Logger LOG = LogManager.getLogger(HwmfText.class); + private static final Logger LOG = PoiLogManager.getLogger(HwmfText.class); private static final int DEFAULT_MAX_RECORD_LENGTH = 1_000_000; private static int MAX_RECORD_LENGTH = DEFAULT_MAX_RECORD_LENGTH; diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwmf/usermodel/HwmfPicture.java b/poi-scratchpad/src/main/java/org/apache/poi/hwmf/usermodel/HwmfPicture.java index da220c941e..1ab6965db2 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwmf/usermodel/HwmfPicture.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwmf/usermodel/HwmfPicture.java @@ -34,8 +34,8 @@ import java.util.Objects; import java.util.Spliterator; import java.util.function.Supplier; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.common.usermodel.GenericRecord; import org.apache.poi.hwmf.draw.HwmfDrawProperties; import org.apache.poi.hwmf.draw.HwmfGraphics; @@ -58,7 +58,7 @@ public class HwmfPicture implements Iterable<HwmfRecord>, GenericRecord { public static final int DEFAULT_MAX_RECORD_LENGTH = 100_000_000; public static int MAX_RECORD_LENGTH = DEFAULT_MAX_RECORD_LENGTH; - private static final Logger LOG = LogManager.getLogger(HwmfPicture.class); + private static final Logger LOG = PoiLogManager.getLogger(HwmfPicture.class); final List<HwmfRecord> records = new ArrayList<>(); final HwmfPlaceableHeader placeableHeader; diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/HWPFOldDocument.java b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/HWPFOldDocument.java index fa2310b7ef..85a17202bf 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/HWPFOldDocument.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/HWPFOldDocument.java @@ -21,8 +21,8 @@ import java.io.IOException; import java.io.OutputStream; import java.nio.charset.Charset; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.common.usermodel.fonts.FontCharset; import org.apache.poi.hwpf.model.ComplexFileTable; import org.apache.poi.hwpf.model.FontTable; @@ -50,7 +50,7 @@ import org.apache.poi.util.StringUtil; */ public class HWPFOldDocument extends HWPFDocumentCore { - private static final Logger LOG = LogManager.getLogger(HWPFOldDocument.class); + private static final Logger LOG = PoiLogManager.getLogger(HWPFOldDocument.class); //arbitrarily selected; may need to increase private static final int DEFAULT_MAX_RECORD_LENGTH = 10_000_000; diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/converter/AbstractWordConverter.java b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/converter/AbstractWordConverter.java index 186feb2118..aefe15d9da 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/converter/AbstractWordConverter.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/converter/AbstractWordConverter.java @@ -27,8 +27,8 @@ import java.util.Set; import java.util.regex.Matcher; import java.util.regex.Pattern; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.hpsf.SummaryInformation; import org.apache.poi.hwpf.HWPFDocument; import org.apache.poi.hwpf.HWPFDocumentCore; @@ -119,7 +119,7 @@ public abstract class AbstractWordConverter { private static final int FIELD_HYPERLINK = 88; - private static final Logger LOG = LogManager.getLogger(AbstractWordConverter.class); + private static final Logger LOG = PoiLogManager.getLogger(AbstractWordConverter.class); private static final Pattern PATTERN_HYPERLINK_EXTERNAL = Pattern .compile("^[ \\t\\r\\n]*HYPERLINK \"(.*)\".*$"); diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/converter/AbstractWordUtils.java b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/converter/AbstractWordUtils.java index 6668382682..dc996af43d 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/converter/AbstractWordUtils.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/converter/AbstractWordUtils.java @@ -26,8 +26,8 @@ import java.util.Objects; import java.util.Set; import java.util.TreeSet; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.hwpf.HWPFDocument; import org.apache.poi.hwpf.HWPFDocumentCore; import org.apache.poi.hwpf.HWPFOldDocument; @@ -53,7 +53,7 @@ import static org.apache.logging.log4j.util.Unbox.box; public class AbstractWordUtils { static final String EMPTY = ""; - private static final Logger LOG = LogManager.getLogger(AbstractWordUtils.class); + private static final Logger LOG = PoiLogManager.getLogger(AbstractWordUtils.class); public static final float TWIPS_PER_INCH = 1440.0f; public static final int TWIPS_PER_PT = 20; diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/converter/WordToFoConverter.java b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/converter/WordToFoConverter.java index fb96e1eb36..2fe7e5c354 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/converter/WordToFoConverter.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/converter/WordToFoConverter.java @@ -31,8 +31,8 @@ import javax.xml.transform.Transformer; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.hpsf.SummaryInformation; import org.apache.poi.hwpf.HWPFDocument; import org.apache.poi.hwpf.HWPFDocumentCore; @@ -60,7 +60,7 @@ import org.w3c.dom.Text; public class WordToFoConverter extends AbstractWordConverter { - private static final Logger LOG = LogManager.getLogger(WordToFoConverter.class); + private static final Logger LOG = PoiLogManager.getLogger(WordToFoConverter.class); /** * Java main() interface to interact with {@link WordToFoConverter} diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/converter/WordToHtmlConverter.java b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/converter/WordToHtmlConverter.java index e829a997ec..6d7c1750da 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/converter/WordToHtmlConverter.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/converter/WordToHtmlConverter.java @@ -34,8 +34,8 @@ import javax.xml.transform.TransformerException; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.hpsf.SummaryInformation; import org.apache.poi.hwpf.HWPFDocument; import org.apache.poi.hwpf.HWPFDocumentCore; @@ -82,7 +82,7 @@ public class WordToHtmlConverter extends AbstractWordConverter } } - private static final Logger LOG = LogManager.getLogger(WordToHtmlConverter.class); + private static final Logger LOG = PoiLogManager.getLogger(WordToHtmlConverter.class); private final Deque<BlockProperies> blocksProperies = new LinkedList<>(); diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/converter/WordToTextConverter.java b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/converter/WordToTextConverter.java index 58f529a3c9..57a1850269 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/converter/WordToTextConverter.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/converter/WordToTextConverter.java @@ -28,8 +28,8 @@ import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; import org.apache.commons.io.output.StringBuilderWriter; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.hpsf.SummaryInformation; import org.apache.poi.hwpf.HWPFDocument; import org.apache.poi.hwpf.HWPFDocumentCore; @@ -52,7 +52,7 @@ import org.w3c.dom.Element; @Beta public class WordToTextConverter extends AbstractWordConverter { - private static final Logger LOG = LogManager.getLogger(WordToTextConverter.class); + private static final Logger LOG = PoiLogManager.getLogger(WordToTextConverter.class); private static final int MAX_NESTED_CHILD_NODES = 300; diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/BookmarksTables.java b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/BookmarksTables.java index 1ffdbc635d..db47d85fee 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/BookmarksTables.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/BookmarksTables.java @@ -22,8 +22,8 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.hwpf.model.types.BKFAbstractType; import org.apache.poi.util.Internal; @@ -32,7 +32,7 @@ import static org.apache.logging.log4j.util.Unbox.box; @Internal public class BookmarksTables { - private static final Logger LOG = LogManager.getLogger(BookmarksTables.class); + private static final Logger LOG = PoiLogManager.getLogger(BookmarksTables.class); private PlexOfCps descriptorsFirst = new PlexOfCps( 4 ); diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/CHPBinTable.java b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/CHPBinTable.java index 42b28dd500..b16426b011 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/CHPBinTable.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/CHPBinTable.java @@ -31,8 +31,8 @@ import java.util.List; import java.util.Map; import java.util.Set; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.hwpf.model.io.HWPFFileSystem; import org.apache.poi.hwpf.sprm.SprmBuffer; import org.apache.poi.hwpf.sprm.SprmIterator; @@ -50,7 +50,7 @@ import static org.apache.logging.log4j.util.Unbox.box; @Internal public class CHPBinTable { - private static final Logger LOG = LogManager.getLogger(CHPBinTable.class); + private static final Logger LOG = PoiLogManager.getLogger(CHPBinTable.class); /** List of character properties.*/ protected List<CHPX> _textRuns = new ArrayList<>(); diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/FIBFieldHandler.java b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/FIBFieldHandler.java index 227df337c0..7c1036c255 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/FIBFieldHandler.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/FIBFieldHandler.java @@ -24,8 +24,8 @@ import java.util.HashMap; import java.util.HashSet; import java.util.Map; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.util.Internal; import org.apache.poi.util.LittleEndian; import org.apache.poi.util.LittleEndianConsts; @@ -147,7 +147,7 @@ public final class FIBFieldHandler public static final int STTBLISTNAMES = 91; public static final int STTBFUSSR = 92; - private static final Logger LOGGER = LogManager.getLogger(FIBFieldHandler.class); + private static final Logger LOGGER = PoiLogManager.getLogger(FIBFieldHandler.class); private static final int FIELD_SIZE = LittleEndianConsts.INT_SIZE * 2; diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/FileInformationBlock.java b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/FileInformationBlock.java index a3b7086580..c4886c397b 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/FileInformationBlock.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/FileInformationBlock.java @@ -24,8 +24,8 @@ import java.lang.reflect.Modifier; import java.util.HashSet; import java.util.Locale; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.hwpf.HWPFDocument; import org.apache.poi.hwpf.model.types.FibBaseAbstractType; import org.apache.poi.hwpf.model.types.FibRgLw97AbstractType; @@ -51,7 +51,7 @@ import static org.apache.logging.log4j.util.Unbox.box; @Internal public final class FileInformationBlock { - private static final Logger LOG = LogManager.getLogger(FileInformationBlock.class); + private static final Logger LOG = PoiLogManager.getLogger(FileInformationBlock.class); private final FibBase _fibBase; private final int _csw; diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/FontTable.java b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/FontTable.java index 947f8e1009..e204dc1c8f 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/FontTable.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/FontTable.java @@ -20,8 +20,8 @@ package org.apache.poi.hwpf.model; import java.io.ByteArrayOutputStream; import java.io.IOException; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.hwpf.model.io.HWPFFileSystem; import org.apache.poi.util.Internal; import org.apache.poi.util.LittleEndian; @@ -36,7 +36,7 @@ import org.apache.poi.util.LittleEndianConsts; @Internal public final class FontTable { - private static final Logger LOG = LogManager.getLogger(FontTable.class); + private static final Logger LOG = PoiLogManager.getLogger(FontTable.class); private short _stringCount;// how many strings are included in the string table private short _extraDataSz;// size in bytes of the extra data diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/ListLevel.java b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/ListLevel.java index ca8e1bb9df..769cdd7b79 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/ListLevel.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/ListLevel.java @@ -19,8 +19,8 @@ package org.apache.poi.hwpf.model; import java.util.Arrays; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.hwpf.model.types.LVLFAbstractType; import org.apache.poi.util.IOUtils; import org.apache.poi.util.Internal; @@ -45,7 +45,7 @@ public final class ListLevel //arbitrarily selected; may need to increase private static final int MAX_RECORD_LENGTH = 10_485_760; - private static final Logger LOG = LogManager.getLogger(ListLevel.class); + private static final Logger LOG = PoiLogManager.getLogger(ListLevel.class); private byte[] _grpprlChpx; private byte[] _grpprlPapx; diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/ListTables.java b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/ListTables.java index 1ae1679046..46b0df755e 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/ListTables.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/ListTables.java @@ -23,8 +23,8 @@ import java.util.LinkedHashMap; import java.util.NoSuchElementException; import java.util.Objects; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.hwpf.model.types.LSTFAbstractType; import org.apache.poi.util.Internal; import org.apache.poi.util.LittleEndian; @@ -35,7 +35,7 @@ import static org.apache.logging.log4j.util.Unbox.box; @Internal public final class ListTables { - private static final Logger LOGGER = LogManager.getLogger(ListTables.class); + private static final Logger LOGGER = PoiLogManager.getLogger(ListTables.class); /** * Both PlfLst and the following LVLs diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/NilPICFAndBinData.java b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/NilPICFAndBinData.java index c20d39ff66..90388c3830 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/NilPICFAndBinData.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/NilPICFAndBinData.java @@ -18,8 +18,8 @@ package org.apache.poi.hwpf.model; import java.util.Arrays; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.util.IOUtils; import org.apache.poi.util.LittleEndian; import org.apache.poi.util.LittleEndianConsts; @@ -28,7 +28,7 @@ import static java.lang.Integer.toHexString; import static org.apache.logging.log4j.util.Unbox.box; public class NilPICFAndBinData { - private static final Logger LOGGER = LogManager.getLogger(NilPICFAndBinData.class); + private static final Logger LOGGER = PoiLogManager.getLogger(NilPICFAndBinData.class); // limit the default maximum length of the allocated fields private static final int MAX_SIZE = 100_000; diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/OfficeArtContent.java b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/OfficeArtContent.java index 5912dd23cc..3b4e547780 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/OfficeArtContent.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/OfficeArtContent.java @@ -20,8 +20,8 @@ package org.apache.poi.hwpf.model; import java.util.ArrayList; import java.util.List; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.ddf.DefaultEscherRecordFactory; import org.apache.poi.ddf.EscherContainerRecord; import org.apache.poi.ddf.EscherRecord; @@ -38,7 +38,7 @@ import static org.apache.logging.log4j.util.Unbox.box; */ @Internal public final class OfficeArtContent { - protected static final Logger LOG = LogManager.getLogger(OfficeArtContent.class); + protected static final Logger LOG = PoiLogManager.getLogger(OfficeArtContent.class); /** * {@link EscherRecordTypes#DGG_CONTAINER} containing drawing group information for the document. @@ -117,7 +117,7 @@ public final class OfficeArtContent { headerDocumentDgContainer = dgContainer; break; default: - LogManager.getLogger(OfficeArtContent.class).atWarn() + PoiLogManager.getLogger(OfficeArtContent.class).atWarn() .log("dgglbl {} for OfficeArtWordDrawing is out of bounds [0, 1]", box(dgglbl)); } } diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/OldFfn.java b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/OldFfn.java index 38c0d53cab..e0b9b59007 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/OldFfn.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/OldFfn.java @@ -19,8 +19,8 @@ package org.apache.poi.hwpf.model; import java.nio.charset.Charset; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.common.usermodel.fonts.FontCharset; import org.apache.poi.util.Internal; import org.apache.poi.util.LittleEndianConsts; @@ -34,7 +34,7 @@ import static org.apache.logging.log4j.util.Unbox.box; @Internal public final class OldFfn { - private static final Logger LOG = LogManager.getLogger(OldFfn.class); + private static final Logger LOG = PoiLogManager.getLogger(OldFfn.class); private final byte _chs;// character set identifier diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/OldFontTable.java b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/OldFontTable.java index d4935a1ba6..41216b8ae4 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/OldFontTable.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/OldFontTable.java @@ -21,8 +21,8 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.util.Internal; import org.apache.poi.util.LittleEndian; import org.apache.poi.util.LittleEndianConsts; @@ -32,7 +32,7 @@ import org.apache.poi.util.LittleEndianConsts; */ @Internal public final class OldFontTable { - private static final Logger LOG = LogManager.getLogger(OldFontTable.class); + private static final Logger LOG = PoiLogManager.getLogger(OldFontTable.class); // added extra facilitator members // FFN structure containing strings of font names diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/PAPBinTable.java b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/PAPBinTable.java index 03b231a9e5..32e9ca9a36 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/PAPBinTable.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/PAPBinTable.java @@ -26,8 +26,8 @@ import java.util.LinkedList; import java.util.List; import java.util.Map; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.hwpf.sprm.SprmBuffer; import org.apache.poi.hwpf.sprm.SprmIterator; import org.apache.poi.hwpf.sprm.SprmOperation; @@ -46,7 +46,7 @@ import static org.apache.logging.log4j.util.Unbox.box; @Internal public class PAPBinTable { - private static final Logger LOG = LogManager.getLogger(PAPBinTable.class); + private static final Logger LOG = PoiLogManager.getLogger(PAPBinTable.class); protected final ArrayList<PAPX> _paragraphs = new ArrayList<>(); diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/PICFAndOfficeArtData.java b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/PICFAndOfficeArtData.java index 5885cff08f..e994b7f8e6 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/PICFAndOfficeArtData.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/PICFAndOfficeArtData.java @@ -19,8 +19,8 @@ package org.apache.poi.hwpf.model; import java.util.LinkedList; import java.util.List; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.ddf.DefaultEscherRecordFactory; import org.apache.poi.ddf.EscherBSERecord; import org.apache.poi.ddf.EscherBlipRecord; @@ -35,7 +35,7 @@ import org.apache.poi.util.LittleEndian; @Internal public class PICFAndOfficeArtData { - private static final Logger LOG = LogManager.getLogger(PicturesTable.class); + private static final Logger LOG = PoiLogManager.getLogger(PicturesTable.class); /** * Can contain either a {@link EscherBlipRecord} or a {@link EscherBSERecord}. diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/PicturesTable.java b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/PicturesTable.java index 45e726e564..5c1528c56b 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/PicturesTable.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/PicturesTable.java @@ -23,8 +23,8 @@ import java.io.OutputStream; import java.util.ArrayList; import java.util.List; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.ddf.DefaultEscherRecordFactory; import org.apache.poi.ddf.EscherBSERecord; import org.apache.poi.ddf.EscherBlipRecord; @@ -55,7 +55,7 @@ import org.apache.poi.util.LittleEndian; */ @Internal public final class PicturesTable { - private static final Logger LOG = LogManager.getLogger(PicturesTable.class); + private static final Logger LOG = PoiLogManager.getLogger(PicturesTable.class); static final int TYPE_IMAGE = 0x08; static final int TYPE_IMAGE_WORD2000 = 0x00; diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/PlfLfo.java b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/PlfLfo.java index a9f54d32c9..ba8e39b26c 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/PlfLfo.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/PlfLfo.java @@ -23,8 +23,8 @@ import java.io.IOException; import java.util.Arrays; import java.util.NoSuchElementException; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.hwpf.model.types.LFOAbstractType; import org.apache.poi.util.IOUtils; import org.apache.poi.util.LittleEndian; @@ -39,7 +39,7 @@ import static org.apache.logging.log4j.util.Unbox.box; * Binary File Format */ public class PlfLfo { - private static final Logger LOGGER = LogManager.getLogger(PlfLfo.class); + private static final Logger LOGGER = PoiLogManager.getLogger(PlfLfo.class); private static final int MAX_NUMBER_OF_LFO = 100_000; diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/PropertyNode.java b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/PropertyNode.java index 7784e41255..ceb771ed39 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/PropertyNode.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/PropertyNode.java @@ -21,8 +21,8 @@ import java.util.Arrays; import java.util.Comparator; import java.util.Objects; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.common.Duplicatable; import org.apache.poi.util.Internal; @@ -42,7 +42,7 @@ public abstract class PropertyNode<T extends PropertyNode<T>> implements Compara public static final Comparator<PropertyNode<?>> StartComparator = Comparator.comparingInt(PropertyNode::getStart); - private static final Logger LOG = LogManager.getLogger(PropertyNode.class); + private static final Logger LOG = PoiLogManager.getLogger(PropertyNode.class); protected Object _buf; diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/SectionTable.java b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/SectionTable.java index 35e74bf10d..efdfeb26cb 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/SectionTable.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/SectionTable.java @@ -22,8 +22,8 @@ import java.io.IOException; import java.util.ArrayList; import java.util.List; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.hwpf.HWPFDocument; import org.apache.poi.hwpf.model.io.HWPFFileSystem; import org.apache.poi.util.IOUtils; @@ -34,7 +34,7 @@ import org.apache.poi.util.LittleEndianConsts; @Internal public class SectionTable { - private static final Logger LOG = LogManager.getLogger(SectionTable.class); + private static final Logger LOG = PoiLogManager.getLogger(SectionTable.class); private static final int SED_SIZE = 12; protected List<SEPX> _sections = new ArrayList<>(); diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/Sttb.java b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/Sttb.java index 2a0861f922..fc6763ddef 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/Sttb.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/Sttb.java @@ -18,7 +18,7 @@ package org.apache.poi.hwpf.model; import java.util.Arrays; -import org.apache.logging.log4j.LogManager; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.util.Internal; import org.apache.poi.util.LittleEndian; import org.apache.poi.util.LittleEndianConsts; @@ -71,7 +71,7 @@ public class Sttb if ( ffff != (short) 0xffff ) { - LogManager.getLogger(Sttb.class).atWarn().log( + PoiLogManager.getLogger(Sttb.class).atWarn().log( "Non-extended character Pascal strings are not supported right now. " + "Creating empty values in the RevisionMarkAuthorTable for now. " + "Please, contact POI developers for update." diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/StyleDescription.java b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/StyleDescription.java index 976ab1ed82..92e3bb1d94 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/StyleDescription.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/StyleDescription.java @@ -20,8 +20,8 @@ package org.apache.poi.hwpf.model; import java.util.Arrays; import java.util.Objects; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.hwpf.model.types.StdfBaseAbstractType; import org.apache.poi.hwpf.usermodel.CharacterProperties; import org.apache.poi.hwpf.usermodel.ParagraphProperties; @@ -36,7 +36,7 @@ import static org.apache.logging.log4j.util.Unbox.box; @Internal public final class StyleDescription { - private static final Logger LOG = LogManager.getLogger(StyleDescription.class); + private static final Logger LOG = PoiLogManager.getLogger(StyleDescription.class); private static final int PARAGRAPH_STYLE = 1; private static final int CHARACTER_STYLE = 2; diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/StyleSheet.java b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/StyleSheet.java index 72d414ac26..50205ae033 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/StyleSheet.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/StyleSheet.java @@ -20,8 +20,8 @@ package org.apache.poi.hwpf.model; import java.io.IOException; import java.io.OutputStream; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.hwpf.sprm.CharacterSprmUncompressor; import org.apache.poi.hwpf.sprm.ParagraphSprmUncompressor; import org.apache.poi.hwpf.usermodel.CharacterProperties; @@ -41,7 +41,7 @@ import org.apache.poi.util.LittleEndianConsts; */ @Internal public final class StyleSheet { - private static final Logger LOG = LogManager.getLogger(StyleSheet.class); + private static final Logger LOG = PoiLogManager.getLogger(StyleSheet.class); public static final int NIL_STYLE = 4095; // private static final int PAP_TYPE = 1; diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/TextPieceTable.java b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/TextPieceTable.java index ded50c1357..e011f7f819 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/TextPieceTable.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/TextPieceTable.java @@ -24,8 +24,8 @@ import java.util.Comparator; import java.util.LinkedList; import java.util.List; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.poifs.common.POIFSConstants; import org.apache.poi.util.IOUtils; import org.apache.poi.util.Internal; @@ -40,7 +40,7 @@ import static org.apache.logging.log4j.util.Unbox.box; */ @Internal public class TextPieceTable implements CharIndexTranslator { - private static final Logger LOG = LogManager.getLogger(TextPieceTable.class); + private static final Logger LOG = PoiLogManager.getLogger(TextPieceTable.class); //arbitrarily selected; may need to increase private static final int DEFAULT_MAX_RECORD_LENGTH = 100_000_000; private static int MAX_RECORD_LENGTH = DEFAULT_MAX_RECORD_LENGTH; diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/Xstz.java b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/Xstz.java index 34acfb99dc..4ee0d75eee 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/Xstz.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/model/Xstz.java @@ -16,8 +16,8 @@ ==================================================================== */ package org.apache.poi.hwpf.model; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.util.Internal; import org.apache.poi.util.LittleEndian; import org.apache.poi.util.LittleEndianConsts; @@ -27,7 +27,7 @@ import static org.apache.logging.log4j.util.Unbox.box; @Internal public class Xstz { - private static final Logger LOGGER = LogManager.getLogger(Xstz.class); + private static final Logger LOGGER = PoiLogManager.getLogger(Xstz.class); private final short _chTerm = 0; private Xst _xst; diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/sprm/CharacterSprmUncompressor.java b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/sprm/CharacterSprmUncompressor.java index 372393945e..7565b1aedb 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/sprm/CharacterSprmUncompressor.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/sprm/CharacterSprmUncompressor.java @@ -17,8 +17,8 @@ package org.apache.poi.hwpf.sprm; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.hwpf.usermodel.ShadingDescriptor80; import org.apache.poi.hwpf.model.Colorref; @@ -34,7 +34,7 @@ import org.apache.poi.util.LittleEndian; @Internal public final class CharacterSprmUncompressor extends SprmUncompressor { - private static final Logger LOG = LogManager.getLogger(CharacterSprmUncompressor.class); + private static final Logger LOG = PoiLogManager.getLogger(CharacterSprmUncompressor.class); public CharacterSprmUncompressor() { diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/sprm/ParagraphSprmUncompressor.java b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/sprm/ParagraphSprmUncompressor.java index d1d41919fc..9ee25a7fb0 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/sprm/ParagraphSprmUncompressor.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/sprm/ParagraphSprmUncompressor.java @@ -24,8 +24,8 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.hwpf.model.TabDescriptor; import org.apache.poi.hwpf.model.types.TBDAbstractType; import org.apache.poi.hwpf.usermodel.BorderCode; @@ -44,7 +44,7 @@ import static org.apache.logging.log4j.util.Unbox.box; @Internal public final class ParagraphSprmUncompressor extends SprmUncompressor { - private static final Logger LOG = LogManager.getLogger(ParagraphSprmUncompressor.class); + private static final Logger LOG = PoiLogManager.getLogger(ParagraphSprmUncompressor.class); public ParagraphSprmUncompressor() { diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/sprm/SectionSprmUncompressor.java b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/sprm/SectionSprmUncompressor.java index eee1943227..10ed6ffbc2 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/sprm/SectionSprmUncompressor.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/sprm/SectionSprmUncompressor.java @@ -19,10 +19,10 @@ package org.apache.poi.hwpf.sprm; import java.util.Arrays; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.poi.hwpf.usermodel.BorderCode; import org.apache.poi.hwpf.usermodel.SectionProperties; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.util.Internal; import static org.apache.logging.log4j.util.Unbox.box; @@ -32,7 +32,7 @@ import static org.apache.poi.util.HexDump.byteToHex; @Internal public final class SectionSprmUncompressor extends SprmUncompressor { - private static final Logger LOG = LogManager.getLogger(SectionSprmUncompressor.class); + private static final Logger LOG = PoiLogManager.getLogger(SectionSprmUncompressor.class); public SectionSprmUncompressor() { diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/sprm/TableSprmUncompressor.java b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/sprm/TableSprmUncompressor.java index e227403227..5cf224f059 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/sprm/TableSprmUncompressor.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/sprm/TableSprmUncompressor.java @@ -17,18 +17,18 @@ package org.apache.poi.hwpf.sprm; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.poi.hwpf.usermodel.BorderCode; import org.apache.poi.hwpf.usermodel.TableCellDescriptor; import org.apache.poi.hwpf.usermodel.TableProperties; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.util.Internal; import org.apache.poi.util.LittleEndian; @Internal public final class TableSprmUncompressor extends SprmUncompressor { - private static final Logger LOG = LogManager.getLogger(TableSprmUncompressor.class); + private static final Logger LOG = PoiLogManager.getLogger(TableSprmUncompressor.class); public TableSprmUncompressor() { } diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/usermodel/Paragraph.java b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/usermodel/Paragraph.java index d328baccea..285d73402c 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/usermodel/Paragraph.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/usermodel/Paragraph.java @@ -19,7 +19,6 @@ package org.apache.poi.hwpf.usermodel; import java.util.NoSuchElementException; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.poi.common.Duplicatable; import org.apache.poi.hwpf.HWPFDocumentCore; @@ -31,12 +30,13 @@ import org.apache.poi.hwpf.model.StyleSheet; import org.apache.poi.hwpf.sprm.ParagraphSprmUncompressor; import org.apache.poi.hwpf.sprm.SprmBuffer; import org.apache.poi.hwpf.sprm.TableSprmCompressor; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.util.Internal; import static org.apache.logging.log4j.util.Unbox.box; public class Paragraph extends Range implements Duplicatable { - private static final Logger LOGGER = LogManager.getLogger(Paragraph.class); + private static final Logger LOGGER = PoiLogManager.getLogger(Paragraph.class); public static final short SPRM_JC = 0x2403; public static final short SPRM_FSIDEBYSIDE = 0x2404; diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/usermodel/Picture.java b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/usermodel/Picture.java index 7ba7892b28..77c695c3d0 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/usermodel/Picture.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/usermodel/Picture.java @@ -25,7 +25,6 @@ import java.util.zip.InflaterInputStream; import org.apache.commons.io.input.UnsynchronizedByteArrayInputStream; import org.apache.commons.io.output.UnsynchronizedByteArrayOutputStream; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.poi.ddf.EscherBSERecord; import org.apache.poi.ddf.EscherBlipRecord; @@ -39,6 +38,7 @@ import org.apache.poi.ddf.EscherRecordTypes; import org.apache.poi.ddf.EscherSimpleProperty; import org.apache.poi.hwpf.model.PICF; import org.apache.poi.hwpf.model.PICFAndOfficeArtData; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.sl.image.ImageHeaderPNG; import org.apache.poi.util.IOUtils; import org.apache.poi.util.StringUtil; @@ -48,7 +48,7 @@ import org.apache.poi.util.Units; * Represents embedded picture extracted from Word Document */ public final class Picture { - private static final Logger LOGGER = LogManager.getLogger(Picture.class); + private static final Logger LOGGER = PoiLogManager.getLogger(Picture.class); private static final byte[] COMPRESSED1 = { (byte) 0xFE, 0x78, (byte) 0xDA }; diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/usermodel/Range.java b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/usermodel/Range.java index 08d3840e56..6567af6b93 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/usermodel/Range.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/usermodel/Range.java @@ -22,7 +22,6 @@ import static org.apache.logging.log4j.util.Unbox.box; import java.util.List; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.poi.hwpf.HWPFDocument; import org.apache.poi.hwpf.HWPFDocumentCore; @@ -36,6 +35,7 @@ import org.apache.poi.hwpf.model.SubdocumentType; import org.apache.poi.hwpf.sprm.CharacterSprmCompressor; import org.apache.poi.hwpf.sprm.ParagraphSprmCompressor; import org.apache.poi.hwpf.sprm.SprmBuffer; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.util.DocumentFormatException; import org.apache.poi.util.Internal; import org.apache.poi.util.LittleEndian; @@ -54,7 +54,7 @@ import org.apache.poi.util.LittleEndianConsts; */ public class Range { - private static final Logger LOG = LogManager.getLogger(Range.class); + private static final Logger LOG = PoiLogManager.getLogger(Range.class); /** * @deprecated POI 3.8 beta 5 diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/usermodel/TableRow.java b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/usermodel/TableRow.java index 684984ff3c..68b6e74476 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/usermodel/TableRow.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/usermodel/TableRow.java @@ -20,8 +20,8 @@ package org.apache.poi.hwpf.usermodel; import java.util.ArrayList; import java.util.List; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.hwpf.sprm.SprmBuffer; import org.apache.poi.hwpf.sprm.TableSprmUncompressor; @@ -29,7 +29,7 @@ import static org.apache.logging.log4j.util.Unbox.box; public final class TableRow extends Range { - private static final Logger LOG = LogManager.getLogger(TableRow.class); + private static final Logger LOG = PoiLogManager.getLogger(TableRow.class); private static final short SPRM_DXAGAPHALF = (short) 0x9602; private static final short SPRM_DYAROWHEIGHT = (short) 0x9407; diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/util/LittleEndianCP950Reader.java b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/util/LittleEndianCP950Reader.java index 27f796c11e..6c3774de47 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hwpf/util/LittleEndianCP950Reader.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hwpf/util/LittleEndianCP950Reader.java @@ -23,9 +23,9 @@ import java.nio.ByteBuffer; import java.nio.CharBuffer; import java.nio.charset.CharsetDecoder; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.message.SimpleMessage; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.util.Internal; /** @@ -35,7 +35,7 @@ import org.apache.poi.util.Internal; @Internal public class LittleEndianCP950Reader extends Reader { - private static final Logger LOGGER = LogManager.getLogger(LittleEndianCP950Reader.class); + private static final Logger LOGGER = PoiLogManager.getLogger(LittleEndianCP950Reader.class); private static final char UNMAPPABLE = '?'; private final ByteBuffer doubleByteBuffer = ByteBuffer.allocate(2); diff --git a/poi-scratchpad/src/test/java/org/apache/poi/hwpf/converter/TestWordToTextConverter.java b/poi-scratchpad/src/test/java/org/apache/poi/hwpf/converter/TestWordToTextConverter.java index d469f00015..9e66096b3c 100644 --- a/poi-scratchpad/src/test/java/org/apache/poi/hwpf/converter/TestWordToTextConverter.java +++ b/poi-scratchpad/src/test/java/org/apache/poi/hwpf/converter/TestWordToTextConverter.java @@ -29,12 +29,12 @@ import java.util.List; import java.util.Locale; import java.util.stream.Stream; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.poi.EncryptedDocumentException; import org.apache.poi.POIDataSamples; import org.apache.poi.hwpf.HWPFDocument; import org.apache.poi.hwpf.OldWordFileFormatException; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.poifs.filesystem.FileMagic; import org.apache.poi.util.RecordFormatException; import org.junit.jupiter.api.Test; @@ -43,7 +43,7 @@ import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; public class TestWordToTextConverter { - private static final Logger LOG = LogManager.getLogger(TestWordToTextConverter.class); + private static final Logger LOG = PoiLogManager.getLogger(TestWordToTextConverter.class); private static final List<String> failingFiles = Arrays.asList( // Excel file diff --git a/poi/src/main/java/org/apache/poi/POIDocument.java b/poi/src/main/java/org/apache/poi/POIDocument.java index ab312bccd3..746e9d4ffc 100644 --- a/poi/src/main/java/org/apache/poi/POIDocument.java +++ b/poi/src/main/java/org/apache/poi/POIDocument.java @@ -31,8 +31,8 @@ import java.security.GeneralSecurityException; import java.util.List; import org.apache.commons.io.output.UnsynchronizedByteArrayOutputStream; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.hpsf.DocumentSummaryInformation; import org.apache.poi.hpsf.PropertySet; import org.apache.poi.hpsf.PropertySetFactory; @@ -62,7 +62,7 @@ public abstract class POIDocument implements Closeable { private DirectoryNode directory; /** For our own logging use */ - private static final Logger LOG = LogManager.getLogger(POIDocument.class); + private static final Logger LOG = PoiLogManager.getLogger(POIDocument.class); /* Have the property streams been read yet? (Only done on-demand) */ private boolean initialized; diff --git a/poi/src/main/java/org/apache/poi/common/usermodel/fonts/FontCharset.java b/poi/src/main/java/org/apache/poi/common/usermodel/fonts/FontCharset.java index 044765738f..a828c1cc03 100644 --- a/poi/src/main/java/org/apache/poi/common/usermodel/fonts/FontCharset.java +++ b/poi/src/main/java/org/apache/poi/common/usermodel/fonts/FontCharset.java @@ -20,8 +20,8 @@ package org.apache.poi.common.usermodel.fonts; import java.nio.charset.Charset; import java.nio.charset.UnsupportedCharsetException; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; /** * Charset represents the basic set of characters associated with a font (that it can display), and @@ -99,7 +99,7 @@ public enum FontCharset { charset = Charset.forName(javaCharsetName); return; } catch (UnsupportedCharsetException e) { - Logger logger = LogManager.getLogger(FontCharset.class); + Logger logger = PoiLogManager.getLogger(FontCharset.class); logger.atWarn().log("Unsupported charset: {}", javaCharsetName); } } diff --git a/poi/src/main/java/org/apache/poi/ddf/EscherContainerRecord.java b/poi/src/main/java/org/apache/poi/ddf/EscherContainerRecord.java index 8a0e555736..e343bd86b5 100644 --- a/poi/src/main/java/org/apache/poi/ddf/EscherContainerRecord.java +++ b/poi/src/main/java/org/apache/poi/ddf/EscherContainerRecord.java @@ -26,8 +26,8 @@ import java.util.Map; import java.util.Spliterator; import java.util.function.Supplier; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.util.GenericRecordUtil; import org.apache.poi.util.HexDump; import org.apache.poi.util.LittleEndian; @@ -48,7 +48,7 @@ public final class EscherContainerRecord extends EscherRecord implements Iterabl public static final short SP_CONTAINER = EscherRecordTypes.SP_CONTAINER.typeID; public static final short SOLVER_CONTAINER = EscherRecordTypes.SOLVER_CONTAINER.typeID; - private static final Logger LOGGER = LogManager.getLogger(EscherContainerRecord.class); + private static final Logger LOGGER = PoiLogManager.getLogger(EscherContainerRecord.class); private static final int MAX_NESTED_CHILD_NODES = 1000; diff --git a/poi/src/main/java/org/apache/poi/ddf/EscherMetafileBlip.java b/poi/src/main/java/org/apache/poi/ddf/EscherMetafileBlip.java index cc44cf91ba..f1d2f386bb 100644 --- a/poi/src/main/java/org/apache/poi/ddf/EscherMetafileBlip.java +++ b/poi/src/main/java/org/apache/poi/ddf/EscherMetafileBlip.java @@ -31,15 +31,15 @@ import java.util.zip.InflaterInputStream; import org.apache.commons.io.input.UnsynchronizedByteArrayInputStream; import org.apache.commons.io.output.UnsynchronizedByteArrayOutputStream; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.hssf.usermodel.HSSFPictureData; import org.apache.poi.util.IOUtils; import org.apache.poi.util.LittleEndian; import org.apache.poi.util.Removal; public final class EscherMetafileBlip extends EscherBlipRecord { - private static final Logger LOGGER = LogManager.getLogger(EscherMetafileBlip.class); + private static final Logger LOGGER = PoiLogManager.getLogger(EscherMetafileBlip.class); //arbitrarily selected; may need to increase private static final int DEFAULT_MAX_RECORD_LENGTH = 100_000_000; private static int MAX_RECORD_LENGTH = DEFAULT_MAX_RECORD_LENGTH; diff --git a/poi/src/main/java/org/apache/poi/extractor/ExtractorFactory.java b/poi/src/main/java/org/apache/poi/extractor/ExtractorFactory.java index ea3ee82f9a..68a02c82cc 100644 --- a/poi/src/main/java/org/apache/poi/extractor/ExtractorFactory.java +++ b/poi/src/main/java/org/apache/poi/extractor/ExtractorFactory.java @@ -27,8 +27,8 @@ import java.util.List; import java.util.ServiceLoader; import java.util.stream.StreamSupport; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.EmptyFileException; import org.apache.poi.hssf.extractor.ExcelExtractor; import org.apache.poi.poifs.crypt.Decryptor; @@ -61,7 +61,7 @@ public final class ExtractorFactory { */ public static final String OOXML_PACKAGE = "Package"; - private static final Logger LOGGER = LogManager.getLogger(ExtractorFactory.class); + private static final Logger LOGGER = PoiLogManager.getLogger(ExtractorFactory.class); /** Should this thread prefer event based over usermodel based extractors? */ private static final ThreadLocal<Boolean> threadPreferEventExtractors = ThreadLocal.withInitial(() -> Boolean.FALSE); diff --git a/poi/src/main/java/org/apache/poi/hpsf/ClipboardData.java b/poi/src/main/java/org/apache/poi/hpsf/ClipboardData.java index 8872b7efc1..e0d62d5e90 100644 --- a/poi/src/main/java/org/apache/poi/hpsf/ClipboardData.java +++ b/poi/src/main/java/org/apache/poi/hpsf/ClipboardData.java @@ -16,8 +16,8 @@ ==================================================================== */ package org.apache.poi.hpsf; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.util.IOUtils; import org.apache.poi.util.Internal; import org.apache.poi.util.LittleEndian; @@ -32,7 +32,7 @@ public class ClipboardData { private static final int DEFAULT_MAX_RECORD_LENGTH = 100_000_000; private static int MAX_RECORD_LENGTH = DEFAULT_MAX_RECORD_LENGTH; - private static final Logger LOG = LogManager.getLogger(ClipboardData.class); + private static final Logger LOG = PoiLogManager.getLogger(ClipboardData.class); private int _format; private byte[] _value; diff --git a/poi/src/main/java/org/apache/poi/hpsf/CodePageString.java b/poi/src/main/java/org/apache/poi/hpsf/CodePageString.java index 3217211b8f..05729510cf 100644 --- a/poi/src/main/java/org/apache/poi/hpsf/CodePageString.java +++ b/poi/src/main/java/org/apache/poi/hpsf/CodePageString.java @@ -16,8 +16,8 @@ ==================================================================== */ package org.apache.poi.hpsf; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.util.*; import java.io.IOException; @@ -32,7 +32,7 @@ public class CodePageString { private static final int DEFAULT_MAX_RECORD_LENGTH = 100_000; private static int MAX_RECORD_LENGTH = DEFAULT_MAX_RECORD_LENGTH; - private static final Logger LOG = LogManager.getLogger(CodePageString.class); + private static final Logger LOG = PoiLogManager.getLogger(CodePageString.class); private byte[] _value; diff --git a/poi/src/main/java/org/apache/poi/hpsf/CustomProperties.java b/poi/src/main/java/org/apache/poi/hpsf/CustomProperties.java index 64891fbf19..709c181d61 100644 --- a/poi/src/main/java/org/apache/poi/hpsf/CustomProperties.java +++ b/poi/src/main/java/org/apache/poi/hpsf/CustomProperties.java @@ -31,8 +31,8 @@ import java.util.Map; import java.util.Set; import org.apache.commons.collections4.bidimap.TreeBidiMap; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.hpsf.wellknown.PropertyIDMap; import org.apache.poi.util.CodePageUtil; @@ -67,7 +67,7 @@ import static org.apache.logging.log4j.util.Unbox.box; * HashMap<String,Object> mapping between Names and Custom Property Values. */ public class CustomProperties implements Map<String,Object> { - private static final Logger LOG = LogManager.getLogger(CustomProperties.class); + private static final Logger LOG = PoiLogManager.getLogger(CustomProperties.class); /** * The custom properties diff --git a/poi/src/main/java/org/apache/poi/hpsf/Property.java b/poi/src/main/java/org/apache/poi/hpsf/Property.java index 1981f8b6e5..ab6d8e1017 100644 --- a/poi/src/main/java/org/apache/poi/hpsf/Property.java +++ b/poi/src/main/java/org/apache/poi/hpsf/Property.java @@ -31,8 +31,8 @@ import java.util.Objects; import java.util.concurrent.TimeUnit; import org.apache.commons.io.output.UnsynchronizedByteArrayOutputStream; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.hpsf.wellknown.PropertyIDMap; import org.apache.poi.util.CodePageUtil; import org.apache.poi.util.HexDump; @@ -73,7 +73,7 @@ public class Property { */ public static final int DEFAULT_CODEPAGE = CodePageUtil.CP_WINDOWS_1252; - private static final Logger LOG = LogManager.getLogger(Property.class); + private static final Logger LOG = PoiLogManager.getLogger(Property.class); /** The property's ID. */ private long id; diff --git a/poi/src/main/java/org/apache/poi/hpsf/Section.java b/poi/src/main/java/org/apache/poi/hpsf/Section.java index 1f127fb48a..898ba7d28b 100644 --- a/poi/src/main/java/org/apache/poi/hpsf/Section.java +++ b/poi/src/main/java/org/apache/poi/hpsf/Section.java @@ -31,8 +31,8 @@ import java.util.TreeMap; import org.apache.commons.collections4.bidimap.TreeBidiMap; import org.apache.commons.io.output.UnsynchronizedByteArrayOutputStream; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.hpsf.wellknown.PropertyIDMap; import org.apache.poi.util.CodePageUtil; import org.apache.poi.util.IOUtils; @@ -46,7 +46,7 @@ import org.apache.poi.util.LittleEndianOutputStream; */ public class Section { - private static final Logger LOG = LogManager.getLogger(Section.class); + private static final Logger LOG = PoiLogManager.getLogger(Section.class); /** * Maps property IDs to section-private PID strings. These diff --git a/poi/src/main/java/org/apache/poi/hpsf/TypedPropertyValue.java b/poi/src/main/java/org/apache/poi/hpsf/TypedPropertyValue.java index 2be08b3b09..45315c6b95 100644 --- a/poi/src/main/java/org/apache/poi/hpsf/TypedPropertyValue.java +++ b/poi/src/main/java/org/apache/poi/hpsf/TypedPropertyValue.java @@ -20,8 +20,8 @@ package org.apache.poi.hpsf; import java.math.BigInteger; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.util.Internal; import org.apache.poi.util.LittleEndianByteArrayInputStream; import org.apache.poi.util.LittleEndianConsts; @@ -30,7 +30,7 @@ import static org.apache.logging.log4j.util.Unbox.box; @Internal public class TypedPropertyValue { - private static final Logger LOG = LogManager.getLogger(TypedPropertyValue.class); + private static final Logger LOG = PoiLogManager.getLogger(TypedPropertyValue.class); private int _type; private Object _value; diff --git a/poi/src/main/java/org/apache/poi/hpsf/UnicodeString.java b/poi/src/main/java/org/apache/poi/hpsf/UnicodeString.java index e89e47e5a0..99f2ded8e7 100644 --- a/poi/src/main/java/org/apache/poi/hpsf/UnicodeString.java +++ b/poi/src/main/java/org/apache/poi/hpsf/UnicodeString.java @@ -20,8 +20,8 @@ import java.io.IOException; import java.io.OutputStream; import java.io.UnsupportedEncodingException; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.util.CodePageUtil; import org.apache.poi.util.IOUtils; import org.apache.poi.util.Internal; @@ -32,7 +32,7 @@ import org.apache.poi.util.StringUtil; @Internal public class UnicodeString { - private static final Logger LOG = LogManager.getLogger(UnicodeString.class); + private static final Logger LOG = PoiLogManager.getLogger(UnicodeString.class); private byte[] _value; diff --git a/poi/src/main/java/org/apache/poi/hpsf/VariantBool.java b/poi/src/main/java/org/apache/poi/hpsf/VariantBool.java index 0f59164688..7ab540dc3c 100644 --- a/poi/src/main/java/org/apache/poi/hpsf/VariantBool.java +++ b/poi/src/main/java/org/apache/poi/hpsf/VariantBool.java @@ -16,8 +16,8 @@ ==================================================================== */ package org.apache.poi.hpsf; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.util.Internal; import org.apache.poi.util.LittleEndianByteArrayInputStream; @@ -25,7 +25,7 @@ import static org.apache.logging.log4j.util.Unbox.box; @Internal public class VariantBool { - private static final Logger LOG = LogManager.getLogger(VariantBool.class); + private static final Logger LOG = PoiLogManager.getLogger(VariantBool.class); static final int SIZE = 2; diff --git a/poi/src/main/java/org/apache/poi/hpsf/VariantSupport.java b/poi/src/main/java/org/apache/poi/hpsf/VariantSupport.java index 39ef7e2431..5cc4629461 100644 --- a/poi/src/main/java/org/apache/poi/hpsf/VariantSupport.java +++ b/poi/src/main/java/org/apache/poi/hpsf/VariantSupport.java @@ -25,8 +25,8 @@ import java.util.Date; import java.util.LinkedList; import java.util.List; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.util.IOUtils; import org.apache.poi.util.LittleEndian; import org.apache.poi.util.LittleEndianByteArrayInputStream; @@ -58,7 +58,7 @@ public class VariantSupport extends Variant { Variant.VT_CF, Variant.VT_BOOL }; - private static final Logger LOG = LogManager.getLogger(VariantSupport.class); + private static final Logger LOG = PoiLogManager.getLogger(VariantSupport.class); private static boolean logUnsupportedTypes; diff --git a/poi/src/main/java/org/apache/poi/hssf/eventusermodel/FormatTrackingHSSFListener.java b/poi/src/main/java/org/apache/poi/hssf/eventusermodel/FormatTrackingHSSFListener.java index a465a274d9..43969f184f 100644 --- a/poi/src/main/java/org/apache/poi/hssf/eventusermodel/FormatTrackingHSSFListener.java +++ b/poi/src/main/java/org/apache/poi/hssf/eventusermodel/FormatTrackingHSSFListener.java @@ -23,8 +23,8 @@ import java.util.List; import java.util.Locale; import java.util.Map; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.hssf.record.CellValueRecordInterface; import org.apache.poi.hssf.record.ExtendedFormatRecord; import org.apache.poi.hssf.record.FormatRecord; @@ -43,7 +43,7 @@ import static org.apache.logging.log4j.util.Unbox.box; * ids. */ public class FormatTrackingHSSFListener implements HSSFListener { - private static final Logger LOG = LogManager.getLogger(FormatTrackingHSSFListener.class); + private static final Logger LOG = PoiLogManager.getLogger(FormatTrackingHSSFListener.class); private final HSSFListener _childListener; private final HSSFDataFormatter _formatter; private final NumberFormat _defaultFormat; diff --git a/poi/src/main/java/org/apache/poi/hssf/model/InternalSheet.java b/poi/src/main/java/org/apache/poi/hssf/model/InternalSheet.java index 723025969f..570494d830 100644 --- a/poi/src/main/java/org/apache/poi/hssf/model/InternalSheet.java +++ b/poi/src/main/java/org/apache/poi/hssf/model/InternalSheet.java @@ -21,8 +21,8 @@ import java.util.ArrayList; import java.util.Iterator; import java.util.List; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.hssf.record.*; import org.apache.poi.hssf.record.Record; import org.apache.poi.hssf.record.aggregates.ChartSubstreamRecordAggregate; @@ -68,7 +68,7 @@ public final class InternalSheet { public static final short TopMargin = 2; public static final short BottomMargin = 3; - private static final Logger LOGGER = LogManager.getLogger(InternalSheet.class); + private static final Logger LOGGER = PoiLogManager.getLogger(InternalSheet.class); private final List<RecordBase> _records; protected PrintGridlinesRecord printGridlines; diff --git a/poi/src/main/java/org/apache/poi/hssf/model/InternalWorkbook.java b/poi/src/main/java/org/apache/poi/hssf/model/InternalWorkbook.java index a536d74dd0..d1d86af0ff 100644 --- a/poi/src/main/java/org/apache/poi/hssf/model/InternalWorkbook.java +++ b/poi/src/main/java/org/apache/poi/hssf/model/InternalWorkbook.java @@ -23,8 +23,8 @@ import java.security.AccessControlException; import java.util.*; import java.util.Map.Entry; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.ddf.EscherBSERecord; import org.apache.poi.ddf.EscherBoolProperty; import org.apache.poi.ddf.EscherContainerRecord; @@ -118,7 +118,7 @@ public final class InternalWorkbook { */ public static final String OLD_WORKBOOK_DIR_ENTRY_NAME = "Book"; - private static final Logger LOG = LogManager.getLogger(InternalWorkbook.class); + private static final Logger LOG = PoiLogManager.getLogger(InternalWorkbook.class); /** * constant used to set the "codepage" wherever "codepage" is set in records diff --git a/poi/src/main/java/org/apache/poi/hssf/record/CFRuleBase.java b/poi/src/main/java/org/apache/poi/hssf/record/CFRuleBase.java index 54cfc4de51..7c2fef6fe5 100644 --- a/poi/src/main/java/org/apache/poi/hssf/record/CFRuleBase.java +++ b/poi/src/main/java/org/apache/poi/hssf/record/CFRuleBase.java @@ -20,8 +20,8 @@ package org.apache.poi.hssf.record; import java.util.Map; import java.util.function.Supplier; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.hssf.model.HSSFFormulaParser; import org.apache.poi.hssf.record.cf.BorderFormatting; import org.apache.poi.hssf.record.cf.FontFormatting; @@ -95,7 +95,7 @@ public abstract class CFRuleBase extends StandardRecord { public static final int TEMPLATE_ABOVE_OR_EQUAL_TO_AVERAGE = 0x001D; public static final int TEMPLATE_BELOW_OR_EQUAL_TO_AVERAGE = 0x001E; - protected static final Logger LOG = LogManager.getLogger(CFRuleBase.class); + protected static final Logger LOG = PoiLogManager.getLogger(CFRuleBase.class); static final BitField modificationBits = bf(0x003FFFFF); // Bits: font,align,bord,patt,prot static final BitField alignHor = bf(0x00000001); // 0 = Horizontal alignment modified diff --git a/poi/src/main/java/org/apache/poi/hssf/record/DimensionsRecord.java b/poi/src/main/java/org/apache/poi/hssf/record/DimensionsRecord.java index b12d008786..2ec17432b6 100644 --- a/poi/src/main/java/org/apache/poi/hssf/record/DimensionsRecord.java +++ b/poi/src/main/java/org/apache/poi/hssf/record/DimensionsRecord.java @@ -22,8 +22,8 @@ package org.apache.poi.hssf.record; import java.util.Map; import java.util.function.Supplier; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.util.GenericRecordUtil; import org.apache.poi.util.LittleEndianOutput; @@ -35,7 +35,7 @@ import org.apache.poi.util.LittleEndianOutput; public final class DimensionsRecord extends StandardRecord { - private static final Logger LOG = LogManager.getLogger(DimensionsRecord.class); + private static final Logger LOG = PoiLogManager.getLogger(DimensionsRecord.class); public static final short sid = 0x200; private int field_1_first_row; diff --git a/poi/src/main/java/org/apache/poi/hssf/record/EmbeddedObjectRefSubRecord.java b/poi/src/main/java/org/apache/poi/hssf/record/EmbeddedObjectRefSubRecord.java index 92c5fa799a..e5db7b6e67 100644 --- a/poi/src/main/java/org/apache/poi/hssf/record/EmbeddedObjectRefSubRecord.java +++ b/poi/src/main/java/org/apache/poi/hssf/record/EmbeddedObjectRefSubRecord.java @@ -22,8 +22,8 @@ import java.util.Map; import java.util.function.Supplier; import org.apache.commons.io.input.UnsynchronizedByteArrayInputStream; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.ss.formula.ptg.Area3DPtg; import org.apache.poi.ss.formula.ptg.AreaPtg; @@ -47,7 +47,7 @@ import static org.apache.logging.log4j.util.Unbox.box; * stored in a separate entry within the OLE2 compound file. */ public final class EmbeddedObjectRefSubRecord extends SubRecord { - private static final Logger LOG = LogManager.getLogger(EmbeddedObjectRefSubRecord.class); + private static final Logger LOG = PoiLogManager.getLogger(EmbeddedObjectRefSubRecord.class); public static final short sid = 0x0009; diff --git a/poi/src/main/java/org/apache/poi/hssf/record/FeatRecord.java b/poi/src/main/java/org/apache/poi/hssf/record/FeatRecord.java index 86e2fc8f57..065bf91cb2 100644 --- a/poi/src/main/java/org/apache/poi/hssf/record/FeatRecord.java +++ b/poi/src/main/java/org/apache/poi/hssf/record/FeatRecord.java @@ -21,8 +21,8 @@ import java.util.Map; import java.util.function.Supplier; import java.util.stream.Stream; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.hssf.record.common.FeatFormulaErr2; import org.apache.poi.hssf.record.common.FeatProtection; import org.apache.poi.hssf.record.common.FeatSmartTag; @@ -41,7 +41,7 @@ import static org.apache.logging.log4j.util.Unbox.box; * up with a {@link FeatHdrRecord}. */ public final class FeatRecord extends StandardRecord { - private static final Logger LOG = LogManager.getLogger(FeatRecord.class); + private static final Logger LOG = PoiLogManager.getLogger(FeatRecord.class); public static final short sid = 0x0868; // SIDs from newer versions public static final short v11_sid = 0x0872; diff --git a/poi/src/main/java/org/apache/poi/hssf/record/FormatRecord.java b/poi/src/main/java/org/apache/poi/hssf/record/FormatRecord.java index 7b2714bc77..92b11d7b8d 100644 --- a/poi/src/main/java/org/apache/poi/hssf/record/FormatRecord.java +++ b/poi/src/main/java/org/apache/poi/hssf/record/FormatRecord.java @@ -21,8 +21,8 @@ import java.util.Arrays; import java.util.Map; import java.util.function.Supplier; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.hssf.model.InternalWorkbook; import org.apache.poi.util.GenericRecordUtil; import org.apache.poi.util.LittleEndianConsts; @@ -36,7 +36,7 @@ import static org.apache.logging.log4j.util.Unbox.box; */ public final class FormatRecord extends StandardRecord { - private static final Logger LOG = LogManager.getLogger(FormatRecord.class); + private static final Logger LOG = PoiLogManager.getLogger(FormatRecord.class); public static final short sid = 0x041E; diff --git a/poi/src/main/java/org/apache/poi/hssf/record/HyperlinkRecord.java b/poi/src/main/java/org/apache/poi/hssf/record/HyperlinkRecord.java index c6acf98336..a27a9ab82a 100644 --- a/poi/src/main/java/org/apache/poi/hssf/record/HyperlinkRecord.java +++ b/poi/src/main/java/org/apache/poi/hssf/record/HyperlinkRecord.java @@ -27,8 +27,8 @@ import static org.apache.poi.util.HexDump.toHex; import java.util.Map; import java.util.function.Supplier; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.hpsf.ClassID; import org.apache.poi.hpsf.ClassIDPredefined; import org.apache.poi.hssf.usermodel.HSSFWorkbook; @@ -48,7 +48,7 @@ import org.apache.poi.util.StringUtil; */ public final class HyperlinkRecord extends StandardRecord { public static final short sid = 0x01B8; - private static final Logger LOG = LogManager.getLogger(HyperlinkRecord.class); + private static final Logger LOG = PoiLogManager.getLogger(HyperlinkRecord.class); /* * Link flags diff --git a/poi/src/main/java/org/apache/poi/hssf/record/LabelRecord.java b/poi/src/main/java/org/apache/poi/hssf/record/LabelRecord.java index 2ce42a6be3..229209b132 100644 --- a/poi/src/main/java/org/apache/poi/hssf/record/LabelRecord.java +++ b/poi/src/main/java/org/apache/poi/hssf/record/LabelRecord.java @@ -20,8 +20,8 @@ package org.apache.poi.hssf.record; import java.util.Map; import java.util.function.Supplier; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.util.GenericRecordUtil; import org.apache.poi.util.RecordFormatException; @@ -35,7 +35,7 @@ import static org.apache.poi.util.HexDump.toHex; * @see LabelSSTRecord */ public final class LabelRecord extends Record implements CellValueRecordInterface { - private static final Logger LOG = LogManager.getLogger(LabelRecord.class); + private static final Logger LOG = PoiLogManager.getLogger(LabelRecord.class); public static final short sid = 0x0204; diff --git a/poi/src/main/java/org/apache/poi/hssf/record/OldLabelRecord.java b/poi/src/main/java/org/apache/poi/hssf/record/OldLabelRecord.java index 2ac572c981..66fa67f9a9 100644 --- a/poi/src/main/java/org/apache/poi/hssf/record/OldLabelRecord.java +++ b/poi/src/main/java/org/apache/poi/hssf/record/OldLabelRecord.java @@ -20,8 +20,8 @@ package org.apache.poi.hssf.record; import java.util.Map; import java.util.function.Supplier; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.util.GenericRecordUtil; import org.apache.poi.util.IOUtils; @@ -36,7 +36,7 @@ import static org.apache.poi.util.HexDump.toHex; * didn't use {@link LabelSSTRecord} */ public final class OldLabelRecord extends OldCellRecord { - private static final Logger LOG = LogManager.getLogger(OldLabelRecord.class); + private static final Logger LOG = PoiLogManager.getLogger(OldLabelRecord.class); public static final short biff2_sid = 0x0004; public static final short biff345_sid = 0x0204; diff --git a/poi/src/main/java/org/apache/poi/hssf/record/SSTDeserializer.java b/poi/src/main/java/org/apache/poi/hssf/record/SSTDeserializer.java index 16786e6dae..9aafa88943 100644 --- a/poi/src/main/java/org/apache/poi/hssf/record/SSTDeserializer.java +++ b/poi/src/main/java/org/apache/poi/hssf/record/SSTDeserializer.java @@ -19,8 +19,8 @@ package org.apache.poi.hssf.record; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.hssf.record.common.UnicodeString; import org.apache.poi.util.IntMapper; @@ -30,7 +30,7 @@ import static org.apache.logging.log4j.util.Unbox.box; * Handles the task of deserializing a SST string. The two main entry points are */ class SSTDeserializer { - private static final Logger LOG = LogManager.getLogger(SSTDeserializer.class); + private static final Logger LOG = PoiLogManager.getLogger(SSTDeserializer.class); private IntMapper<UnicodeString> strings; public SSTDeserializer(IntMapper<UnicodeString> strings) { diff --git a/poi/src/main/java/org/apache/poi/hssf/record/SupBookRecord.java b/poi/src/main/java/org/apache/poi/hssf/record/SupBookRecord.java index bdf88e1cc3..5a97b04e33 100644 --- a/poi/src/main/java/org/apache/poi/hssf/record/SupBookRecord.java +++ b/poi/src/main/java/org/apache/poi/hssf/record/SupBookRecord.java @@ -20,8 +20,8 @@ package org.apache.poi.hssf.record; import java.util.Map; import java.util.function.Supplier; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.util.GenericRecordUtil; import org.apache.poi.util.LittleEndianOutput; import org.apache.poi.util.StringUtil; @@ -32,7 +32,7 @@ import org.apache.poi.util.StringUtil; */ public final class SupBookRecord extends StandardRecord { - private static final Logger LOG = LogManager.getLogger(SupBookRecord.class); + private static final Logger LOG = PoiLogManager.getLogger(SupBookRecord.class); public static final short sid = 0x01AE; diff --git a/poi/src/main/java/org/apache/poi/hssf/record/aggregates/CFRecordsAggregate.java b/poi/src/main/java/org/apache/poi/hssf/record/aggregates/CFRecordsAggregate.java index b5da3a91c5..a140524900 100644 --- a/poi/src/main/java/org/apache/poi/hssf/record/aggregates/CFRecordsAggregate.java +++ b/poi/src/main/java/org/apache/poi/hssf/record/aggregates/CFRecordsAggregate.java @@ -22,8 +22,8 @@ import java.util.List; import java.util.Map; import java.util.function.Supplier; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.common.usermodel.GenericRecord; import org.apache.poi.hssf.model.RecordStream; import org.apache.poi.hssf.record.CFHeader12Record; @@ -54,7 +54,7 @@ import static org.apache.logging.log4j.util.Unbox.box; public final class CFRecordsAggregate extends RecordAggregate implements GenericRecord { /** Excel 97-2003 allows up to 3 conditional formating rules */ private static final int MAX_97_2003_CONDTIONAL_FORMAT_RULES = 3; - private static final Logger LOG = LogManager.getLogger(CFRecordsAggregate.class); + private static final Logger LOG = PoiLogManager.getLogger(CFRecordsAggregate.class); private final CFHeaderBase header; diff --git a/poi/src/main/java/org/apache/poi/hssf/record/cf/ColorGradientFormatting.java b/poi/src/main/java/org/apache/poi/hssf/record/cf/ColorGradientFormatting.java index ab463c9fa8..af39dfe99c 100644 --- a/poi/src/main/java/org/apache/poi/hssf/record/cf/ColorGradientFormatting.java +++ b/poi/src/main/java/org/apache/poi/hssf/record/cf/ColorGradientFormatting.java @@ -21,8 +21,8 @@ import java.util.Map; import java.util.function.Supplier; import java.util.stream.Stream; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.common.Duplicatable; import org.apache.poi.common.usermodel.GenericRecord; import org.apache.poi.hssf.record.common.ExtendedColor; @@ -41,7 +41,7 @@ import static org.apache.logging.log4j.util.Unbox.box; * Color Scale in the UI) */ public final class ColorGradientFormatting implements Duplicatable, GenericRecord { - private static final Logger LOGGER = LogManager.getLogger(ColorGradientFormatting.class); + private static final Logger LOGGER = PoiLogManager.getLogger(ColorGradientFormatting.class); private static final BitField clamp = BitFieldFactory.getInstance(0x01); private static final BitField background = BitFieldFactory.getInstance(0x02); diff --git a/poi/src/main/java/org/apache/poi/hssf/record/cf/DataBarFormatting.java b/poi/src/main/java/org/apache/poi/hssf/record/cf/DataBarFormatting.java index 5063cfe3bf..a86100f029 100644 --- a/poi/src/main/java/org/apache/poi/hssf/record/cf/DataBarFormatting.java +++ b/poi/src/main/java/org/apache/poi/hssf/record/cf/DataBarFormatting.java @@ -23,8 +23,8 @@ import static org.apache.poi.util.GenericRecordUtil.getBitsAsString; import java.util.Map; import java.util.function.Supplier; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.common.Duplicatable; import org.apache.poi.common.usermodel.GenericRecord; import org.apache.poi.hssf.record.common.ExtendedColor; @@ -39,7 +39,7 @@ import org.apache.poi.util.LittleEndianOutput; * Data Bar Conditional Formatting Rule Record. */ public final class DataBarFormatting implements Duplicatable, GenericRecord { - private static final Logger LOG = LogManager.getLogger(DataBarFormatting.class); + private static final Logger LOG = PoiLogManager.getLogger(DataBarFormatting.class); private static final BitField ICON_ONLY = BitFieldFactory.getInstance(0x01); private static final BitField REVERSED = BitFieldFactory.getInstance(0x04); diff --git a/poi/src/main/java/org/apache/poi/hssf/record/cf/IconMultiStateFormatting.java b/poi/src/main/java/org/apache/poi/hssf/record/cf/IconMultiStateFormatting.java index ac2a42fc15..2d48eada15 100644 --- a/poi/src/main/java/org/apache/poi/hssf/record/cf/IconMultiStateFormatting.java +++ b/poi/src/main/java/org/apache/poi/hssf/record/cf/IconMultiStateFormatting.java @@ -21,8 +21,8 @@ import java.util.Map; import java.util.function.Supplier; import java.util.stream.Stream; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.common.Duplicatable; import org.apache.poi.common.usermodel.GenericRecord; import org.apache.poi.ss.usermodel.IconMultiStateFormatting.IconSet; @@ -39,7 +39,7 @@ import static org.apache.logging.log4j.util.Unbox.box; * Icon / Multi-State Conditional Formatting Rule Record. */ public final class IconMultiStateFormatting implements Duplicatable, GenericRecord { - private static final Logger LOG = LogManager.getLogger(IconMultiStateFormatting.class); + private static final Logger LOG = PoiLogManager.getLogger(IconMultiStateFormatting.class); private static BitField ICON_ONLY = BitFieldFactory.getInstance(0x01); private static BitField REVERSED = BitFieldFactory.getInstance(0x04); diff --git a/poi/src/main/java/org/apache/poi/hssf/record/common/ExtRst.java b/poi/src/main/java/org/apache/poi/hssf/record/common/ExtRst.java index ffd0d03eef..d798b0cc39 100644 --- a/poi/src/main/java/org/apache/poi/hssf/record/common/ExtRst.java +++ b/poi/src/main/java/org/apache/poi/hssf/record/common/ExtRst.java @@ -22,8 +22,8 @@ import java.util.Map; import java.util.function.Supplier; import java.util.stream.Stream; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.common.usermodel.GenericRecord; import org.apache.poi.hssf.record.cont.ContinuableRecordOutput; import org.apache.poi.hssf.usermodel.HSSFWorkbook; @@ -37,7 +37,7 @@ import static org.apache.logging.log4j.util.Unbox.box; @Internal public class ExtRst implements Comparable<ExtRst>, GenericRecord { - private static final Logger LOG = LogManager.getLogger(ExtRst.class); + private static final Logger LOG = PoiLogManager.getLogger(ExtRst.class); private short reserved; diff --git a/poi/src/main/java/org/apache/poi/hssf/record/common/UnicodeString.java b/poi/src/main/java/org/apache/poi/hssf/record/common/UnicodeString.java index e681492ef4..08293947ba 100644 --- a/poi/src/main/java/org/apache/poi/hssf/record/common/UnicodeString.java +++ b/poi/src/main/java/org/apache/poi/hssf/record/common/UnicodeString.java @@ -27,8 +27,8 @@ import java.util.Spliterator; import java.util.function.Supplier; import java.util.stream.Collectors; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.common.Duplicatable; import org.apache.poi.common.usermodel.GenericRecord; import org.apache.poi.hssf.record.RecordInputStream; @@ -46,7 +46,7 @@ import static org.apache.logging.log4j.util.Unbox.box; * This is often called a XLUnicodeRichExtendedString in MS documentation. */ public class UnicodeString implements Comparable<UnicodeString>, Duplicatable, GenericRecord { - private static final Logger LOG = LogManager.getLogger(UnicodeString.class); + private static final Logger LOG = PoiLogManager.getLogger(UnicodeString.class); private static final BitField highByte = BitFieldFactory.getInstance(0x1); // 0x2 is reserved diff --git a/poi/src/main/java/org/apache/poi/hssf/usermodel/EscherGraphics.java b/poi/src/main/java/org/apache/poi/hssf/usermodel/EscherGraphics.java index f21e49c751..5e535f38f3 100644 --- a/poi/src/main/java/org/apache/poi/hssf/usermodel/EscherGraphics.java +++ b/poi/src/main/java/org/apache/poi/hssf/usermodel/EscherGraphics.java @@ -17,8 +17,8 @@ package org.apache.poi.hssf.usermodel; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.hssf.util.HSSFColor; import org.apache.poi.util.NotImplemented; import org.apache.poi.util.SuppressForbidden; @@ -59,7 +59,7 @@ import java.text.AttributedCharacterIterator; * </blockquote> */ public class EscherGraphics extends Graphics { - private static final Logger LOG = LogManager.getLogger(EscherGraphics.class); + private static final Logger LOG = PoiLogManager.getLogger(EscherGraphics.class); private final HSSFShapeGroup escherGroup; private final HSSFWorkbook workbook; diff --git a/poi/src/main/java/org/apache/poi/hssf/usermodel/EscherGraphics2d.java b/poi/src/main/java/org/apache/poi/hssf/usermodel/EscherGraphics2d.java index 6fdfdbf9e6..f32986b18b 100644 --- a/poi/src/main/java/org/apache/poi/hssf/usermodel/EscherGraphics2d.java +++ b/poi/src/main/java/org/apache/poi/hssf/usermodel/EscherGraphics2d.java @@ -17,8 +17,8 @@ package org.apache.poi.hssf.usermodel; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import java.awt.*; import java.awt.font.FontRenderContext; @@ -70,7 +70,7 @@ import java.util.Map; * </blockquote> */ public final class EscherGraphics2d extends Graphics2D { - private static final Logger LOG = LogManager.getLogger(EscherGraphics2d.class); + private static final Logger LOG = PoiLogManager.getLogger(EscherGraphics2d.class); private final EscherGraphics _escherGraphics; private BufferedImage _img; diff --git a/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFPolygon.java b/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFPolygon.java index b98c6ee58e..598c1a1552 100644 --- a/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFPolygon.java +++ b/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFPolygon.java @@ -17,8 +17,8 @@ package org.apache.poi.hssf.usermodel; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.ddf.EscherArrayProperty; import org.apache.poi.ddf.EscherBoolProperty; import org.apache.poi.ddf.EscherClientDataRecord; @@ -43,7 +43,7 @@ import org.apache.poi.util.LittleEndian; public class HSSFPolygon extends HSSFSimpleShape { public static final short OBJECT_TYPE_MICROSOFT_OFFICE_DRAWING = 0x1E; - private static final Logger LOG = LogManager.getLogger(HSSFPolygon.class); + private static final Logger LOG = PoiLogManager.getLogger(HSSFPolygon.class); public HSSFPolygon(EscherContainerRecord spContainer, ObjRecord objRecord, TextObjectRecord _textObjectRecord) { super(spContainer, objRecord, _textObjectRecord); diff --git a/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFSheet.java b/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFSheet.java index fe1c703ba3..bba313f57d 100644 --- a/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFSheet.java +++ b/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFSheet.java @@ -27,8 +27,8 @@ import java.util.Spliterator; import java.util.TreeMap; import java.util.TreeSet; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.logging.log4j.message.SimpleMessage; import org.apache.poi.ddf.EscherRecord; import org.apache.poi.hssf.model.DrawingManager2; @@ -94,7 +94,7 @@ import static org.apache.logging.log4j.util.Unbox.box; * High level representation of a worksheet. */ public final class HSSFSheet implements Sheet { - private static final Logger LOGGER = LogManager.getLogger(HSSFSheet.class); + private static final Logger LOGGER = PoiLogManager.getLogger(HSSFSheet.class); /** * width of 1px in columns with default width in units of 1/256 of a character width diff --git a/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java b/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java index 9442589189..0fea271340 100644 --- a/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java +++ b/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java @@ -50,8 +50,8 @@ import java.util.regex.Pattern; import org.apache.commons.codec.digest.DigestUtils; import org.apache.commons.io.input.UnsynchronizedByteArrayInputStream; import org.apache.commons.io.output.UnsynchronizedByteArrayOutputStream; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.EncryptedDocumentException; import org.apache.poi.POIDocument; import org.apache.poi.ddf.EscherBSERecord; @@ -197,7 +197,7 @@ public final class HSSFWorkbook extends POIDocument implements Workbook { */ private MissingCellPolicy missingCellPolicy = MissingCellPolicy.RETURN_NULL_AND_BLANK; - private static final Logger LOGGER = LogManager.getLogger(HSSFWorkbook.class); + private static final Logger LOGGER = PoiLogManager.getLogger(HSSFWorkbook.class); /** * The locator of user-defined functions. diff --git a/poi/src/main/java/org/apache/poi/hssf/usermodel/StaticFontMetrics.java b/poi/src/main/java/org/apache/poi/hssf/usermodel/StaticFontMetrics.java index 43e684beb0..ed339c661a 100644 --- a/poi/src/main/java/org/apache/poi/hssf/usermodel/StaticFontMetrics.java +++ b/poi/src/main/java/org/apache/poi/hssf/usermodel/StaticFontMetrics.java @@ -26,8 +26,8 @@ import java.util.HashMap; import java.util.Map; import java.util.Properties; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; /** * Allows the user to lookup the font metrics for a particular font without @@ -37,7 +37,7 @@ import org.apache.logging.log4j.Logger; * font. Use a multiplier for other sizes. */ final class StaticFontMetrics { - private static final Logger LOGGER = LogManager.getLogger(StaticFontMetrics.class); + private static final Logger LOGGER = PoiLogManager.getLogger(StaticFontMetrics.class); /** The font metrics property file we're using */ private static Properties fontMetricsProps; /** Our cache of font details we've already looked up */ diff --git a/poi/src/main/java/org/apache/poi/hssf/usermodel/helpers/HSSFRowColShifter.java b/poi/src/main/java/org/apache/poi/hssf/usermodel/helpers/HSSFRowColShifter.java index df2609315f..698f1d7279 100644 --- a/poi/src/main/java/org/apache/poi/hssf/usermodel/helpers/HSSFRowColShifter.java +++ b/poi/src/main/java/org/apache/poi/hssf/usermodel/helpers/HSSFRowColShifter.java @@ -17,8 +17,8 @@ package org.apache.poi.hssf.usermodel.helpers; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.hssf.usermodel.*; import org.apache.poi.ss.formula.*; import org.apache.poi.ss.formula.ptg.Ptg; @@ -34,7 +34,7 @@ import static org.apache.logging.log4j.util.Unbox.box; */ @Internal /*private*/ final class HSSFRowColShifter { - private static final Logger LOG = LogManager.getLogger(HSSFRowColShifter.class); + private static final Logger LOG = PoiLogManager.getLogger(HSSFRowColShifter.class); private HSSFRowColShifter() { /*no instances for static classes*/} diff --git a/poi/src/main/java/org/apache/poi/logging/NoOpLogger.java b/poi/src/main/java/org/apache/poi/logging/NoOpLogger.java new file mode 100644 index 0000000000..1880d37062 --- /dev/null +++ b/poi/src/main/java/org/apache/poi/logging/NoOpLogger.java @@ -0,0 +1,1909 @@ +/* Copyright 2004 The Apache Software Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.poi.logging; + +import org.apache.logging.log4j.Level; +import org.apache.logging.log4j.Logger; +import org.apache.logging.log4j.Marker; +import org.apache.logging.log4j.message.EntryMessage; +import org.apache.logging.log4j.message.FlowMessageFactory; +import org.apache.logging.log4j.message.Message; +import org.apache.logging.log4j.message.MessageFactory; +import org.apache.logging.log4j.util.MessageSupplier; +import org.apache.logging.log4j.util.Supplier; + +/** + * A No-Op implementation of the Log4J Logger interface. + */ +final class NoOpLogger implements Logger { + + static final NoOpLogger INSTANCE = new NoOpLogger(); + + @Override + public void catching(Level level, Throwable throwable) { + + } + + @Override + public void catching(Throwable throwable) { + + } + + @Override + public void debug(Marker marker, Message message) { + + } + + @Override + public void debug(Marker marker, Message message, Throwable throwable) { + + } + + @Override + public void debug(Marker marker, MessageSupplier messageSupplier) { + + } + + @Override + public void debug(Marker marker, MessageSupplier messageSupplier, Throwable throwable) { + + } + + @Override + public void debug(Marker marker, CharSequence message) { + + } + + @Override + public void debug(Marker marker, CharSequence message, Throwable throwable) { + + } + + @Override + public void debug(Marker marker, Object message) { + + } + + @Override + public void debug(Marker marker, Object message, Throwable throwable) { + + } + + @Override + public void debug(Marker marker, String message) { + + } + + @Override + public void debug(Marker marker, String message, Object... params) { + + } + + @Override + public void debug(Marker marker, String message, Supplier<?>... paramSuppliers) { + + } + + @Override + public void debug(Marker marker, String message, Throwable throwable) { + + } + + @Override + public void debug(Marker marker, Supplier<?> messageSupplier) { + + } + + @Override + public void debug(Marker marker, Supplier<?> messageSupplier, Throwable throwable) { + + } + + @Override + public void debug(Message message) { + + } + + @Override + public void debug(Message message, Throwable throwable) { + + } + + @Override + public void debug(MessageSupplier messageSupplier) { + + } + + @Override + public void debug(MessageSupplier messageSupplier, Throwable throwable) { + + } + + @Override + public void debug(CharSequence message) { + + } + + @Override + public void debug(CharSequence message, Throwable throwable) { + + } + + @Override + public void debug(Object message) { + + } + + @Override + public void debug(Object message, Throwable throwable) { + + } + + @Override + public void debug(String message) { + + } + + @Override + public void debug(String message, Object... params) { + + } + + @Override + public void debug(String message, Supplier<?>... paramSuppliers) { + + } + + @Override + public void debug(String message, Throwable throwable) { + + } + + @Override + public void debug(Supplier<?> messageSupplier) { + + } + + @Override + public void debug(Supplier<?> messageSupplier, Throwable throwable) { + + } + + @Override + public void debug(Marker marker, String message, Object p0) { + + } + + @Override + public void debug(Marker marker, String message, Object p0, Object p1) { + + } + + @Override + public void debug(Marker marker, String message, Object p0, Object p1, Object p2) { + + } + + @Override + public void debug(Marker marker, String message, Object p0, Object p1, Object p2, Object p3) { + + } + + @Override + public void debug(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4) { + + } + + @Override + public void debug(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5) { + + } + + @Override + public void debug(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6) { + + } + + @Override + public void debug(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7) { + + } + + @Override + public void debug(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, Object p8) { + + } + + @Override + public void debug(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, Object p8, Object p9) { + + } + + @Override + public void debug(String message, Object p0) { + + } + + @Override + public void debug(String message, Object p0, Object p1) { + + } + + @Override + public void debug(String message, Object p0, Object p1, Object p2) { + + } + + @Override + public void debug(String message, Object p0, Object p1, Object p2, Object p3) { + + } + + @Override + public void debug(String message, Object p0, Object p1, Object p2, Object p3, Object p4) { + + } + + @Override + public void debug(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5) { + + } + + @Override + public void debug(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6) { + + } + + @Override + public void debug(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7) { + + } + + @Override + public void debug(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, Object p8) { + + } + + @Override + public void debug(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, Object p8, Object p9) { + + } + + @Override + public void entry() { + + } + + @Override + public void entry(Object... params) { + + } + + @Override + public void error(Marker marker, Message message) { + + } + + @Override + public void error(Marker marker, Message message, Throwable throwable) { + + } + + @Override + public void error(Marker marker, MessageSupplier messageSupplier) { + + } + + @Override + public void error(Marker marker, MessageSupplier messageSupplier, Throwable throwable) { + + } + + @Override + public void error(Marker marker, CharSequence message) { + + } + + @Override + public void error(Marker marker, CharSequence message, Throwable throwable) { + + } + + @Override + public void error(Marker marker, Object message) { + + } + + @Override + public void error(Marker marker, Object message, Throwable throwable) { + + } + + @Override + public void error(Marker marker, String message) { + + } + + @Override + public void error(Marker marker, String message, Object... params) { + + } + + @Override + public void error(Marker marker, String message, Supplier<?>... paramSuppliers) { + + } + + @Override + public void error(Marker marker, String message, Throwable throwable) { + + } + + @Override + public void error(Marker marker, Supplier<?> messageSupplier) { + + } + + @Override + public void error(Marker marker, Supplier<?> messageSupplier, Throwable throwable) { + + } + + @Override + public void error(Message message) { + + } + + @Override + public void error(Message message, Throwable throwable) { + + } + + @Override + public void error(MessageSupplier messageSupplier) { + + } + + @Override + public void error(MessageSupplier messageSupplier, Throwable throwable) { + + } + + @Override + public void error(CharSequence message) { + + } + + @Override + public void error(CharSequence message, Throwable throwable) { + + } + + @Override + public void error(Object message) { + + } + + @Override + public void error(Object message, Throwable throwable) { + + } + + @Override + public void error(String message) { + + } + + @Override + public void error(String message, Object... params) { + + } + + @Override + public void error(String message, Supplier<?>... paramSuppliers) { + + } + + @Override + public void error(String message, Throwable throwable) { + + } + + @Override + public void error(Supplier<?> messageSupplier) { + + } + + @Override + public void error(Supplier<?> messageSupplier, Throwable throwable) { + + } + + @Override + public void error(Marker marker, String message, Object p0) { + + } + + @Override + public void error(Marker marker, String message, Object p0, Object p1) { + + } + + @Override + public void error(Marker marker, String message, Object p0, Object p1, Object p2) { + + } + + @Override + public void error(Marker marker, String message, Object p0, Object p1, Object p2, Object p3) { + + } + + @Override + public void error(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4) { + + } + + @Override + public void error(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5) { + + } + + @Override + public void error(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6) { + + } + + @Override + public void error(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7) { + + } + + @Override + public void error(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, Object p8) { + + } + + @Override + public void error(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, Object p8, Object p9) { + + } + + @Override + public void error(String message, Object p0) { + + } + + @Override + public void error(String message, Object p0, Object p1) { + + } + + @Override + public void error(String message, Object p0, Object p1, Object p2) { + + } + + @Override + public void error(String message, Object p0, Object p1, Object p2, Object p3) { + + } + + @Override + public void error(String message, Object p0, Object p1, Object p2, Object p3, Object p4) { + + } + + @Override + public void error(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5) { + + } + + @Override + public void error(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6) { + + } + + @Override + public void error(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7) { + + } + + @Override + public void error(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, Object p8) { + + } + + @Override + public void error(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, Object p8, Object p9) { + + } + + @Override + public void exit() { + + } + + @Override + public <R> R exit(R result) { + return null; + } + + @Override + public void fatal(Marker marker, Message message) { + + } + + @Override + public void fatal(Marker marker, Message message, Throwable throwable) { + + } + + @Override + public void fatal(Marker marker, MessageSupplier messageSupplier) { + + } + + @Override + public void fatal(Marker marker, MessageSupplier messageSupplier, Throwable throwable) { + + } + + @Override + public void fatal(Marker marker, CharSequence message) { + + } + + @Override + public void fatal(Marker marker, CharSequence message, Throwable throwable) { + + } + + @Override + public void fatal(Marker marker, Object message) { + + } + + @Override + public void fatal(Marker marker, Object message, Throwable throwable) { + + } + + @Override + public void fatal(Marker marker, String message) { + + } + + @Override + public void fatal(Marker marker, String message, Object... params) { + + } + + @Override + public void fatal(Marker marker, String message, Supplier<?>... paramSuppliers) { + + } + + @Override + public void fatal(Marker marker, String message, Throwable throwable) { + + } + + @Override + public void fatal(Marker marker, Supplier<?> messageSupplier) { + + } + + @Override + public void fatal(Marker marker, Supplier<?> messageSupplier, Throwable throwable) { + + } + + @Override + public void fatal(Message message) { + + } + + @Override + public void fatal(Message message, Throwable throwable) { + + } + + @Override + public void fatal(MessageSupplier messageSupplier) { + + } + + @Override + public void fatal(MessageSupplier messageSupplier, Throwable throwable) { + + } + + @Override + public void fatal(CharSequence message) { + + } + + @Override + public void fatal(CharSequence message, Throwable throwable) { + + } + + @Override + public void fatal(Object message) { + + } + + @Override + public void fatal(Object message, Throwable throwable) { + + } + + @Override + public void fatal(String message) { + + } + + @Override + public void fatal(String message, Object... params) { + + } + + @Override + public void fatal(String message, Supplier<?>... paramSuppliers) { + + } + + @Override + public void fatal(String message, Throwable throwable) { + + } + + @Override + public void fatal(Supplier<?> messageSupplier) { + + } + + @Override + public void fatal(Supplier<?> messageSupplier, Throwable throwable) { + + } + + @Override + public void fatal(Marker marker, String message, Object p0) { + + } + + @Override + public void fatal(Marker marker, String message, Object p0, Object p1) { + + } + + @Override + public void fatal(Marker marker, String message, Object p0, Object p1, Object p2) { + + } + + @Override + public void fatal(Marker marker, String message, Object p0, Object p1, Object p2, Object p3) { + + } + + @Override + public void fatal(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4) { + + } + + @Override + public void fatal(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5) { + + } + + @Override + public void fatal(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6) { + + } + + @Override + public void fatal(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7) { + + } + + @Override + public void fatal(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, Object p8) { + + } + + @Override + public void fatal(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, Object p8, Object p9) { + + } + + @Override + public void fatal(String message, Object p0) { + + } + + @Override + public void fatal(String message, Object p0, Object p1) { + + } + + @Override + public void fatal(String message, Object p0, Object p1, Object p2) { + + } + + @Override + public void fatal(String message, Object p0, Object p1, Object p2, Object p3) { + + } + + @Override + public void fatal(String message, Object p0, Object p1, Object p2, Object p3, Object p4) { + + } + + @Override + public void fatal(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5) { + + } + + @Override + public void fatal(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6) { + + } + + @Override + public void fatal(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7) { + + } + + @Override + public void fatal(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, Object p8) { + + } + + @Override + public void fatal(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, Object p8, Object p9) { + + } + + @Override + public Level getLevel() { + return null; + } + + @Override + public <MF extends MessageFactory> MF getMessageFactory() { + return null; + } + + @Override + public FlowMessageFactory getFlowMessageFactory() { + return null; + } + + @Override + public String getName() { + return ""; + } + + @Override + public void info(Marker marker, Message message) { + + } + + @Override + public void info(Marker marker, Message message, Throwable throwable) { + + } + + @Override + public void info(Marker marker, MessageSupplier messageSupplier) { + + } + + @Override + public void info(Marker marker, MessageSupplier messageSupplier, Throwable throwable) { + + } + + @Override + public void info(Marker marker, CharSequence message) { + + } + + @Override + public void info(Marker marker, CharSequence message, Throwable throwable) { + + } + + @Override + public void info(Marker marker, Object message) { + + } + + @Override + public void info(Marker marker, Object message, Throwable throwable) { + + } + + @Override + public void info(Marker marker, String message) { + + } + + @Override + public void info(Marker marker, String message, Object... params) { + + } + + @Override + public void info(Marker marker, String message, Supplier<?>... paramSuppliers) { + + } + + @Override + public void info(Marker marker, String message, Throwable throwable) { + + } + + @Override + public void info(Marker marker, Supplier<?> messageSupplier) { + + } + + @Override + public void info(Marker marker, Supplier<?> messageSupplier, Throwable throwable) { + + } + + @Override + public void info(Message message) { + + } + + @Override + public void info(Message message, Throwable throwable) { + + } + + @Override + public void info(MessageSupplier messageSupplier) { + + } + + @Override + public void info(MessageSupplier messageSupplier, Throwable throwable) { + + } + + @Override + public void info(CharSequence message) { + + } + + @Override + public void info(CharSequence message, Throwable throwable) { + + } + + @Override + public void info(Object message) { + + } + + @Override + public void info(Object message, Throwable throwable) { + + } + + @Override + public void info(String message) { + + } + + @Override + public void info(String message, Object... params) { + + } + + @Override + public void info(String message, Supplier<?>... paramSuppliers) { + + } + + @Override + public void info(String message, Throwable throwable) { + + } + + @Override + public void info(Supplier<?> messageSupplier) { + + } + + @Override + public void info(Supplier<?> messageSupplier, Throwable throwable) { + + } + + @Override + public void info(Marker marker, String message, Object p0) { + + } + + @Override + public void info(Marker marker, String message, Object p0, Object p1) { + + } + + @Override + public void info(Marker marker, String message, Object p0, Object p1, Object p2) { + + } + + @Override + public void info(Marker marker, String message, Object p0, Object p1, Object p2, Object p3) { + + } + + @Override + public void info(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4) { + + } + + @Override + public void info(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5) { + + } + + @Override + public void info(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6) { + + } + + @Override + public void info(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7) { + + } + + @Override + public void info(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, Object p8) { + + } + + @Override + public void info(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, Object p8, Object p9) { + + } + + @Override + public void info(String message, Object p0) { + + } + + @Override + public void info(String message, Object p0, Object p1) { + + } + + @Override + public void info(String message, Object p0, Object p1, Object p2) { + + } + + @Override + public void info(String message, Object p0, Object p1, Object p2, Object p3) { + + } + + @Override + public void info(String message, Object p0, Object p1, Object p2, Object p3, Object p4) { + + } + + @Override + public void info(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5) { + + } + + @Override + public void info(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6) { + + } + + @Override + public void info(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7) { + + } + + @Override + public void info(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, Object p8) { + + } + + @Override + public void info(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, Object p8, Object p9) { + + } + + @Override + public boolean isDebugEnabled() { + return false; + } + + @Override + public boolean isDebugEnabled(Marker marker) { + return false; + } + + @Override + public boolean isEnabled(Level level) { + return false; + } + + @Override + public boolean isEnabled(Level level, Marker marker) { + return false; + } + + @Override + public boolean isErrorEnabled() { + return false; + } + + @Override + public boolean isErrorEnabled(Marker marker) { + return false; + } + + @Override + public boolean isFatalEnabled() { + return false; + } + + @Override + public boolean isFatalEnabled(Marker marker) { + return false; + } + + @Override + public boolean isInfoEnabled() { + return false; + } + + @Override + public boolean isInfoEnabled(Marker marker) { + return false; + } + + @Override + public boolean isTraceEnabled() { + return false; + } + + @Override + public boolean isTraceEnabled(Marker marker) { + return false; + } + + @Override + public boolean isWarnEnabled() { + return false; + } + + @Override + public boolean isWarnEnabled(Marker marker) { + return false; + } + + @Override + public void log(Level level, Marker marker, Message message) { + + } + + @Override + public void log(Level level, Marker marker, Message message, Throwable throwable) { + + } + + @Override + public void log(Level level, Marker marker, MessageSupplier messageSupplier) { + + } + + @Override + public void log(Level level, Marker marker, MessageSupplier messageSupplier, Throwable throwable) { + + } + + @Override + public void log(Level level, Marker marker, CharSequence message) { + + } + + @Override + public void log(Level level, Marker marker, CharSequence message, Throwable throwable) { + + } + + @Override + public void log(Level level, Marker marker, Object message) { + + } + + @Override + public void log(Level level, Marker marker, Object message, Throwable throwable) { + + } + + @Override + public void log(Level level, Marker marker, String message) { + + } + + @Override + public void log(Level level, Marker marker, String message, Object... params) { + + } + + @Override + public void log(Level level, Marker marker, String message, Supplier<?>... paramSuppliers) { + + } + + @Override + public void log(Level level, Marker marker, String message, Throwable throwable) { + + } + + @Override + public void log(Level level, Marker marker, Supplier<?> messageSupplier) { + + } + + @Override + public void log(Level level, Marker marker, Supplier<?> messageSupplier, Throwable throwable) { + + } + + @Override + public void log(Level level, Message message) { + + } + + @Override + public void log(Level level, Message message, Throwable throwable) { + + } + + @Override + public void log(Level level, MessageSupplier messageSupplier) { + + } + + @Override + public void log(Level level, MessageSupplier messageSupplier, Throwable throwable) { + + } + + @Override + public void log(Level level, CharSequence message) { + + } + + @Override + public void log(Level level, CharSequence message, Throwable throwable) { + + } + + @Override + public void log(Level level, Object message) { + + } + + @Override + public void log(Level level, Object message, Throwable throwable) { + + } + + @Override + public void log(Level level, String message) { + + } + + @Override + public void log(Level level, String message, Object... params) { + + } + + @Override + public void log(Level level, String message, Supplier<?>... paramSuppliers) { + + } + + @Override + public void log(Level level, String message, Throwable throwable) { + + } + + @Override + public void log(Level level, Supplier<?> messageSupplier) { + + } + + @Override + public void log(Level level, Supplier<?> messageSupplier, Throwable throwable) { + + } + + @Override + public void log(Level level, Marker marker, String message, Object p0) { + + } + + @Override + public void log(Level level, Marker marker, String message, Object p0, Object p1) { + + } + + @Override + public void log(Level level, Marker marker, String message, Object p0, Object p1, Object p2) { + + } + + @Override + public void log(Level level, Marker marker, String message, Object p0, Object p1, Object p2, Object p3) { + + } + + @Override + public void log(Level level, Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4) { + + } + + @Override + public void log(Level level, Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5) { + + } + + @Override + public void log(Level level, Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6) { + + } + + @Override + public void log(Level level, Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7) { + + } + + @Override + public void log(Level level, Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, Object p8) { + + } + + @Override + public void log(Level level, Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, Object p8, Object p9) { + + } + + @Override + public void log(Level level, String message, Object p0) { + + } + + @Override + public void log(Level level, String message, Object p0, Object p1) { + + } + + @Override + public void log(Level level, String message, Object p0, Object p1, Object p2) { + + } + + @Override + public void log(Level level, String message, Object p0, Object p1, Object p2, Object p3) { + + } + + @Override + public void log(Level level, String message, Object p0, Object p1, Object p2, Object p3, Object p4) { + + } + + @Override + public void log(Level level, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5) { + + } + + @Override + public void log(Level level, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6) { + + } + + @Override + public void log(Level level, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7) { + + } + + @Override + public void log(Level level, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, Object p8) { + + } + + @Override + public void log(Level level, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, Object p8, Object p9) { + + } + + @Override + public void printf(Level level, Marker marker, String format, Object... params) { + + } + + @Override + public void printf(Level level, String format, Object... params) { + + } + + @Override + public <T extends Throwable> T throwing(Level level, T throwable) { + return null; + } + + @Override + public <T extends Throwable> T throwing(T throwable) { + return null; + } + + @Override + public void trace(Marker marker, Message message) { + + } + + @Override + public void trace(Marker marker, Message message, Throwable throwable) { + + } + + @Override + public void trace(Marker marker, MessageSupplier messageSupplier) { + + } + + @Override + public void trace(Marker marker, MessageSupplier messageSupplier, Throwable throwable) { + + } + + @Override + public void trace(Marker marker, CharSequence message) { + + } + + @Override + public void trace(Marker marker, CharSequence message, Throwable throwable) { + + } + + @Override + public void trace(Marker marker, Object message) { + + } + + @Override + public void trace(Marker marker, Object message, Throwable throwable) { + + } + + @Override + public void trace(Marker marker, String message) { + + } + + @Override + public void trace(Marker marker, String message, Object... params) { + + } + + @Override + public void trace(Marker marker, String message, Supplier<?>... paramSuppliers) { + + } + + @Override + public void trace(Marker marker, String message, Throwable throwable) { + + } + + @Override + public void trace(Marker marker, Supplier<?> messageSupplier) { + + } + + @Override + public void trace(Marker marker, Supplier<?> messageSupplier, Throwable throwable) { + + } + + @Override + public void trace(Message message) { + + } + + @Override + public void trace(Message message, Throwable throwable) { + + } + + @Override + public void trace(MessageSupplier messageSupplier) { + + } + + @Override + public void trace(MessageSupplier messageSupplier, Throwable throwable) { + + } + + @Override + public void trace(CharSequence message) { + + } + + @Override + public void trace(CharSequence message, Throwable throwable) { + + } + + @Override + public void trace(Object message) { + + } + + @Override + public void trace(Object message, Throwable throwable) { + + } + + @Override + public void trace(String message) { + + } + + @Override + public void trace(String message, Object... params) { + + } + + @Override + public void trace(String message, Supplier<?>... paramSuppliers) { + + } + + @Override + public void trace(String message, Throwable throwable) { + + } + + @Override + public void trace(Supplier<?> messageSupplier) { + + } + + @Override + public void trace(Supplier<?> messageSupplier, Throwable throwable) { + + } + + @Override + public void trace(Marker marker, String message, Object p0) { + + } + + @Override + public void trace(Marker marker, String message, Object p0, Object p1) { + + } + + @Override + public void trace(Marker marker, String message, Object p0, Object p1, Object p2) { + + } + + @Override + public void trace(Marker marker, String message, Object p0, Object p1, Object p2, Object p3) { + + } + + @Override + public void trace(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4) { + + } + + @Override + public void trace(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5) { + + } + + @Override + public void trace(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6) { + + } + + @Override + public void trace(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7) { + + } + + @Override + public void trace(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, Object p8) { + + } + + @Override + public void trace(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, Object p8, Object p9) { + + } + + @Override + public void trace(String message, Object p0) { + + } + + @Override + public void trace(String message, Object p0, Object p1) { + + } + + @Override + public void trace(String message, Object p0, Object p1, Object p2) { + + } + + @Override + public void trace(String message, Object p0, Object p1, Object p2, Object p3) { + + } + + @Override + public void trace(String message, Object p0, Object p1, Object p2, Object p3, Object p4) { + + } + + @Override + public void trace(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5) { + + } + + @Override + public void trace(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6) { + + } + + @Override + public void trace(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7) { + + } + + @Override + public void trace(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, Object p8) { + + } + + @Override + public void trace(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, Object p8, Object p9) { + + } + + @Override + public EntryMessage traceEntry() { + return null; + } + + @Override + public EntryMessage traceEntry(String format, Object... params) { + return null; + } + + @Override + public EntryMessage traceEntry(Supplier<?>... paramSuppliers) { + return null; + } + + @Override + public EntryMessage traceEntry(String format, Supplier<?>... paramSuppliers) { + return null; + } + + @Override + public EntryMessage traceEntry(Message message) { + return null; + } + + @Override + public void traceExit() { + + } + + @Override + public <R> R traceExit(R result) { + return null; + } + + @Override + public <R> R traceExit(String format, R result) { + return null; + } + + @Override + public void traceExit(EntryMessage message) { + + } + + @Override + public <R> R traceExit(EntryMessage message, R result) { + return null; + } + + @Override + public <R> R traceExit(Message message, R result) { + return null; + } + + @Override + public void warn(Marker marker, Message message) { + + } + + @Override + public void warn(Marker marker, Message message, Throwable throwable) { + + } + + @Override + public void warn(Marker marker, MessageSupplier messageSupplier) { + + } + + @Override + public void warn(Marker marker, MessageSupplier messageSupplier, Throwable throwable) { + + } + + @Override + public void warn(Marker marker, CharSequence message) { + + } + + @Override + public void warn(Marker marker, CharSequence message, Throwable throwable) { + + } + + @Override + public void warn(Marker marker, Object message) { + + } + + @Override + public void warn(Marker marker, Object message, Throwable throwable) { + + } + + @Override + public void warn(Marker marker, String message) { + + } + + @Override + public void warn(Marker marker, String message, Object... params) { + + } + + @Override + public void warn(Marker marker, String message, Supplier<?>... paramSuppliers) { + + } + + @Override + public void warn(Marker marker, String message, Throwable throwable) { + + } + + @Override + public void warn(Marker marker, Supplier<?> messageSupplier) { + + } + + @Override + public void warn(Marker marker, Supplier<?> messageSupplier, Throwable throwable) { + + } + + @Override + public void warn(Message message) { + + } + + @Override + public void warn(Message message, Throwable throwable) { + + } + + @Override + public void warn(MessageSupplier messageSupplier) { + + } + + @Override + public void warn(MessageSupplier messageSupplier, Throwable throwable) { + + } + + @Override + public void warn(CharSequence message) { + + } + + @Override + public void warn(CharSequence message, Throwable throwable) { + + } + + @Override + public void warn(Object message) { + + } + + @Override + public void warn(Object message, Throwable throwable) { + + } + + @Override + public void warn(String message) { + + } + + @Override + public void warn(String message, Object... params) { + + } + + @Override + public void warn(String message, Supplier<?>... paramSuppliers) { + + } + + @Override + public void warn(String message, Throwable throwable) { + + } + + @Override + public void warn(Supplier<?> messageSupplier) { + + } + + @Override + public void warn(Supplier<?> messageSupplier, Throwable throwable) { + + } + + @Override + public void warn(Marker marker, String message, Object p0) { + + } + + @Override + public void warn(Marker marker, String message, Object p0, Object p1) { + + } + + @Override + public void warn(Marker marker, String message, Object p0, Object p1, Object p2) { + + } + + @Override + public void warn(Marker marker, String message, Object p0, Object p1, Object p2, Object p3) { + + } + + @Override + public void warn(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4) { + + } + + @Override + public void warn(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5) { + + } + + @Override + public void warn(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6) { + + } + + @Override + public void warn(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7) { + + } + + @Override + public void warn(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, Object p8) { + + } + + @Override + public void warn(Marker marker, String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, Object p8, Object p9) { + + } + + @Override + public void warn(String message, Object p0) { + + } + + @Override + public void warn(String message, Object p0, Object p1) { + + } + + @Override + public void warn(String message, Object p0, Object p1, Object p2) { + + } + + @Override + public void warn(String message, Object p0, Object p1, Object p2, Object p3) { + + } + + @Override + public void warn(String message, Object p0, Object p1, Object p2, Object p3, Object p4) { + + } + + @Override + public void warn(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5) { + + } + + @Override + public void warn(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6) { + + } + + @Override + public void warn(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7) { + + } + + @Override + public void warn(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, Object p8) { + + } + + @Override + public void warn(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, Object p8, Object p9) { + + } +} diff --git a/poi/src/main/java/org/apache/poi/logging/PoiLogManager.java b/poi/src/main/java/org/apache/poi/logging/PoiLogManager.java new file mode 100644 index 0000000000..78ec997cc5 --- /dev/null +++ b/poi/src/main/java/org/apache/poi/logging/PoiLogManager.java @@ -0,0 +1,68 @@ +/* Copyright 2004 The Apache Software Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.poi.logging; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.apache.poi.util.ExceptionUtil; + +/** + * This class is used to get a log4j logger for the XmlBeans project. + * <p>Internal use only.</p> + * <p>Fails over to a No-Op logger if there are problems creating log4j logger.</p> + * + * @since POI 5.4.0 + */ +public final class PoiLogManager { + + // Sleep time in milliseconds (10 minutes) + private static final long SLEEP_TIME = 10 * 60 * 1000; + private static long LAST_TIME = 0; + + private PoiLogManager() { + } + + public static Logger getLogger(Class<?> clz) { + try { + final Logger logger = LogManager.getLogger(clz); + if (logger == null) { + if (shouldLog()) { + System.err.println("[PoiLogManager] Log4J returned null logger. Falling back to No-Op logger."); + } + return NoOpLogger.INSTANCE; + } + return logger; + } catch (Throwable t) { + if (!ExceptionUtil.isFatal(t)) { + if (shouldLog()) { + System.err.println("[PoiLogManager] Issue loading Log4J. Falling back to No-Op logger."); + t.printStackTrace(); + } + } + return NoOpLogger.INSTANCE; + } + } + + private static synchronized boolean shouldLog() { + final long time = System.currentTimeMillis(); + if (time > LAST_TIME + SLEEP_TIME) { + LAST_TIME = time; + return true; + } + return false; + } + +} diff --git a/poi/src/main/java/org/apache/poi/poifs/crypt/ChunkedCipherOutputStream.java b/poi/src/main/java/org/apache/poi/poifs/crypt/ChunkedCipherOutputStream.java index 793cb5000b..f366a03f8c 100644 --- a/poi/src/main/java/org/apache/poi/poifs/crypt/ChunkedCipherOutputStream.java +++ b/poi/src/main/java/org/apache/poi/poifs/crypt/ChunkedCipherOutputStream.java @@ -29,8 +29,8 @@ import java.security.GeneralSecurityException; import javax.crypto.Cipher; import com.zaxxer.sparsebits.SparseBitSet; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.EncryptedDocumentException; import org.apache.poi.poifs.filesystem.DirectoryNode; import org.apache.poi.poifs.filesystem.POIFSWriterEvent; @@ -42,7 +42,7 @@ import org.apache.poi.util.TempFile; @Internal public abstract class ChunkedCipherOutputStream extends FilterOutputStream { - private static final Logger LOG = LogManager.getLogger(ChunkedCipherOutputStream.class); + private static final Logger LOG = PoiLogManager.getLogger(ChunkedCipherOutputStream.class); private static final int STREAMING = -1; diff --git a/poi/src/main/java/org/apache/poi/poifs/crypt/standard/StandardEncryptor.java b/poi/src/main/java/org/apache/poi/poifs/crypt/standard/StandardEncryptor.java index 8eb813ba61..1fd68da8f0 100644 --- a/poi/src/main/java/org/apache/poi/poifs/crypt/standard/StandardEncryptor.java +++ b/poi/src/main/java/org/apache/poi/poifs/crypt/standard/StandardEncryptor.java @@ -35,8 +35,8 @@ import javax.crypto.Cipher; import javax.crypto.CipherOutputStream; import javax.crypto.SecretKey; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.EncryptedDocumentException; import org.apache.poi.poifs.crypt.CryptoFunctions; import org.apache.poi.poifs.crypt.DataSpaceMapUtils; @@ -53,7 +53,7 @@ import org.apache.poi.util.RandomSingleton; import org.apache.poi.util.TempFile; public class StandardEncryptor extends Encryptor { - private static final Logger LOG = LogManager.getLogger(StandardEncryptor.class); + private static final Logger LOG = PoiLogManager.getLogger(StandardEncryptor.class); protected StandardEncryptor() {} diff --git a/poi/src/main/java/org/apache/poi/poifs/filesystem/POIFSFileSystem.java b/poi/src/main/java/org/apache/poi/poifs/filesystem/POIFSFileSystem.java index 97e703b7e2..6ed6610255 100644 --- a/poi/src/main/java/org/apache/poi/poifs/filesystem/POIFSFileSystem.java +++ b/poi/src/main/java/org/apache/poi/poifs/filesystem/POIFSFileSystem.java @@ -33,8 +33,8 @@ import java.util.Iterator; import java.util.List; import org.apache.commons.io.output.UnsynchronizedByteArrayOutputStream; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.EmptyFileException; import org.apache.poi.poifs.common.POIFSBigBlockSize; import org.apache.poi.poifs.common.POIFSConstants; @@ -65,7 +65,7 @@ public class POIFSFileSystem extends BlockStore private static final int MAX_ALLOCATION_SIZE = 250_000_000; - private static final Logger LOG = LogManager.getLogger(POIFSFileSystem.class); + private static final Logger LOG = PoiLogManager.getLogger(POIFSFileSystem.class); /** * Maximum number size (in blocks) of the allocation table as supported by diff --git a/poi/src/main/java/org/apache/poi/poifs/filesystem/TempFilePOIFSFileSystem.java b/poi/src/main/java/org/apache/poi/poifs/filesystem/TempFilePOIFSFileSystem.java index 87b18544f0..5cb52b07ba 100644 --- a/poi/src/main/java/org/apache/poi/poifs/filesystem/TempFilePOIFSFileSystem.java +++ b/poi/src/main/java/org/apache/poi/poifs/filesystem/TempFilePOIFSFileSystem.java @@ -16,8 +16,8 @@ ==================================================================== */ package org.apache.poi.poifs.filesystem; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.poifs.nio.FileBackedDataSource; import org.apache.poi.util.Beta; import org.apache.poi.util.TempFile; @@ -32,7 +32,7 @@ import java.io.IOException; */ @Beta public class TempFilePOIFSFileSystem extends POIFSFileSystem { - private static final Logger LOG = LogManager.getLogger(TempFilePOIFSFileSystem.class); + private static final Logger LOG = PoiLogManager.getLogger(TempFilePOIFSFileSystem.class); File tempFile; @Override diff --git a/poi/src/main/java/org/apache/poi/poifs/macros/VBAMacroReader.java b/poi/src/main/java/org/apache/poi/poifs/macros/VBAMacroReader.java index 5d5081a8f2..5726ccec52 100644 --- a/poi/src/main/java/org/apache/poi/poifs/macros/VBAMacroReader.java +++ b/poi/src/main/java/org/apache/poi/poifs/macros/VBAMacroReader.java @@ -38,8 +38,8 @@ import java.util.zip.ZipInputStream; import org.apache.commons.io.input.UnsynchronizedByteArrayInputStream; import org.apache.commons.io.output.UnsynchronizedByteArrayOutputStream; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.poifs.filesystem.DirectoryNode; import org.apache.poi.poifs.filesystem.DocumentInputStream; import org.apache.poi.poifs.filesystem.DocumentNode; @@ -70,7 +70,7 @@ import org.apache.poi.util.StringUtil; */ @SuppressWarnings("unused") public class VBAMacroReader implements Closeable { - private static final Logger LOGGER = LogManager.getLogger(VBAMacroReader.class); + private static final Logger LOGGER = PoiLogManager.getLogger(VBAMacroReader.class); //arbitrary limit on size of strings to read, etc. private static final int MAX_STRING_LENGTH = 20000; diff --git a/poi/src/main/java/org/apache/poi/poifs/nio/FileBackedDataSource.java b/poi/src/main/java/org/apache/poi/poifs/nio/FileBackedDataSource.java index 59e8ab6cee..52ff3a2381 100644 --- a/poi/src/main/java/org/apache/poi/poifs/nio/FileBackedDataSource.java +++ b/poi/src/main/java/org/apache/poi/poifs/nio/FileBackedDataSource.java @@ -29,15 +29,15 @@ import java.nio.channels.FileChannel; import java.nio.channels.WritableByteChannel; import java.util.IdentityHashMap; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.util.IOUtils; /** * A POIFS {@link DataSource} backed by a File */ public class FileBackedDataSource extends DataSource implements Closeable { - private static final Logger LOG = LogManager.getLogger(FileBackedDataSource.class); + private static final Logger LOG = PoiLogManager.getLogger(FileBackedDataSource.class); private final FileChannel channel; private Long channelSize; diff --git a/poi/src/main/java/org/apache/poi/poifs/property/PropertyTable.java b/poi/src/main/java/org/apache/poi/poifs/property/PropertyTable.java index cb636971dd..203f23cd46 100644 --- a/poi/src/main/java/org/apache/poi/poifs/property/PropertyTable.java +++ b/poi/src/main/java/org/apache/poi/poifs/property/PropertyTable.java @@ -24,8 +24,8 @@ import java.util.ArrayList; import java.util.List; import java.util.Stack; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.poifs.common.POIFSBigBlockSize; import org.apache.poi.poifs.common.POIFSConstants; import org.apache.poi.poifs.filesystem.BATManaged; @@ -43,7 +43,7 @@ import static org.apache.logging.log4j.util.Unbox.box; * chain of blocks. */ public final class PropertyTable implements BATManaged { - private static final Logger LOG = LogManager.getLogger(PropertyTable.class); + private static final Logger LOG = PoiLogManager.getLogger(PropertyTable.class); private final HeaderBlock _header_block; private final List<Property> _properties = new ArrayList<>(); diff --git a/poi/src/main/java/org/apache/poi/sl/draw/BitmapImageRenderer.java b/poi/src/main/java/org/apache/poi/sl/draw/BitmapImageRenderer.java index b7ea54ddf5..0cf66780bd 100644 --- a/poi/src/main/java/org/apache/poi/sl/draw/BitmapImageRenderer.java +++ b/poi/src/main/java/org/apache/poi/sl/draw/BitmapImageRenderer.java @@ -43,8 +43,8 @@ import javax.imageio.stream.MemoryCacheImageInputStream; import org.apache.commons.collections4.iterators.IteratorIterable; import org.apache.commons.io.input.UnsynchronizedByteArrayInputStream; import org.apache.commons.io.output.UnsynchronizedByteArrayOutputStream; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.sl.usermodel.PictureData.PictureType; import org.apache.poi.util.IOUtils; @@ -52,7 +52,7 @@ import org.apache.poi.util.IOUtils; * For now this class renders only images supported by the javax.imageio.ImageIO framework. **/ public class BitmapImageRenderer implements ImageRenderer { - private static final Logger LOG = LogManager.getLogger(BitmapImageRenderer.class); + private static final Logger LOG = PoiLogManager.getLogger(BitmapImageRenderer.class); private static final ImageLoader[] IMAGE_LOADERS = { BitmapImageRenderer::loadColored, BitmapImageRenderer::loadGrayScaled, diff --git a/poi/src/main/java/org/apache/poi/sl/draw/DrawPaint.java b/poi/src/main/java/org/apache/poi/sl/draw/DrawPaint.java index ffff09db2f..ad2956ebee 100644 --- a/poi/src/main/java/org/apache/poi/sl/draw/DrawPaint.java +++ b/poi/src/main/java/org/apache/poi/sl/draw/DrawPaint.java @@ -46,8 +46,8 @@ import java.util.TreeMap; import java.util.function.BiFunction; import java.util.stream.Stream; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.sl.usermodel.AbstractColorStyle; import org.apache.poi.sl.usermodel.ColorStyle; import org.apache.poi.sl.usermodel.Insets2D; @@ -71,7 +71,7 @@ public class DrawPaint { // HSL code is public domain - see https://tips4java.wordpress.com/contact-us/ - private static final Logger LOG = LogManager.getLogger(DrawPaint.class); + private static final Logger LOG = PoiLogManager.getLogger(DrawPaint.class); private static final Color TRANSPARENT = new Color(1f,1f,1f,0f); diff --git a/poi/src/main/java/org/apache/poi/sl/draw/DrawPictureShape.java b/poi/src/main/java/org/apache/poi/sl/draw/DrawPictureShape.java index 764f1f576a..0b9ae3cb13 100644 --- a/poi/src/main/java/org/apache/poi/sl/draw/DrawPictureShape.java +++ b/poi/src/main/java/org/apache/poi/sl/draw/DrawPictureShape.java @@ -28,8 +28,8 @@ import java.util.NoSuchElementException; import java.util.ServiceConfigurationError; import java.util.ServiceLoader; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.common.usermodel.PictureType; import org.apache.poi.poifs.filesystem.FileMagic; import org.apache.poi.sl.usermodel.PictureData; @@ -38,7 +38,7 @@ import org.apache.poi.sl.usermodel.RectAlign; public class DrawPictureShape extends DrawSimpleShape { - private static final Logger LOG = LogManager.getLogger(DrawPictureShape.class); + private static final Logger LOG = PoiLogManager.getLogger(DrawPictureShape.class); public DrawPictureShape(PictureShape<?,?> shape) { super(shape); diff --git a/poi/src/main/java/org/apache/poi/sl/draw/DrawTextParagraph.java b/poi/src/main/java/org/apache/poi/sl/draw/DrawTextParagraph.java index a07b15efce..189f9eabfe 100644 --- a/poi/src/main/java/org/apache/poi/sl/draw/DrawTextParagraph.java +++ b/poi/src/main/java/org/apache/poi/sl/draw/DrawTextParagraph.java @@ -41,8 +41,8 @@ import java.util.List; import java.util.Locale; import java.util.Map; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.common.usermodel.fonts.FontGroup; import org.apache.poi.common.usermodel.fonts.FontGroup.FontGroupRange; import org.apache.poi.common.usermodel.fonts.FontInfo; @@ -69,7 +69,7 @@ import org.apache.poi.util.Units; import org.w3c.dom.Text; public class DrawTextParagraph implements Drawable { - private static final Logger LOG = LogManager.getLogger(DrawTextParagraph.class); + private static final Logger LOG = PoiLogManager.getLogger(DrawTextParagraph.class); /** Keys for passing hyperlinks to the graphics context */ public static final XlinkAttribute HYPERLINK_HREF = new XlinkAttribute("href"); diff --git a/poi/src/main/java/org/apache/poi/sl/draw/SLGraphics.java b/poi/src/main/java/org/apache/poi/sl/draw/SLGraphics.java index a570b9f892..2cfa92c62f 100644 --- a/poi/src/main/java/org/apache/poi/sl/draw/SLGraphics.java +++ b/poi/src/main/java/org/apache/poi/sl/draw/SLGraphics.java @@ -37,8 +37,8 @@ import java.awt.image.renderable.RenderableImage; import java.text.AttributedCharacterIterator; import java.util.Map; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.sl.usermodel.FreeformShape; import org.apache.poi.sl.usermodel.GroupShape; import org.apache.poi.sl.usermodel.Insets2D; @@ -55,7 +55,7 @@ import org.apache.poi.util.SuppressForbidden; */ public class SLGraphics extends Graphics2D implements Cloneable { - private static final Logger LOG = LogManager.getLogger(SLGraphics.class); + private static final Logger LOG = PoiLogManager.getLogger(SLGraphics.class); //The ppt object to write into. private GroupShape<?,?> _group; diff --git a/poi/src/main/java/org/apache/poi/sl/draw/geom/PresetParser.java b/poi/src/main/java/org/apache/poi/sl/draw/geom/PresetParser.java index 998b0ee776..424e8aa011 100644 --- a/poi/src/main/java/org/apache/poi/sl/draw/geom/PresetParser.java +++ b/poi/src/main/java/org/apache/poi/sl/draw/geom/PresetParser.java @@ -27,8 +27,8 @@ import javax.xml.stream.XMLStreamConstants; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.sl.usermodel.PaintStyle.PaintModifier; import org.apache.poi.util.Internal; @@ -55,7 +55,7 @@ class PresetParser { } } - private static final Logger LOG = LogManager.getLogger(PresetParser.class); + private static final Logger LOG = PoiLogManager.getLogger(PresetParser.class); private Mode mode; diff --git a/poi/src/main/java/org/apache/poi/sl/extractor/SlideShowExtractor.java b/poi/src/main/java/org/apache/poi/sl/extractor/SlideShowExtractor.java index c1243b3804..1b1480caa6 100644 --- a/poi/src/main/java/org/apache/poi/sl/extractor/SlideShowExtractor.java +++ b/poi/src/main/java/org/apache/poi/sl/extractor/SlideShowExtractor.java @@ -26,8 +26,8 @@ import java.util.function.Function; import java.util.function.Predicate; import com.zaxxer.sparsebits.SparseBitSet; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.extractor.POITextExtractor; import org.apache.poi.sl.usermodel.MasterSheet; import org.apache.poi.sl.usermodel.Notes; @@ -57,7 +57,7 @@ public class SlideShowExtractor< S extends Shape<S,P>, P extends TextParagraph<S,P,? extends TextRun> > implements POITextExtractor { - private static final Logger LOG = LogManager.getLogger(SlideShowExtractor.class); + private static final Logger LOG = PoiLogManager.getLogger(SlideShowExtractor.class); // placeholder text for slide numbers private static final String SLIDE_NUMBER_PH = "‹#›"; diff --git a/poi/src/main/java/org/apache/poi/sl/image/ImageHeaderBitmap.java b/poi/src/main/java/org/apache/poi/sl/image/ImageHeaderBitmap.java index f16fe436e1..352ebecd65 100644 --- a/poi/src/main/java/org/apache/poi/sl/image/ImageHeaderBitmap.java +++ b/poi/src/main/java/org/apache/poi/sl/image/ImageHeaderBitmap.java @@ -24,14 +24,14 @@ import java.io.IOException; import javax.imageio.ImageIO; import org.apache.commons.io.input.UnsynchronizedByteArrayInputStream; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.util.Internal; import org.apache.poi.util.Units; @Internal public class ImageHeaderBitmap { - private static final Logger LOG = LogManager.getLogger(ImageHeaderBitmap.class); + private static final Logger LOG = PoiLogManager.getLogger(ImageHeaderBitmap.class); private final Dimension size; diff --git a/poi/src/main/java/org/apache/poi/sl/image/ImageHeaderEMF.java b/poi/src/main/java/org/apache/poi/sl/image/ImageHeaderEMF.java index 646c88eb9d..7c3a577e31 100644 --- a/poi/src/main/java/org/apache/poi/sl/image/ImageHeaderEMF.java +++ b/poi/src/main/java/org/apache/poi/sl/image/ImageHeaderEMF.java @@ -20,15 +20,15 @@ package org.apache.poi.sl.image; import java.awt.Dimension; import java.awt.Rectangle; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.util.Internal; import org.apache.poi.util.LittleEndian; import org.apache.poi.util.LocaleUtil; @Internal public class ImageHeaderEMF { - private static final Logger LOG = LogManager.getLogger(ImageHeaderEMF.class); + private static final Logger LOG = PoiLogManager.getLogger(ImageHeaderEMF.class); private static final String EMF_SIGNATURE = " EMF"; // 0x464D4520 (LE) diff --git a/poi/src/main/java/org/apache/poi/sl/image/ImageHeaderWMF.java b/poi/src/main/java/org/apache/poi/sl/image/ImageHeaderWMF.java index cf2f75867f..23d44c2e7b 100644 --- a/poi/src/main/java/org/apache/poi/sl/image/ImageHeaderWMF.java +++ b/poi/src/main/java/org/apache/poi/sl/image/ImageHeaderWMF.java @@ -22,8 +22,8 @@ import java.awt.Rectangle; import java.io.IOException; import java.io.OutputStream; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.util.Internal; import org.apache.poi.util.LittleEndian; import org.apache.poi.util.LittleEndianConsts; @@ -47,7 +47,7 @@ import org.apache.poi.util.Units; public class ImageHeaderWMF { public static final int APMHEADER_KEY = 0x9AC6CDD7; - private static final Logger LOG = LogManager.getLogger(ImageHeaderWMF.class); + private static final Logger LOG = PoiLogManager.getLogger(ImageHeaderWMF.class); @SuppressWarnings("unused") private final int handle; diff --git a/poi/src/main/java/org/apache/poi/sl/usermodel/ObjectData.java b/poi/src/main/java/org/apache/poi/sl/usermodel/ObjectData.java index 11a94281ed..badf89e583 100644 --- a/poi/src/main/java/org/apache/poi/sl/usermodel/ObjectData.java +++ b/poi/src/main/java/org/apache/poi/sl/usermodel/ObjectData.java @@ -21,8 +21,8 @@ import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.poifs.filesystem.DirectoryEntry; import org.apache.poi.poifs.filesystem.FileMagic; import org.apache.poi.poifs.filesystem.POIFSFileSystem; @@ -68,7 +68,7 @@ public interface ObjectData { FileMagic fm = FileMagic.valueOf(is); return fm == FileMagic.OLE2; } catch (IOException e) { - Logger LOG = LogManager.getLogger(ObjectData.class); + Logger LOG = PoiLogManager.getLogger(ObjectData.class); LOG.atWarn().withThrowable(e).log("Can't determine filemagic of ole stream"); return false; } diff --git a/poi/src/main/java/org/apache/poi/ss/extractor/EmbeddedExtractor.java b/poi/src/main/java/org/apache/poi/ss/extractor/EmbeddedExtractor.java index b0b3cbd990..a59d8368e4 100644 --- a/poi/src/main/java/org/apache/poi/ss/extractor/EmbeddedExtractor.java +++ b/poi/src/main/java/org/apache/poi/ss/extractor/EmbeddedExtractor.java @@ -28,8 +28,8 @@ import java.util.Iterator; import java.util.List; import org.apache.commons.io.output.UnsynchronizedByteArrayOutputStream; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.hpsf.ClassID; import org.apache.poi.hpsf.ClassIDPredefined; import org.apache.poi.poifs.filesystem.DirectoryNode; @@ -56,7 +56,7 @@ import org.apache.poi.util.LocaleUtil; */ @Beta public class EmbeddedExtractor implements Iterable<EmbeddedExtractor> { - private static final Logger LOG = LogManager.getLogger(EmbeddedExtractor.class); + private static final Logger LOG = PoiLogManager.getLogger(EmbeddedExtractor.class); //arbitrarily selected; may need to increase private static final int DEFAULT_MAX_RECORD_LENGTH = 1_000_000; private static int MAX_RECORD_LENGTH = DEFAULT_MAX_RECORD_LENGTH; diff --git a/poi/src/main/java/org/apache/poi/ss/format/CellFormat.java b/poi/src/main/java/org/apache/poi/ss/format/CellFormat.java index 9a420540a5..0c9a73c87a 100644 --- a/poi/src/main/java/org/apache/poi/ss/format/CellFormat.java +++ b/poi/src/main/java/org/apache/poi/ss/format/CellFormat.java @@ -28,8 +28,8 @@ import java.util.regex.Pattern; import javax.swing.JLabel; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.ss.usermodel.Cell; import org.apache.poi.ss.usermodel.CellType; import org.apache.poi.ss.usermodel.ConditionalFormatting; @@ -93,7 +93,7 @@ import org.apache.poi.util.LocaleUtil; */ public class CellFormat { /** The logger to use in the formatting code. */ - private static final Logger LOG = LogManager.getLogger(CellFormat.class); + private static final Logger LOG = PoiLogManager.getLogger(CellFormat.class); private static final Pattern ONE_PART = Pattern.compile( CellFormatPart.FORMAT_PAT.pattern() + "(;|$)", diff --git a/poi/src/main/java/org/apache/poi/ss/format/CellFormatPart.java b/poi/src/main/java/org/apache/poi/ss/format/CellFormatPart.java index 9e437dfb24..990181baad 100644 --- a/poi/src/main/java/org/apache/poi/ss/format/CellFormatPart.java +++ b/poi/src/main/java/org/apache/poi/ss/format/CellFormatPart.java @@ -16,8 +16,8 @@ ==================================================================== */ package org.apache.poi.ss.format; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.hssf.util.HSSFColor; import org.apache.poi.util.CodepointsUtil; import org.apache.poi.util.LocaleUtil; @@ -47,7 +47,7 @@ import static org.apache.poi.ss.format.CellFormatter.quote; */ @SuppressWarnings("RegExpRepeatedSpace") public class CellFormatPart { - private static final Logger LOG = LogManager.getLogger(CellFormatPart.class); + private static final Logger LOG = PoiLogManager.getLogger(CellFormatPart.class); static final Map<String, Color> NAMED_COLORS; diff --git a/poi/src/main/java/org/apache/poi/ss/format/CellNumberFormatter.java b/poi/src/main/java/org/apache/poi/ss/format/CellNumberFormatter.java index 3a7c0102fd..11b08e927f 100644 --- a/poi/src/main/java/org/apache/poi/ss/format/CellNumberFormatter.java +++ b/poi/src/main/java/org/apache/poi/ss/format/CellNumberFormatter.java @@ -33,15 +33,15 @@ import java.util.Set; import java.util.TreeSet; import com.zaxxer.sparsebits.SparseBitSet; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.util.LocaleUtil; /** * This class implements printing out a value using a number format. */ public class CellNumberFormatter extends CellFormatter { - private static final Logger LOG = LogManager.getLogger(CellNumberFormatter.class); + private static final Logger LOG = PoiLogManager.getLogger(CellNumberFormatter.class); private final String desc; private final String printfFmt; diff --git a/poi/src/main/java/org/apache/poi/ss/formula/FormulaParser.java b/poi/src/main/java/org/apache/poi/ss/formula/FormulaParser.java index 3203120f52..020ae38d8c 100644 --- a/poi/src/main/java/org/apache/poi/ss/formula/FormulaParser.java +++ b/poi/src/main/java/org/apache/poi/ss/formula/FormulaParser.java @@ -22,8 +22,8 @@ import java.util.List; import java.util.Locale; import java.util.regex.Pattern; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.hssf.usermodel.HSSFFormulaEvaluator; import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.ss.SpreadsheetVersion; @@ -97,7 +97,7 @@ import org.apache.poi.util.StringUtil; */ @Internal public final class FormulaParser { - private static final Logger LOGGER = LogManager.getLogger(FormulaParser.class); + private static final Logger LOGGER = PoiLogManager.getLogger(FormulaParser.class); private final String _formulaString; private final int _formulaLength; diff --git a/poi/src/main/java/org/apache/poi/ss/formula/WorkbookEvaluator.java b/poi/src/main/java/org/apache/poi/ss/formula/WorkbookEvaluator.java index 6d503c7260..c92350c47e 100644 --- a/poi/src/main/java/org/apache/poi/ss/formula/WorkbookEvaluator.java +++ b/poi/src/main/java/org/apache/poi/ss/formula/WorkbookEvaluator.java @@ -25,8 +25,8 @@ import java.util.Map; import java.util.Stack; import java.util.TreeSet; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.logging.log4j.message.SimpleMessage; import org.apache.poi.ss.SpreadsheetVersion; import org.apache.poi.ss.formula.CollaboratingWorkbooksEnvironment.WorkbookNotFoundException; @@ -54,7 +54,7 @@ import static org.apache.logging.log4j.util.Unbox.box; @Internal public final class WorkbookEvaluator { - private static final Logger LOG = LogManager.getLogger(WorkbookEvaluator.class); + private static final Logger LOG = PoiLogManager.getLogger(WorkbookEvaluator.class); private final EvaluationWorkbook _workbook; private EvaluationCache _cache; @@ -78,7 +78,7 @@ public final class WorkbookEvaluator { private boolean dbgEvaluationOutputForNextEval; // special logger for formula evaluation output (because of possibly very large output) - private static final Logger EVAL_LOG = LogManager.getLogger("POI.FormulaEval"); + private static final Logger EVAL_LOG = PoiLogManager.getLogger("POI.FormulaEval"); // current indent level for evaluation; negative value for no output private int dbgEvaluationOutputIndent = -1; diff --git a/poi/src/main/java/org/apache/poi/ss/formula/constant/ErrorConstant.java b/poi/src/main/java/org/apache/poi/ss/formula/constant/ErrorConstant.java index d0817fb22e..97dd696c14 100644 --- a/poi/src/main/java/org/apache/poi/ss/formula/constant/ErrorConstant.java +++ b/poi/src/main/java/org/apache/poi/ss/formula/constant/ErrorConstant.java @@ -17,8 +17,8 @@ package org.apache.poi.ss.formula.constant; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.ss.usermodel.FormulaError; import static org.apache.logging.log4j.util.Unbox.box; @@ -30,7 +30,7 @@ import static org.apache.logging.log4j.util.Unbox.box; * {@code ErrorEval}. */ public final class ErrorConstant { - private static final Logger LOG = LogManager.getLogger(ErrorConstant.class); + private static final Logger LOG = PoiLogManager.getLogger(ErrorConstant.class); private static final ErrorConstant NULL = new ErrorConstant(FormulaError.NULL.getCode()); private static final ErrorConstant DIV_0 = new ErrorConstant(FormulaError.DIV0.getCode()); private static final ErrorConstant VALUE = new ErrorConstant(FormulaError.VALUE.getCode()); diff --git a/poi/src/main/java/org/apache/poi/ss/formula/functions/DateValue.java b/poi/src/main/java/org/apache/poi/ss/formula/functions/DateValue.java index 235beedd3a..908581af91 100644 --- a/poi/src/main/java/org/apache/poi/ss/formula/functions/DateValue.java +++ b/poi/src/main/java/org/apache/poi/ss/formula/functions/DateValue.java @@ -17,8 +17,8 @@ package org.apache.poi.ss.formula.functions; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.ss.formula.eval.*; import org.apache.poi.ss.util.DateParser; import org.apache.poi.ss.usermodel.DateUtil; @@ -45,7 +45,7 @@ import java.time.DateTimeException; */ public class DateValue extends Fixed1ArgFunction { - private static final Logger LOG = LogManager.getLogger(DateValue.class); + private static final Logger LOG = PoiLogManager.getLogger(DateValue.class); @Override public ValueEval evaluate(int srcRowIndex, int srcColumnIndex, ValueEval dateTextArg) { diff --git a/poi/src/main/java/org/apache/poi/ss/formula/functions/Indirect.java b/poi/src/main/java/org/apache/poi/ss/formula/functions/Indirect.java index 9cf3ade073..a0e3892695 100644 --- a/poi/src/main/java/org/apache/poi/ss/formula/functions/Indirect.java +++ b/poi/src/main/java/org/apache/poi/ss/formula/functions/Indirect.java @@ -17,8 +17,8 @@ package org.apache.poi.ss.formula.functions; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.ss.formula.FormulaParseException; import org.apache.poi.ss.formula.FormulaParser; import org.apache.poi.ss.formula.FormulaParsingWorkbook; @@ -47,7 +47,7 @@ import org.apache.poi.ss.usermodel.Table; */ public final class Indirect implements FreeRefFunction { - private static final Logger LOGGER = LogManager.getLogger(Indirect.class); + private static final Logger LOGGER = PoiLogManager.getLogger(Indirect.class); public static final FreeRefFunction instance = new Indirect(); private Indirect() { diff --git a/poi/src/main/java/org/apache/poi/ss/formula/functions/Irr.java b/poi/src/main/java/org/apache/poi/ss/formula/functions/Irr.java index f8ee32e799..d1805966c5 100644 --- a/poi/src/main/java/org/apache/poi/ss/formula/functions/Irr.java +++ b/poi/src/main/java/org/apache/poi/ss/formula/functions/Irr.java @@ -17,8 +17,8 @@ package org.apache.poi.ss.formula.functions; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.ss.formula.eval.ErrorEval; import org.apache.poi.ss.formula.eval.EvaluationException; import org.apache.poi.ss.formula.eval.NumberEval; @@ -35,7 +35,7 @@ import org.apache.poi.ss.formula.eval.ValueEval; public final class Irr implements Function { private static final int MAX_ITERATION_COUNT = 1000; private static final double ABSOLUTE_ACCURACY = 1E-7; - private static final Logger LOGGER = LogManager.getLogger(Irr.class); + private static final Logger LOGGER = PoiLogManager.getLogger(Irr.class); public ValueEval evaluate(final ValueEval[] args, final int srcRowIndex, final int srcColumnIndex) { diff --git a/poi/src/main/java/org/apache/poi/ss/formula/functions/Rate.java b/poi/src/main/java/org/apache/poi/ss/formula/functions/Rate.java index 70905b4edd..0e79434844 100644 --- a/poi/src/main/java/org/apache/poi/ss/formula/functions/Rate.java +++ b/poi/src/main/java/org/apache/poi/ss/formula/functions/Rate.java @@ -17,8 +17,8 @@ package org.apache.poi.ss.formula.functions; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.ss.formula.eval.ErrorEval; import org.apache.poi.ss.formula.eval.EvaluationException; import org.apache.poi.ss.formula.eval.NumberEval; @@ -29,7 +29,7 @@ import org.apache.poi.ss.formula.eval.ValueEval; * Implements the Excel Rate function */ public class Rate implements Function { - private static final Logger LOG = LogManager.getLogger(Rate.class); + private static final Logger LOG = PoiLogManager.getLogger(Rate.class); @Override public ValueEval evaluate(ValueEval[] args, int srcRowIndex, int srcColumnIndex) { diff --git a/poi/src/main/java/org/apache/poi/ss/formula/functions/TimeValue.java b/poi/src/main/java/org/apache/poi/ss/formula/functions/TimeValue.java index 2bb56e36be..e31f864803 100644 --- a/poi/src/main/java/org/apache/poi/ss/formula/functions/TimeValue.java +++ b/poi/src/main/java/org/apache/poi/ss/formula/functions/TimeValue.java @@ -17,8 +17,8 @@ package org.apache.poi.ss.formula.functions; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.ss.formula.eval.*; import org.apache.poi.ss.usermodel.DateUtil; import org.apache.poi.ss.util.DateParser; @@ -45,7 +45,7 @@ import java.time.LocalDate; */ public class TimeValue extends Fixed1ArgFunction { - private static final Logger LOG = LogManager.getLogger(TimeValue.class); + private static final Logger LOG = PoiLogManager.getLogger(TimeValue.class); @Override public ValueEval evaluate(int srcRowIndex, int srcColumnIndex, ValueEval dateTimeTextArg) { diff --git a/poi/src/main/java/org/apache/poi/ss/usermodel/DataFormatter.java b/poi/src/main/java/org/apache/poi/ss/usermodel/DataFormatter.java index a2ae2ba99b..b3de0462b0 100644 --- a/poi/src/main/java/org/apache/poi/ss/usermodel/DataFormatter.java +++ b/poi/src/main/java/org/apache/poi/ss/usermodel/DataFormatter.java @@ -36,8 +36,8 @@ import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.ss.format.CellFormat; import org.apache.poi.ss.format.CellFormatResult; import org.apache.poi.ss.formula.ConditionalFormattingEvaluator; @@ -221,7 +221,7 @@ public class DataFormatter { private final PropertyChangeSupport pcs; /** For logging any problems we find */ - private static final Logger LOG = LogManager.getLogger(DataFormatter.class); + private static final Logger LOG = PoiLogManager.getLogger(DataFormatter.class); /** * Creates a formatter using the {@link Locale#getDefault() default locale}. diff --git a/poi/src/main/java/org/apache/poi/ss/usermodel/FractionFormat.java b/poi/src/main/java/org/apache/poi/ss/usermodel/FractionFormat.java index 9c0b081c19..050b5eadd4 100644 --- a/poi/src/main/java/org/apache/poi/ss/usermodel/FractionFormat.java +++ b/poi/src/main/java/org/apache/poi/ss/usermodel/FractionFormat.java @@ -24,8 +24,8 @@ import java.text.ParsePosition; import java.util.regex.Matcher; import java.util.regex.Pattern; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.ss.format.SimpleFraction; import org.apache.poi.ss.formula.eval.NotImplementedException; @@ -43,7 +43,7 @@ import org.apache.poi.ss.formula.eval.NotImplementedException; @SuppressWarnings("serial") public class FractionFormat extends Format { - private static final Logger LOGGER = LogManager.getLogger(FractionFormat.class); + private static final Logger LOGGER = PoiLogManager.getLogger(FractionFormat.class); private static final Pattern DENOM_FORMAT_PATTERN = Pattern.compile("(#+)|(\\d+)"); //this was chosen to match the earlier limitation of max denom power diff --git a/poi/src/main/java/org/apache/poi/ss/util/CellUtil.java b/poi/src/main/java/org/apache/poi/ss/util/CellUtil.java index 0e930758a1..f3e5bf55b6 100644 --- a/poi/src/main/java/org/apache/poi/ss/util/CellUtil.java +++ b/poi/src/main/java/org/apache/poi/ss/util/CellUtil.java @@ -25,9 +25,9 @@ import java.util.Map; import java.util.Objects; import java.util.Set; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.poi.common.Duplicatable; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.ss.usermodel.BorderStyle; import org.apache.poi.ss.usermodel.Cell; import org.apache.poi.ss.usermodel.CellCopyContext; @@ -57,7 +57,7 @@ import org.apache.poi.util.Removal; */ public final class CellUtil { - private static final Logger LOGGER = LogManager.getLogger(CellUtil.class); + private static final Logger LOGGER = PoiLogManager.getLogger(CellUtil.class); private static final Set<CellPropertyType> SHORT_VALUES = EnumSet.of( CellPropertyType.BOTTOM_BORDER_COLOR, diff --git a/poi/src/main/java/org/apache/poi/ss/util/DateFormatConverter.java b/poi/src/main/java/org/apache/poi/ss/util/DateFormatConverter.java index 838b7edd8b..60d2578f5e 100644 --- a/poi/src/main/java/org/apache/poi/ss/util/DateFormatConverter.java +++ b/poi/src/main/java/org/apache/poi/ss/util/DateFormatConverter.java @@ -24,8 +24,8 @@ import java.util.List; import java.util.Locale; import java.util.Map; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.util.LocaleID; /** @@ -49,7 +49,7 @@ import org.apache.poi.util.LocaleID; */ @SuppressWarnings("unused") public final class DateFormatConverter { - private static final Logger LOG = LogManager.getLogger(DateFormatConverter.class); + private static final Logger LOG = PoiLogManager.getLogger(DateFormatConverter.class); private DateFormatConverter() { } diff --git a/poi/src/main/java/org/apache/poi/ss/util/ImageUtils.java b/poi/src/main/java/org/apache/poi/ss/util/ImageUtils.java index 18f162395f..7d4c0be5b8 100644 --- a/poi/src/main/java/org/apache/poi/ss/util/ImageUtils.java +++ b/poi/src/main/java/org/apache/poi/ss/util/ImageUtils.java @@ -31,8 +31,8 @@ import javax.imageio.ImageReader; import javax.imageio.stream.ImageInputStream; import org.apache.commons.io.input.UnsynchronizedByteArrayInputStream; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.hssf.usermodel.HSSFClientAnchor; import org.apache.poi.ss.usermodel.ClientAnchor; import org.apache.poi.ss.usermodel.Picture; @@ -45,7 +45,7 @@ import org.w3c.dom.Element; import org.w3c.dom.NodeList; public final class ImageUtils { - private static final Logger LOG = LogManager.getLogger(ImageUtils.class); + private static final Logger LOG = PoiLogManager.getLogger(ImageUtils.class); private static final int WIDTH_UNITS = 1024; private static final int HEIGHT_UNITS = 256; diff --git a/poi/src/main/java/org/apache/poi/util/Configurator.java b/poi/src/main/java/org/apache/poi/util/Configurator.java index b82ad9b8c7..6c10bb7788 100644 --- a/poi/src/main/java/org/apache/poi/util/Configurator.java +++ b/poi/src/main/java/org/apache/poi/util/Configurator.java @@ -17,14 +17,14 @@ package org.apache.poi.util; limitations under the License. ==================================================================== */ -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; /** * Helper for fetching int values from system properties */ public class Configurator { - private static final Logger LOG = LogManager.getLogger(Configurator.class); + private static final Logger LOG = PoiLogManager.getLogger(Configurator.class); public static int getIntValue(String systemProperty, int defaultValue) { String property = System.getProperty(systemProperty); diff --git a/poi/src/main/java/org/apache/poi/util/IOUtils.java b/poi/src/main/java/org/apache/poi/util/IOUtils.java index 2b9cbd730b..430e895557 100644 --- a/poi/src/main/java/org/apache/poi/util/IOUtils.java +++ b/poi/src/main/java/org/apache/poi/util/IOUtils.java @@ -34,13 +34,13 @@ import java.util.zip.Checksum; import org.apache.commons.io.input.BoundedInputStream; import org.apache.commons.io.output.UnsynchronizedByteArrayOutputStream; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.EmptyFileException; @Internal public final class IOUtils { - private static final Logger LOG = LogManager.getLogger(IOUtils.class); + private static final Logger LOG = PoiLogManager.getLogger(IOUtils.class); /** * The default buffer size to use for the skip() methods. diff --git a/poi/src/main/java/org/apache/poi/util/XMLHelper.java b/poi/src/main/java/org/apache/poi/util/XMLHelper.java index eaa27edffb..341062d7de 100644 --- a/poi/src/main/java/org/apache/poi/util/XMLHelper.java +++ b/poi/src/main/java/org/apache/poi/util/XMLHelper.java @@ -48,8 +48,8 @@ import javax.xml.validation.SchemaFactory; import org.apache.logging.log4j.Level; import org.apache.logging.log4j.LogBuilder; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.xml.sax.ErrorHandler; import org.xml.sax.InputSource; import org.xml.sax.SAXException; @@ -78,7 +78,7 @@ public final class XMLHelper { }; - private static final Logger LOG = LogManager.getLogger(XMLHelper.class); + private static final Logger LOG = PoiLogManager.getLogger(XMLHelper.class); private static long lastLog; // DocumentBuilderFactory.newDocumentBuilder is thread-safe diff --git a/poi/src/test/java/org/apache/poi/hssf/dev/BiffViewer.java b/poi/src/test/java/org/apache/poi/hssf/dev/BiffViewer.java index b435034631..21a8aff6d7 100644 --- a/poi/src/test/java/org/apache/poi/hssf/dev/BiffViewer.java +++ b/poi/src/test/java/org/apache/poi/hssf/dev/BiffViewer.java @@ -33,8 +33,8 @@ import java.util.List; import org.apache.commons.io.output.CloseShieldOutputStream; import org.apache.commons.io.output.NullOutputStream; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.hssf.dev.BiffDumpingStream.IBiffRecordListener; import org.apache.poi.hssf.record.ContinueRecord; import org.apache.poi.hssf.record.HSSFRecordTypes; @@ -53,7 +53,7 @@ import org.apache.poi.util.StringUtil; */ public final class BiffViewer { private static final char[] NEW_LINE_CHARS = System.getProperty("line.separator").toCharArray(); - private static final Logger LOG = LogManager.getLogger(BiffViewer.class); + private static final Logger LOG = PoiLogManager.getLogger(BiffViewer.class); private static final String ESCHER_SERIALIZE = "poi.deserialize.escher"; private static final int DUMP_LINE_LEN = 16; private static final char[] COLUMN_SEPARATOR = " | ".toCharArray(); diff --git a/poi/src/test/java/org/apache/poi/hssf/usermodel/TestMatrixFormulasFromBinarySpreadsheet.java b/poi/src/test/java/org/apache/poi/hssf/usermodel/TestMatrixFormulasFromBinarySpreadsheet.java index 081635d85a..643e11bed3 100644 --- a/poi/src/test/java/org/apache/poi/hssf/usermodel/TestMatrixFormulasFromBinarySpreadsheet.java +++ b/poi/src/test/java/org/apache/poi/hssf/usermodel/TestMatrixFormulasFromBinarySpreadsheet.java @@ -28,8 +28,8 @@ import java.util.List; import java.util.Locale; import java.util.stream.Stream; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.hssf.HSSFTestDataSamples; import org.apache.poi.ss.formula.eval.ErrorEval; import org.apache.poi.ss.formula.functions.TestMathX; @@ -47,7 +47,7 @@ import org.junit.jupiter.params.provider.MethodSource; final class TestMatrixFormulasFromBinarySpreadsheet { - private static final Logger LOG = LogManager.getLogger(TestMatrixFormulasFromBinarySpreadsheet.class); + private static final Logger LOG = PoiLogManager.getLogger(TestMatrixFormulasFromBinarySpreadsheet.class); private static HSSFWorkbook workbook; diff --git a/poi/src/test/java/org/apache/poi/poifs/filesystem/TestEmptyDocument.java b/poi/src/test/java/org/apache/poi/poifs/filesystem/TestEmptyDocument.java index 9507b13a7d..84931e302c 100644 --- a/poi/src/test/java/org/apache/poi/poifs/filesystem/TestEmptyDocument.java +++ b/poi/src/test/java/org/apache/poi/poifs/filesystem/TestEmptyDocument.java @@ -26,8 +26,8 @@ import java.io.IOException; import java.util.stream.Stream; import org.apache.commons.io.output.UnsynchronizedByteArrayOutputStream; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.util.IOUtils; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; @@ -35,7 +35,7 @@ import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; final class TestEmptyDocument { - private static final Logger LOG = LogManager.getLogger(TestEmptyDocument.class); + private static final Logger LOG = PoiLogManager.getLogger(TestEmptyDocument.class); private interface EmptyDoc { void handle(DirectoryEntry dir) throws IOException; diff --git a/poi/src/test/java/org/apache/poi/ss/usermodel/BaseTestBugzillaIssues.java b/poi/src/test/java/org/apache/poi/ss/usermodel/BaseTestBugzillaIssues.java index 9039293b5b..8767251853 100644 --- a/poi/src/test/java/org/apache/poi/ss/usermodel/BaseTestBugzillaIssues.java +++ b/poi/src/test/java/org/apache/poi/ss/usermodel/BaseTestBugzillaIssues.java @@ -39,8 +39,8 @@ import java.util.List; import java.util.Map; import org.apache.commons.io.output.UnsynchronizedByteArrayOutputStream; -import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.poi.logging.PoiLogManager; import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.ss.ITestDataProvider; import org.apache.poi.ss.SpreadsheetVersion; @@ -58,7 +58,7 @@ import org.junit.jupiter.api.Test; * A base class for bugzilla issues that can be described in terms of common ss interfaces. */ public abstract class BaseTestBugzillaIssues { - private static final Logger LOG = LogManager.getLogger(BaseTestBugzillaIssues.class); + private static final Logger LOG = PoiLogManager.getLogger(BaseTestBugzillaIssues.class); private static final String TEST_32 = "Some text with 32 characters to "; private static final String TEST_255 = "Some very long text that is exactly 255 characters, which are allowed here, bla bla, bla bla, bla bla, bla bla, bla bla, bla bla, bla bla, bla bla, bla bla, bla bla, bla bla, bla bla, bla bla, bla bla, bla bla, bla bla, bla bla, bla bla, bla bla, bla....."; |