You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by mi...@apache.org on 2016/05/04 16:48:28 UTC

logging-log4j2 git commit: Revert implementing MutableLogEvent.createMemento()

Repository: logging-log4j2
Updated Branches:
  refs/heads/LOG4J2-1347 17f984e4a -> 020319b4c


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/LOG4J2-1347
Commit: 020319b4c465e0526fff9d449363c2ed1c9cfcf5
Parents: 17f984e
Author: Mikael St�ldal <mi...@magine.com>
Authored: Wed May 4 18:48:21 2016 +0200
Committer: Mikael St�ldal <mi...@magine.com>
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));
     }
 
 }