You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by rp...@apache.org on 2016/04/22 07:58:40 UTC

[06/15] logging-log4j2 git commit: LOG4J2-1334 don't take snapshot of message, delegate to MutableLogEvent

LOG4J2-1334 don't take snapshot of message, delegate to MutableLogEvent


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

Branch: refs/heads/master
Commit: 73f12f4f7829c717bbc79b1eb128aac72e52ce09
Parents: 2cfc07b
Author: rpopma <rp...@apache.org>
Authored: Fri Apr 22 14:33:28 2016 +0900
Committer: rpopma <rp...@apache.org>
Committed: Fri Apr 22 14:33:28 2016 +0900

----------------------------------------------------------------------
 .../logging/log4j/core/async/AsyncLoggerConfigDisruptor.java     | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/73f12f4f/log4j-core/src/main/java/org/apache/logging/log4j/core/async/AsyncLoggerConfigDisruptor.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/async/AsyncLoggerConfigDisruptor.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/async/AsyncLoggerConfigDisruptor.java
index 503e7d8..60494e0 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/async/AsyncLoggerConfigDisruptor.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/async/AsyncLoggerConfigDisruptor.java
@@ -145,7 +145,7 @@ public class AsyncLoggerConfigDisruptor implements AsyncLoggerConfigDelegate {
     private static final EventFactory<Log4jEventWrapper> MUTABLE_FACTORY = new EventFactory<Log4jEventWrapper>() {
         @Override
         public Log4jEventWrapper newInstance() {
-            return new Log4jEventWrapper(new MutableLogEvent(new Object[10]));
+            return new Log4jEventWrapper(new MutableLogEvent());
         }
     };
 
@@ -324,8 +324,6 @@ public class AsyncLoggerConfigDisruptor implements AsyncLoggerConfigDelegate {
         final LogEvent logEvent = ensureImmutable(event);
         if (logEvent instanceof Log4jLogEvent && logEvent.getMessage() instanceof ReusableMessage) {
             ((Log4jLogEvent) logEvent).makeMessageImmutable();
-        } else if (!Constants.FORMAT_MESSAGES_IN_BACKGROUND) { // LOG4J2-898: user may choose
-            logEvent.getMessage().getFormattedMessage(); // LOG4J2-763: ask message to freeze parameters
         }
         return logEvent;
     }