logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1609248 - /logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/ConsoleAppenderNoAnsiStyleLayoutMain.java
Date Wed, 09 Jul 2014 17:23:25 GMT
Author: ggregory
Date: Wed Jul  9 17:23:25 2014
New Revision: 1609248

URL: http://svn.apache.org/r1609248
Log:
Show that an exception in the Object... for the (String, Object...) API will indeed be logged.

Modified:
    logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/ConsoleAppenderNoAnsiStyleLayoutMain.java

Modified: logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/ConsoleAppenderNoAnsiStyleLayoutMain.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/ConsoleAppenderNoAnsiStyleLayoutMain.java?rev=1609248&r1=1609247&r2=1609248&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/ConsoleAppenderNoAnsiStyleLayoutMain.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/ConsoleAppenderNoAnsiStyleLayoutMain.java
Wed Jul  9 17:23:25 2014
@@ -50,6 +50,8 @@ public class ConsoleAppenderNoAnsiStyleL
             LOG.debug("Debug message.");
             LOG.trace("Trace message.");
             LOG.error("Error message.", new IOException("test"));
+            // This will log the stack trace as well:
+            LOG.error("Error message {}", "Hi", new IOException("test"));
         } finally {
             Configurator.shutdown(ctx);
         }



Mime
View raw message