You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by gg...@apache.org on 2017/10/06 22:38:17 UTC

logging-log4j2 git commit: [LOG4J2-2053] Exception java.nio.charset.UnsupportedCharsetException: cp65001 in 2.9.0. Add some bullet-proofing to low-level error reporting.

Repository: logging-log4j2
Updated Branches:
  refs/heads/master c66cfd853 -> 6f39fce8c


[LOG4J2-2053] Exception java.nio.charset.UnsupportedCharsetException:
cp65001 in 2.9.0. Add some bullet-proofing to low-level error reporting.

Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/6f39fce8
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/6f39fce8
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/6f39fce8

Branch: refs/heads/master
Commit: 6f39fce8ca8ebce2cd0ebef480835ab53a844865
Parents: c66cfd8
Author: Gary Gregory <gg...@apache.org>
Authored: Fri Oct 6 16:38:15 2017 -0600
Committer: Gary Gregory <gg...@apache.org>
Committed: Fri Oct 6 16:38:15 2017 -0600

----------------------------------------------------------------------
 .../main/java/org/apache/logging/log4j/util/LowLevelLogUtil.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/6f39fce8/log4j-api/src/main/java/org/apache/logging/log4j/util/LowLevelLogUtil.java
----------------------------------------------------------------------
diff --git a/log4j-api/src/main/java/org/apache/logging/log4j/util/LowLevelLogUtil.java b/log4j-api/src/main/java/org/apache/logging/log4j/util/LowLevelLogUtil.java
index 21058d8..a447bcc 100644
--- a/log4j-api/src/main/java/org/apache/logging/log4j/util/LowLevelLogUtil.java
+++ b/log4j-api/src/main/java/org/apache/logging/log4j/util/LowLevelLogUtil.java
@@ -34,7 +34,9 @@ final class LowLevelLogUtil {
     private static PrintWriter writer = new PrintWriter(System.err, true);
 
     public static void logException(final Throwable exception) {
-        exception.printStackTrace(writer);
+        if (exception != null) {
+            exception.printStackTrace(writer);
+        }
     }
 
     public static void logException(final String message, final Throwable exception) {