diff options
Diffstat (limited to 'poi/src/main/java')
80 files changed, 2134 insertions, 157 deletions
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 |