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 2022/02/06 12:57:50 UTC

[logging-log4j2] 01/04: Better error reporting.

This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch release-2.x
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git

commit 9cb210c64194db4cd51b59fa4e505b6992cf8c38
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sat Feb 5 18:15:44 2022 -0500

    Better error reporting.
---
 .../src/main/java/org/apache/log4j/config/PropertiesConfiguration.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/log4j-1.2-api/src/main/java/org/apache/log4j/config/PropertiesConfiguration.java b/log4j-1.2-api/src/main/java/org/apache/log4j/config/PropertiesConfiguration.java
index c1e150f..0b77118 100644
--- a/log4j-1.2-api/src/main/java/org/apache/log4j/config/PropertiesConfiguration.java
+++ b/log4j-1.2-api/src/main/java/org/apache/log4j/config/PropertiesConfiguration.java
@@ -594,7 +594,7 @@ public class PropertiesConfiguration extends Log4j1Configuration {
         try {
             return LoaderUtil.newInstanceOf(className);
         } catch (ReflectiveOperationException ex) {
-            LOGGER.error("Unable to create {} {} due to {}:{}", type, className, ex.getClass().getSimpleName(), ex.getMessage());
+            LOGGER.error("Unable to create {} {} due to {}:{}", type, className, ex.getClass().getSimpleName(), ex.getMessage(), ex);
             return null;
         }
     }