LOG4J2-1342 use new method ReusableMessage#memento() to take snapshot without 
losing parameter information


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

Branch: refs/heads/LOG4j2-494
Commit: 04ee75ff52276f02caa248a33bc8c0da7ded10ef
Parents: c172995
Author: rpopma <[email protected]>
Authored: Fri Apr 22 14:39:34 2016 +0900
Committer: Ralph Goers <[email protected]>
Committed: Mon Apr 25 21:30:29 2016 -0700

----------------------------------------------------------------------
 .../java/org/apache/logging/log4j/core/impl/Log4jLogEvent.java     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/04ee75ff/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/Log4jLogEvent.java
----------------------------------------------------------------------
diff --git 
a/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/Log4jLogEvent.java
 
b/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/Log4jLogEvent.java
index 26b35d3..776fba7 100644
--- 
a/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/Log4jLogEvent.java
+++ 
b/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/Log4jLogEvent.java
@@ -844,7 +844,7 @@ public Log4jLogEvent(final String loggerName, final Marker 
marker, final String
         }
 
         private Message memento(final ReusableMessage message) {
-            return new SimpleMessage(message.getFormattedMessage());
+            return message.memento();
         }
 
         /**

Reply via email to