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/18 17:02:01 UTC

logging-log4j2 git commit: LOG4J2-1334 removed redundant MutableLogEvent from log4j-perf module

Repository: logging-log4j2
Updated Branches:
  refs/heads/master 4c01f1cdb -> fb5347dbd


LOG4J2-1334 removed redundant MutableLogEvent from log4j-perf module


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

Branch: refs/heads/master
Commit: fb5347dbd3f178800a0dfabc11e25b7b48ee8d1c
Parents: 4c01f1c
Author: rpopma <rp...@apache.org>
Authored: Tue Apr 19 00:02:04 2016 +0900
Committer: rpopma <rp...@apache.org>
Committed: Tue Apr 19 00:02:04 2016 +0900

----------------------------------------------------------------------
 .../logging/log4j/perf/nogc/AbstractLogger.java |  4 ++-
 .../log4j/perf/nogc/MutableLogEvent.java        | 37 --------------------
 2 files changed, 3 insertions(+), 38 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb5347db/log4j-perf/src/main/java/org/apache/logging/log4j/perf/nogc/AbstractLogger.java
----------------------------------------------------------------------
diff --git a/log4j-perf/src/main/java/org/apache/logging/log4j/perf/nogc/AbstractLogger.java b/log4j-perf/src/main/java/org/apache/logging/log4j/perf/nogc/AbstractLogger.java
index 08e757e..10f053e 100644
--- a/log4j-perf/src/main/java/org/apache/logging/log4j/perf/nogc/AbstractLogger.java
+++ b/log4j-perf/src/main/java/org/apache/logging/log4j/perf/nogc/AbstractLogger.java
@@ -18,6 +18,7 @@ package org.apache.logging.log4j.perf.nogc;
 
 import org.apache.logging.log4j.core.Layout;
 import org.apache.logging.log4j.core.LogEvent;
+import org.apache.logging.log4j.core.impl.MutableLogEvent;
 import org.apache.logging.log4j.message.Message;
 
 /**
@@ -38,7 +39,8 @@ public abstract class AbstractLogger {
     }
 
     private LogEvent createLogEvent(Message message) {
-        return reusedLogEvent.setMessage(message);
+        reusedLogEvent.setMessage(message);
+        return reusedLogEvent;
     }
 
 }

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/fb5347db/log4j-perf/src/main/java/org/apache/logging/log4j/perf/nogc/MutableLogEvent.java
----------------------------------------------------------------------
diff --git a/log4j-perf/src/main/java/org/apache/logging/log4j/perf/nogc/MutableLogEvent.java b/log4j-perf/src/main/java/org/apache/logging/log4j/perf/nogc/MutableLogEvent.java
deleted file mode 100644
index 9fade60..0000000
--- a/log4j-perf/src/main/java/org/apache/logging/log4j/perf/nogc/MutableLogEvent.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache license, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the license for the specific language governing permissions and
- * limitations under the license.
- */
-package org.apache.logging.log4j.perf.nogc;
-
-import org.apache.logging.log4j.core.AbstractLogEvent;
-import org.apache.logging.log4j.message.Message;
-
-/**
- * Log event.
- */
-public class MutableLogEvent extends AbstractLogEvent {
-    private Message message;
-
-    @Override
-    public Message getMessage() {
-        return message;
-    }
-
-    public MutableLogEvent setMessage(Message message) {
-        this.message = message;
-        return this;
-    }
-}