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

[20/38] 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/e7fea765
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/e7fea765
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/e7fea765

Branch: refs/heads/master
Commit: e7fea76570a1d30dd91cb9e54bfda13396d99f5e
Parents: b2e90dc
Author: rpopma <rp...@apache.org>
Authored: Fri Apr 22 14:33:28 2016 +0900
Committer: Ralph Goers <rg...@nextiva.com>
Committed: Mon Apr 25 21:30:29 2016 -0700

----------------------------------------------------------------------
 .../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/e7fea765/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;
     }