diff options
author | Marius Volkhart <mariusvolkhart@apache.org> | 2021-02-21 20:57:25 +0000 |
---|---|---|
committer | Marius Volkhart <mariusvolkhart@apache.org> | 2021-02-21 20:57:25 +0000 |
commit | 259c9967efb354a0feff2a861ac8bd20582b6562 (patch) | |
tree | ba76a4f20503d97e77bdf18146d59e00a2369fb9 /src/java/org/apache/poi/common | |
parent | 6d10f26718f84591671d7cafdcc009345b9c777e (diff) | |
download | poi-259c9967efb354a0feff2a861ac8bd20582b6562.tar.gz poi-259c9967efb354a0feff2a861ac8bd20582b6562.zip |
[bug-63046] Use Log4j 2 for logging
This removes the POILogger and POILogFactory mechanism for logging. This mechanism was created at a time when the Java landscape looked very different than it does today.
Log4j 2 is an Apache Foundation project that is well maintained and is widely regarded as having good performance and capabilities. We use only the Log4j API artifact. This lets application developers choose how they want to capture logging events if at all. Integrations with Log4j 2 Core and Logback are available from the Log4j project.
Closes #224
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1886770 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/poi/common')
-rw-r--r-- | src/java/org/apache/poi/common/usermodel/fonts/FontCharset.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/java/org/apache/poi/common/usermodel/fonts/FontCharset.java b/src/java/org/apache/poi/common/usermodel/fonts/FontCharset.java index 28df6cad4e..044765738f 100644 --- a/src/java/org/apache/poi/common/usermodel/fonts/FontCharset.java +++ b/src/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.poi.util.POILogFactory; -import org.apache.poi.util.POILogger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; /** * Charset represents the basic set of characters associated with a font (that it can display), and @@ -99,8 +99,8 @@ public enum FontCharset { charset = Charset.forName(javaCharsetName); return; } catch (UnsupportedCharsetException e) { - POILogger logger = POILogFactory.getLogger(FontCharset.class); - logger.log(POILogger.WARN, "Unsupported charset: "+javaCharsetName); + Logger logger = LogManager.getLogger(FontCharset.class); + logger.atWarn().log("Unsupported charset: {}", javaCharsetName); } } charset = null; |