Revert implementing MutableLogEvent.createMemento()

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

Branch: refs/heads/master
Commit: 020319b4c465e0526fff9d449363c2ed1c9cfcf5
Parents: 17f984e
Author: Mikael StÃ¥ldal <[email protected]>
Authored: Wed May 4 18:48:21 2016 +0200
Committer: Mikael StÃ¥ldal <[email protected]>
Committed: Wed May 4 18:48:21 2016 +0200

----------------------------------------------------------------------
 .../org/apache/logging/log4j/core/impl/MutableLogEvent.java     | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/020319b4/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/MutableLogEvent.java
----------------------------------------------------------------------
diff --git 
a/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/MutableLogEvent.java
 
b/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/MutableLogEvent.java
index 3298bca..be4ba24 100644
--- 
a/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/MutableLogEvent.java
+++ 
b/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/MutableLogEvent.java
@@ -422,9 +422,8 @@ public class MutableLogEvent implements LogEvent, 
ReusableMessage {
      * @return a new immutable copy of the data in this {@code MutableLogEvent}
      */
     public Log4jLogEvent createMemento() {
-        Log4jLogEvent.Builder builder = new Log4jLogEvent.Builder(this);
-        builder.setMessage(memento());
-        return builder.build();
+        // TODO implement MutableLogEvent.createMemento()
+        return Log4jLogEvent.deserialize(Log4jLogEvent.serialize(this, 
includeLocation));
     }
 
 }

Reply via email to