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 2015/08/08 09:37:43 UTC

[1/6] logging-log4j2 git commit: Removed experimental interface LevelLogger which got committed by mistake. Modified changes.xml to move our most significant change (requiring Java 7) to the top of the list.

Repository: logging-log4j2
Updated Branches:
  refs/heads/LOG4J2-599-LambdaSupport cf3ced443 -> 63a325d97


Removed experimental interface LevelLogger which got committed by
mistake.
Modified changes.xml to move our most significant change (requiring Java
7) to the top of the list.

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

Branch: refs/heads/LOG4J2-599-LambdaSupport
Commit: e579cf7fcc393ad72d5a2afd71f67ed7c45ab99c
Parents: 27caceb
Author: rpopma <rp...@apache.org>
Authored: Thu Aug 6 08:45:01 2015 +0900
Committer: rpopma <rp...@apache.org>
Committed: Thu Aug 6 08:45:01 2015 +0900

----------------------------------------------------------------------
 .../org/apache/logging/log4j/LevelLogger.java   | 442 -------------------
 src/changes/changes.xml                         |   9 +-
 2 files changed, 6 insertions(+), 445 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/e579cf7f/log4j-api/src/main/java/org/apache/logging/log4j/LevelLogger.java
----------------------------------------------------------------------
diff --git a/log4j-api/src/main/java/org/apache/logging/log4j/LevelLogger.java b/log4j-api/src/main/java/org/apache/logging/log4j/LevelLogger.java
deleted file mode 100644
index e1c1cea..0000000
--- a/log4j-api/src/main/java/org/apache/logging/log4j/LevelLogger.java
+++ /dev/null
@@ -1,442 +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;
-
-import org.apache.logging.log4j.message.Message;
-import org.apache.logging.log4j.message.MessageFactory;
-
-/**
- * This is the central interface in the log4j package. Most logging operations, except configuration, are done through
- * this interface.
- *
- * <p>
- * The canonical way to obtain a Logger for a class is through {@link LogManager#getLogger()}. Typically, each class
- * gets its own Logger named after its fully qualified class name (the default Logger name when obtained through the
- * {@link LogManager#getLogger()} method). Thus, the simplest way to use this would be like so:
- * </p>
- * 
- * <pre>
- * public class MyClass {
- *     private static final Logger LOGGER = LogManager.getLogger();
- *     // ...
- * }
- * </pre>
- * <p>
- * For ease of filtering, searching, sorting, etc., it is generally a good idea to create Loggers for each class rather
- * than sharing Loggers. Instead, {@link Marker Markers} should be used for shared, filterable identification.
- * </p>
- * <p>
- * For service provider implementations, it is recommended to extend the
- * {@link org.apache.logging.log4j.spi.AbstractLogger} class rather than implementing this interface directly.
- * </p>
- */
-public interface LevelLogger {
-
-    /**
-     * Logs an exception or error that has been caught. Normally, one may wish to provide additional information with an
-     * exception while logging it; in these cases, one would not use this method. In other cases where simply logging
-     * the fact that an exception was swallowed somewhere (e.g., at the top of the stack trace in a {@code main()}
-     * method), this method is ideal for it.
-     *
-     * @param t
-     *        The Throwable.
-     */
-    void catching(Throwable t);
-
-    /**
-     * Logs entry to a method. Used when the method in question has no parameters or when the parameters should not be
-     * logged.
-     */
-    void entry();
-
-    /**
-     * Logs entry to a method along with its parameters. For example,
-     * 
-     * <pre>
-     * public void doSomething(String foo, int bar) {
-     *     LOGGER.entry(foo, bar);
-     *     // do something
-     * }
-     * </pre>
-     * <p>
-     * The use of methods such as this are more effective when combined with aspect-oriented programming or other
-     * bytecode manipulation tools. It can be rather tedious (and messy) to use this type of method manually.
-     * </p>
-     *
-     * @param params
-     *        The parameters to the method. TODO Use of varargs results in array creation which can be a substantial
-     *        portion of no-op case. LogMF/LogSF provides several overrides to avoid vararg except in edge cases. (RG)
-     *        LogMF and LogSF implement these in LogXF which calls logger.callAppenders. callAppenders is part of the
-     *        implementation and cannot be used by the API. Adding more methods here and in AbstractLogger is
-     *        sufficient.
-     */
-    void entry(Object... params);
-
-    /**
-     * Logs exit from a method. Used for methods that do not return anything.
-     */
-    void exit();
-
-    /**
-     * Logs exiting from a method with the result. This may be coded as:
-     * 
-     * <pre>
-     * return LOGGER.exit(myResult);
-     * </pre>
-     *
-     * @param <R>
-     *        The type of the parameter and object being returned.
-     * @param result
-     *        The result being returned from the method call.
-     * @return the result.
-     */
-    <R> R exit(R result);
-
-    /**
-     * Gets the Level associated with the Logger.
-     *
-     * @return the Level associate with the Logger.
-     */
-    Level getLevel();
-
-    /**
-     * Gets the message factory used to convert message Objects and Strings into actual log Messages.
-     *
-     * @return the message factory.
-     */
-    MessageFactory getMessageFactory();
-
-    /**
-     * Gets the logger name.
-     *
-     * @return the logger name.
-     */
-    String getName();
-
-    /**
-     * Checks whether this Logger is enabled for the {@link Level#DEBUG DEBUG} Level.
-     *
-     * @return boolean - {@code true} if this Logger is enabled for level DEBUG, {@code false} otherwise.
-     */
-    boolean isDebugEnabled();
-
-    /**
-     * Checks whether this Logger is enabled for the {@link Level#DEBUG DEBUG} Level.
-     *
-     * @param marker
-     *        The marker data specific to this log statement.
-     * @return boolean - {@code true} if this Logger is enabled for level DEBUG, {@code false} otherwise.
-     */
-    boolean isDebugEnabled(Marker marker);
-
-    /**
-     * Checks whether this Logger is enabled for the the given Level.
-     * <p>
-     * Note that passing in {@link Level#OFF OFF} always returns {@code true}.
-     * </p>
-     *
-     * @return boolean - {@code true} if this Logger is enabled for level, {@code false} otherwise.
-     */
-    boolean isEnabled(Level level);
-
-    /**
-     * Checks whether this logger is enabled at the specified level and an optional Marker.
-     *
-     * @param marker
-     *        The marker data specific to this log statement.
-     * @return boolean - {@code true} if this Logger is enabled for level {@link Level#WARN WARN}, {@code false}
-     *         otherwise.
-     */
-    boolean isEnabled(Marker marker);
-
-    /**
-     * Checks whether this Logger is enabled for the {@link Level#ERROR ERROR} Level.
-     *
-     * @return boolean - {@code true} if this Logger is enabled for level {@link Level#ERROR ERROR}, {@code false}
-     *         otherwise.
-     */
-    boolean isErrorEnabled();
-
-    /**
-     * Checks whether this Logger is enabled for the {@link Level#ERROR ERROR} Level.
-     *
-     * @param marker
-     *        The marker data specific to this log statement.
-     * @return boolean - {@code true} if this Logger is enabled for level {@link Level#ERROR ERROR}, {@code false}
-     *         otherwise.
-     */
-    boolean isErrorEnabled(Marker marker);
-
-    /**
-     * Checks whether this Logger is enabled for the {@link Level#FATAL FATAL} Level.
-     *
-     * @return boolean - {@code true} if this Logger is enabled for level {@link Level#FATAL FATAL}, {@code false}
-     *         otherwise.
-     */
-    boolean isFatalEnabled();
-
-    /**
-     * Checks whether this Logger is enabled for the {@link Level#FATAL FATAL} Level.
-     *
-     * @param marker
-     *        The marker data specific to this log statement.
-     * @return boolean - {@code true} if this Logger is enabled for level {@link Level#FATAL FATAL}, {@code false}
-     *         otherwise.
-     */
-    boolean isFatalEnabled(Marker marker);
-
-    /**
-     * Checks whether this Logger is enabled for the {@link Level#INFO INFO} Level.
-     *
-     * @return boolean - {@code true} if this Logger is enabled for level INFO, {@code false} otherwise.
-     */
-    boolean isInfoEnabled();
-
-    /**
-     * Checks whether this Logger is enabled for the {@link Level#INFO INFO} Level.
-     *
-     * @param marker
-     *        The marker data specific to this log statement.
-     * @return boolean - {@code true} if this Logger is enabled for level INFO, {@code false} otherwise.
-     */
-    boolean isInfoEnabled(Marker marker);
-
-    /**
-     * Checks whether this Logger is enabled for the {@link Level#TRACE TRACE} level.
-     *
-     * @return boolean - {@code true} if this Logger is enabled for level TRACE, {@code false} otherwise.
-     */
-    boolean isTraceEnabled();
-
-    /**
-     * Checks whether this Logger is enabled for the {@link Level#TRACE TRACE} level.
-     *
-     * @param marker
-     *        The marker data specific to this log statement.
-     * @return boolean - {@code true} if this Logger is enabled for level TRACE, {@code false} otherwise.
-     */
-    boolean isTraceEnabled(Marker marker);
-
-    /**
-     * Checks whether this Logger is enabled for the {@link Level#WARN WARN} Level.
-     *
-     * @return boolean - {@code true} if this Logger is enabled for level {@link Level#WARN WARN}, {@code false}
-     *         otherwise.
-     */
-    boolean isWarnEnabled();
-
-    /**
-     * Checks whether this Logger is enabled for the {@link Level#WARN WARN} Level.
-     *
-     * @param marker
-     *        The marker data specific to this log statement.
-     * @return boolean - {@code true} if this Logger is enabled for level {@link Level#WARN WARN}, {@code false}
-     *         otherwise.
-     */
-    boolean isWarnEnabled(Marker marker);
-
-    /**
-     * Logs a message with the specific Marker at the given level.
-     *
-     * 
-     * @param marker
-     *        the marker data specific to this log statement
-     * @param msg
-     *        the message string to be logged
-     */
-    void log(Marker marker, Message msg);
-
-    /**
-     * Logs a message with the specific Marker at the given level.
-     *
-     * @param marker
-     *        the marker data specific to this log statement
-     * @param msg
-     *        the message string to be logged
-     * @param t
-     *        A Throwable or null.
-     */
-    void log(Marker marker, Message msg, Throwable t);
-
-    /**
-     * Logs a message object with the given level.
-     *
-     * @param marker
-     *        the marker data specific to this log statement
-     * @param message
-     *        the message object to log.
-     */
-    void log(Marker marker, Object message);
-
-    /**
-     * Logs a message at the given level including the stack trace of the {@link Throwable} <code>t</code> passed as
-     * parameter.
-     *
-     * @param marker
-     *        the marker data specific to this log statement
-     * @param message
-     *        the message to log.
-     * @param t
-     *        the exception to log, including its stack trace.
-     */
-    void log(Marker marker, Object message, Throwable t);
-
-    /**
-     * Logs a message object with the given level.
-     *
-     * 
-     * @param marker
-     *        the marker data specific to this log statement
-     * @param message
-     *        the message object to log.
-     */
-    void log(Marker marker, String message);
-
-    /**
-     * Logs a message with parameters at the given level.
-     *
-     * @param marker
-     *        the marker data specific to this log statement
-     * @param message
-     *        the message to log; the format depends on the message factory.
-     * @param params
-     *        parameters to the message.
-     * @see #getMessageFactory()
-     */
-    void log(Marker marker, String message, Object... params);
-
-    /**
-     * Logs a message at the given level including the stack trace of the {@link Throwable} <code>t</code> passed as
-     * parameter.
-     *
-     * @param marker
-     *        the marker data specific to this log statement
-     * @param message
-     *        the message to log.
-     * @param t
-     *        the exception to log, including its stack trace.
-     */
-    void log(Marker marker, String message, Throwable t);
-
-    /**
-     * Logs a message with the specific Marker at the given level.
-     *
-     * @param msg
-     *        the message string to be logged
-     */
-    void log(Message msg);
-
-    /**
-     * Logs a message with the specific Marker at the given level.
-     *
-     * @param msg
-     *        the message string to be logged
-     * @param t
-     *        A Throwable or null.
-     */
-    void log(Message msg, Throwable t);
-
-    /**
-     * Logs a message object with the given level.
-     *
-     * @param message
-     *        the message object to log.
-     */
-    void log(Object message);
-
-    /**
-     * Logs a message at the given level including the stack trace of the {@link Throwable} <code>t</code> passed as
-     * parameter.
-     *
-     * @param message
-     *        the message to log.
-     * @param t
-     *        the exception to log, including its stack trace.
-     */
-    void log(Object message, Throwable t);
-
-    /**
-     * Logs a message object with the given level.
-     *
-     * @param message
-     *        the message string to log.
-     */
-    void log(String message);
-
-    /**
-     * Logs a message with parameters at the given level.
-     *
-     * 
-     * @param message
-     *        the message to log; the format depends on the message factory.
-     * @param params
-     *        parameters to the message.
-     * @see #getMessageFactory()
-     */
-    void log(String message, Object... params);
-
-    /**
-     * Logs a message at the given level including the stack trace of the {@link Throwable} <code>t</code> passed as
-     * parameter.
-     *
-     * 
-     * @param message
-     *        the message to log.
-     * @param t
-     *        the exception to log, including its stack trace.
-     */
-    void log(String message, Throwable t);
-
-    /**
-     * Logs a formatted message using the specified format string and arguments.
-     *
-     * 
-     * @param marker
-     *        the marker data specific to this log statement.
-     * @param format
-     *        The format String.
-     * @param params
-     *        Arguments specified by the format.
-     */
-    void printf(Marker marker, String format, Object... params);
-
-    /**
-     * Logs a formatted message using the specified format string and arguments.
-     *
-     * 
-     * @param format
-     *        The format String.
-     * @param params
-     *        Arguments specified by the format.
-     */
-    void printf(String format, Object... params);
-
-    /**
-     * Logs an exception or error to be thrown. This may be coded as:
-     * 
-     * <pre>
-     * throw logger.throwing(myException);
-     * </pre>
-     *
-     * @param <T>
-     *        the Throwable type.
-     * @param t
-     *        The Throwable.
-     * @return the Throwable.
-     */
-    <T extends Throwable> T throwing(T t);
-}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/e579cf7f/src/changes/changes.xml
----------------------------------------------------------------------
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index d540f30..85d1211 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -24,6 +24,12 @@
   </properties>
   <body>
     <release version="2.4" date="2015-MM-DD" description="GA Release 2.4">
+      <action issue="LOG4J2-1017" dev="ggregory" type="update">
+        Update Java platform from Java 6 to 7. From this version onwards, log4j 2 requires Java 7.
+      </action>
+      <action dev="rpopma" type="remove">
+        Removed experimental interface LevelLogger which got committed to master by mistake.
+      </action>
       <action issue="LOG4J2-1010" dev="rgoers" type="update">
         Pass log event when interpolating logger properties.
       </action>
@@ -162,9 +168,6 @@
       <action issue="LOG4J2-959" dev="ggregory" type="update">
         Fix FindBugs DM_DEFAULT_ENCODING bug in SimpleLogger.logMessage() and simplify code.
       </action>
-      <action issue="LOG4J2-1017" dev="ggregory" type="update">
-        Update Java platform from Java 6 to 7.
-      </action>
       <action issue="LOG4J2-1036" dev="ggregory" type="update">
         Update Apache Flume from 1.5.2 to 1.6.0.
       </action>


[6/6] logging-log4j2 git commit: Merge branch 'master' into LOG4J2-599-LambdaSupport

Posted by rp...@apache.org.
Merge branch 'master' into LOG4J2-599-LambdaSupport

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

Branch: refs/heads/LOG4J2-599-LambdaSupport
Commit: 63a325d97cc36fa5f26c2f172a7e0034598d959d
Parents: cf3ced4 acfd7d3
Author: rpopma <rp...@apache.org>
Authored: Sat Aug 8 16:35:46 2015 +0900
Committer: rpopma <rp...@apache.org>
Committed: Sat Aug 8 16:35:46 2015 +0900

----------------------------------------------------------------------
 .../org/apache/logging/log4j/LevelLogger.java   | 442 -------------------
 .../log4j/perf/jmh/VarargsBenchmark.java        |  76 ++++
 log4j-samples/.gitignore                        |   1 +
 src/changes/changes.xml                         |   9 +-
 4 files changed, 83 insertions(+), 445 deletions(-)
----------------------------------------------------------------------



[2/6] logging-log4j2 git commit: Added benchmark to test how expensive constructing a varargs array is.

Posted by rp...@apache.org.
Added benchmark to test how expensive constructing a varargs array is.

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

Branch: refs/heads/LOG4J2-599-LambdaSupport
Commit: 293cb1d94d628d3014a0b7ad039ab8139da35f41
Parents: e579cf7
Author: rpopma <rp...@apache.org>
Authored: Sat Aug 8 15:00:44 2015 +0900
Committer: rpopma <rp...@apache.org>
Committed: Sat Aug 8 15:00:44 2015 +0900

----------------------------------------------------------------------
 .../log4j/perf/jmh/VarargsBenchmark.java        | 76 ++++++++++++++++++++
 1 file changed, 76 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/293cb1d9/log4j-perf/src/main/java/org/apache/logging/log4j/perf/jmh/VarargsBenchmark.java
----------------------------------------------------------------------
diff --git a/log4j-perf/src/main/java/org/apache/logging/log4j/perf/jmh/VarargsBenchmark.java b/log4j-perf/src/main/java/org/apache/logging/log4j/perf/jmh/VarargsBenchmark.java
new file mode 100644
index 0000000..40c00c9
--- /dev/null
+++ b/log4j-perf/src/main/java/org/apache/logging/log4j/perf/jmh/VarargsBenchmark.java
@@ -0,0 +1,76 @@
+/*
+ * 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.jmh;
+
+import java.util.concurrent.TimeUnit;
+
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.BenchmarkMode;
+import org.openjdk.jmh.annotations.Mode;
+import org.openjdk.jmh.annotations.OutputTimeUnit;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.State;
+
+/**
+ * Tests how expensive constructing a varargs array is.
+ */
+// ============================== HOW TO RUN THIS TEST: ====================================
+//
+// single thread:
+// java -jar log4j-perf/target/benchmarks.jar ".*Nanotime.*" -f 1 -wi 5 -i 5
+//
+// multiple threads (for example, 4 threads):
+// java -jar log4j-perf/target/benchmarks.jar ".*Nanotime.*" -f 1 -wi 5 -i 5 -t 4 -si true
+//
+// Usage help:
+// java -jar log4j-perf/target/benchmarks.jar -help
+//
+@State(Scope.Benchmark)
+public class VarargsBenchmark {
+
+    public static void main(final String[] args) {
+    }
+
+    @Benchmark
+    @BenchmarkMode(Mode.SampleTime)
+    @OutputTimeUnit(TimeUnit.NANOSECONDS)
+    public void baseline() {
+    }
+
+    @Benchmark
+    @BenchmarkMode(Mode.SampleTime)
+    @OutputTimeUnit(TimeUnit.NANOSECONDS)
+    public long varargParams() {
+        return vararg3Method("example {} {} {}", "one", "two", "three", "four");
+    }
+
+    @Benchmark
+    @BenchmarkMode(Mode.SampleTime)
+    @OutputTimeUnit(TimeUnit.NANOSECONDS)
+    public long individualParams() {
+        return vararg3Method("example {} {} {}", "one", "two", "three");
+    }
+
+    private long vararg3Method(String string, String... params) {
+        return string.length() + params.length;
+    }
+
+    private long vararg3Method(String string, String param1, String param2, String param3) {
+        return string.length() + param1.length();
+    }
+}


[4/6] logging-log4j2 git commit: fix comment

Posted by rp...@apache.org.
fix comment

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

Branch: refs/heads/LOG4J2-599-LambdaSupport
Commit: b291d2ac9c8410ca662aa47d3cbe98b8db095545
Parents: ebd7eee
Author: rpopma <rp...@apache.org>
Authored: Sat Aug 8 16:03:40 2015 +0900
Committer: rpopma <rp...@apache.org>
Committed: Sat Aug 8 16:03:40 2015 +0900

----------------------------------------------------------------------
 .../java/org/apache/logging/log4j/perf/jmh/VarargsBenchmark.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/b291d2ac/log4j-perf/src/main/java/org/apache/logging/log4j/perf/jmh/VarargsBenchmark.java
----------------------------------------------------------------------
diff --git a/log4j-perf/src/main/java/org/apache/logging/log4j/perf/jmh/VarargsBenchmark.java b/log4j-perf/src/main/java/org/apache/logging/log4j/perf/jmh/VarargsBenchmark.java
index 9f91d29..b9c910f 100644
--- a/log4j-perf/src/main/java/org/apache/logging/log4j/perf/jmh/VarargsBenchmark.java
+++ b/log4j-perf/src/main/java/org/apache/logging/log4j/perf/jmh/VarargsBenchmark.java
@@ -32,10 +32,10 @@ import org.openjdk.jmh.annotations.State;
 // ============================== HOW TO RUN THIS TEST: ====================================
 //
 // single thread:
-// java -jar log4j-perf/target/benchmarks.jar ".*Nanotime.*" -f 1 -wi 5 -i 5
+// java -jar log4j-perf/target/benchmarks.jar ".*Varargs.*" -f 1 -wi 5 -i 10
 //
 // multiple threads (for example, 4 threads):
-// java -jar log4j-perf/target/benchmarks.jar ".*Nanotime.*" -f 1 -wi 5 -i 5 -t 4 -si true
+// java -jar log4j-perf/target/benchmarks.jar ".*Varargs.*" -f 1 -wi 5 -i 10 -t 4 -si true
 //
 // Usage help:
 // java -jar log4j-perf/target/benchmarks.jar -help


[5/6] logging-log4j2 git commit: add /loggerProperties/target/ to .gitignore

Posted by rp...@apache.org.
add /loggerProperties/target/ to .gitignore

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

Branch: refs/heads/LOG4J2-599-LambdaSupport
Commit: acfd7d3af559c2b56a990e79d63569ea12bc270b
Parents: b291d2a
Author: rpopma <rp...@apache.org>
Authored: Sat Aug 8 16:35:01 2015 +0900
Committer: rpopma <rp...@apache.org>
Committed: Sat Aug 8 16:35:01 2015 +0900

----------------------------------------------------------------------
 log4j-samples/.gitignore | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/acfd7d3a/log4j-samples/.gitignore
----------------------------------------------------------------------
diff --git a/log4j-samples/.gitignore b/log4j-samples/.gitignore
index 4319c95..a506d66 100644
--- a/log4j-samples/.gitignore
+++ b/log4j-samples/.gitignore
@@ -1,3 +1,4 @@
 /target/
 /.project
 /configuration/target/
+/loggerProperties/target/


[3/6] logging-log4j2 git commit: renamed private methods

Posted by rp...@apache.org.
renamed private methods

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

Branch: refs/heads/LOG4J2-599-LambdaSupport
Commit: ebd7eee0bde6dac2058072d12734d4e23d3fff96
Parents: 293cb1d
Author: rpopma <rp...@apache.org>
Authored: Sat Aug 8 15:26:21 2015 +0900
Committer: rpopma <rp...@apache.org>
Committed: Sat Aug 8 15:26:21 2015 +0900

----------------------------------------------------------------------
 .../org/apache/logging/log4j/perf/jmh/VarargsBenchmark.java  | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/ebd7eee0/log4j-perf/src/main/java/org/apache/logging/log4j/perf/jmh/VarargsBenchmark.java
----------------------------------------------------------------------
diff --git a/log4j-perf/src/main/java/org/apache/logging/log4j/perf/jmh/VarargsBenchmark.java b/log4j-perf/src/main/java/org/apache/logging/log4j/perf/jmh/VarargsBenchmark.java
index 40c00c9..9f91d29 100644
--- a/log4j-perf/src/main/java/org/apache/logging/log4j/perf/jmh/VarargsBenchmark.java
+++ b/log4j-perf/src/main/java/org/apache/logging/log4j/perf/jmh/VarargsBenchmark.java
@@ -56,21 +56,21 @@ public class VarargsBenchmark {
     @BenchmarkMode(Mode.SampleTime)
     @OutputTimeUnit(TimeUnit.NANOSECONDS)
     public long varargParams() {
-        return vararg3Method("example {} {} {}", "one", "two", "three", "four");
+        return varargMethod("example {} {} {}", "one", "two", "three", "four");
     }
 
     @Benchmark
     @BenchmarkMode(Mode.SampleTime)
     @OutputTimeUnit(TimeUnit.NANOSECONDS)
     public long individualParams() {
-        return vararg3Method("example {} {} {}", "one", "two", "three");
+        return individualArgMethod("example {} {} {}", "one", "two", "three");
     }
 
-    private long vararg3Method(String string, String... params) {
+    private long varargMethod(String string, String... params) {
         return string.length() + params.length;
     }
 
-    private long vararg3Method(String string, String param1, String param2, String param3) {
+    private long individualArgMethod(String string, String param1, String param2, String param3) {
         return string.length() + param1.length();
     }
 }