You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by gg...@apache.org on 2016/05/09 18:12:50 UTC

[1/3] logging-log4j2 git commit: Sort 1 method.

Repository: logging-log4j2
Updated Branches:
  refs/heads/master afcce2c2d -> 614e39e02


Sort 1 method.

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

Branch: refs/heads/master
Commit: 8e85826a24cd4e1439edb747de6070fee0af4972
Parents: 9e59afe
Author: ggregory <gg...@apache.org>
Authored: Mon May 9 11:07:37 2016 -0700
Committer: ggregory <gg...@apache.org>
Committed: Mon May 9 11:07:37 2016 -0700

----------------------------------------------------------------------
 .../log4j/core/layout/AbstractCsvLayout.java    | 158 +++++++++----------
 1 file changed, 79 insertions(+), 79 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/8e85826a/log4j-core/src/main/java/org/apache/logging/log4j/core/layout/AbstractCsvLayout.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/layout/AbstractCsvLayout.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/layout/AbstractCsvLayout.java
index ed1a70a..3d0d80c 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/layout/AbstractCsvLayout.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/layout/AbstractCsvLayout.java
@@ -1,79 +1,79 @@
-/*
- * 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.core.layout;
-
-import java.nio.charset.Charset;
-
-import org.apache.commons.csv.CSVFormat;
-import org.apache.commons.csv.QuoteMode;
-import org.apache.logging.log4j.core.config.Configuration;
-
-/**
- * A superclass for Comma-Separated Value (CSV) layouts.
- * 
- * Depends on Apache Commons CSV 1.2.
- * 
- * @since 2.4
- */
-public abstract class AbstractCsvLayout extends AbstractStringLayout {
-
-    protected static final String DEFAULT_CHARSET = "UTF-8";
-    protected static final String DEFAULT_FORMAT = "Default";
-    private static final String CONTENT_TYPE = "text/csv";
-
-    private final CSVFormat format;
-
-    protected AbstractCsvLayout(final Configuration config, final Charset charset, final CSVFormat csvFormat,
-            final String header, final String footer) {
-        super(config, charset, PatternLayout.createSerializer(config, null, header, null, null, false, false),
-                PatternLayout.createSerializer(config, null, footer, null, null, false, false));
-        this.format = csvFormat;
-    }
-
-    protected static CSVFormat createFormat(final String format, final Character delimiter, final Character escape,
-            final Character quote, final QuoteMode quoteMode, final String nullString, final String recordSeparator) {
-        CSVFormat csvFormat = CSVFormat.valueOf(format);
-        if (delimiter != null) {
-            csvFormat = csvFormat.withDelimiter(delimiter);
-        }
-        if (escape != null) {
-            csvFormat = csvFormat.withEscape(escape);
-        }
-        if (quote != null) {
-            csvFormat = csvFormat.withQuote(quote);
-        }
-        if (quoteMode != null) {
-            csvFormat = csvFormat.withQuoteMode(quoteMode);
-        }
-        if (nullString != null) {
-            csvFormat = csvFormat.withNullString(nullString);
-        }
-        if (recordSeparator != null) {
-            csvFormat = csvFormat.withRecordSeparator(recordSeparator);
-        }
-        return csvFormat;
-    }
-
-    @Override
-    public String getContentType() {
-        return CONTENT_TYPE + "; charset=" + this.getCharset();
-    }
-
-    public CSVFormat getFormat() {
-        return format;
-    }
-}
+/*
+ * 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.core.layout;
+
+import java.nio.charset.Charset;
+
+import org.apache.commons.csv.CSVFormat;
+import org.apache.commons.csv.QuoteMode;
+import org.apache.logging.log4j.core.config.Configuration;
+
+/**
+ * A superclass for Comma-Separated Value (CSV) layouts.
+ * 
+ * Depends on Apache Commons CSV 1.2.
+ * 
+ * @since 2.4
+ */
+public abstract class AbstractCsvLayout extends AbstractStringLayout {
+
+    protected static final String DEFAULT_CHARSET = "UTF-8";
+    protected static final String DEFAULT_FORMAT = "Default";
+    private static final String CONTENT_TYPE = "text/csv";
+
+    protected static CSVFormat createFormat(final String format, final Character delimiter, final Character escape,
+            final Character quote, final QuoteMode quoteMode, final String nullString, final String recordSeparator) {
+        CSVFormat csvFormat = CSVFormat.valueOf(format);
+        if (delimiter != null) {
+            csvFormat = csvFormat.withDelimiter(delimiter);
+        }
+        if (escape != null) {
+            csvFormat = csvFormat.withEscape(escape);
+        }
+        if (quote != null) {
+            csvFormat = csvFormat.withQuote(quote);
+        }
+        if (quoteMode != null) {
+            csvFormat = csvFormat.withQuoteMode(quoteMode);
+        }
+        if (nullString != null) {
+            csvFormat = csvFormat.withNullString(nullString);
+        }
+        if (recordSeparator != null) {
+            csvFormat = csvFormat.withRecordSeparator(recordSeparator);
+        }
+        return csvFormat;
+    }
+
+    private final CSVFormat format;
+
+    protected AbstractCsvLayout(final Configuration config, final Charset charset, final CSVFormat csvFormat,
+            final String header, final String footer) {
+        super(config, charset, PatternLayout.createSerializer(config, null, header, null, null, false, false),
+                PatternLayout.createSerializer(config, null, footer, null, null, false, false));
+        this.format = csvFormat;
+    }
+
+    @Override
+    public String getContentType() {
+        return CONTENT_TYPE + "; charset=" + this.getCharset();
+    }
+
+    public CSVFormat getFormat() {
+        return format;
+    }
+}


[3/3] logging-log4j2 git commit: Merge remote-tracking branch 'origin/master'

Posted by gg...@apache.org.
Merge remote-tracking branch 'origin/master'

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

Branch: refs/heads/master
Commit: 614e39e02f209257e126df9180e2859d45018b7c
Parents: be3fcda afcce2c
Author: ggregory <gg...@apache.org>
Authored: Mon May 9 11:12:26 2016 -0700
Committer: ggregory <gg...@apache.org>
Committed: Mon May 9 11:12:26 2016 -0700

----------------------------------------------------------------------
 .../log4j/core/appender/AsyncAppender.java      |  55 ++--
 .../log4j/core/async/AsyncEventRouter.java      |  36 ---
 .../core/async/AsyncEventRouterFactory.java     | 101 ------
 ...syncLoggerConfigDefaultExceptionHandler.java |  54 ++++
 .../core/async/AsyncLoggerConfigDisruptor.java  |  13 +-
 .../AsyncLoggerDefaultExceptionHandler.java     |  52 ++++
 .../log4j/core/async/AsyncLoggerDisruptor.java  |  12 +-
 .../log4j/core/async/AsyncQueueFullPolicy.java  |  38 +++
 .../core/async/AsyncQueueFullPolicyFactory.java | 101 ++++++
 .../core/async/DefaultAsyncEventRouter.java     |  37 ---
 ...efaultAsyncLoggerConfigExceptionHandler.java |  54 ----
 .../DefaultAsyncLoggerExceptionHandler.java     |  52 ----
 .../core/async/DefaultAsyncQueueFullPolicy.java |  37 +++
 .../core/async/DiscardingAsyncEventRouter.java  |  72 -----
 .../async/DiscardingAsyncQueueFullPolicy.java   |  72 +++++
 .../logging/log4j/core/async/DisruptorUtil.java |   8 +-
 .../logging/log4j/core/async/EventRoute.java    |   4 +
 .../logging/log4j/core/impl/Log4jLogEvent.java  |  25 +-
 .../log4j/core/impl/MutableLogEvent.java        |  32 +-
 .../AsyncAppenderQueueFullPolicyTest.java       | 113 +++++++
 .../core/async/AsyncEventRouterFactoryTest.java | 114 -------
 .../async/AsyncQueueFullPolicyFactoryTest.java  | 114 +++++++
 .../core/async/DefaultAsyncEventRouterTest.java |  50 ---
 .../async/DefaultAsyncQueueFullPolicyTest.java  |  50 +++
 .../async/DiscardingAsyncEventRouterTest.java   | 117 -------
 .../DiscardingAsyncQueueFullPolicyTest.java     | 117 +++++++
 .../core/async/perftest/ResponseTimeTest.java   | 101 +++---
 .../core/async/perftest/SimplePerfTest.bat      |  47 ---
 .../log4j/core/async/perftest/SimplePerfTest.sh |  57 ----
 .../log4j/core/impl/Log4jLogEventTest.java      |  68 ++++
 .../log4j/test/appender/BlockingAppender.java   |  61 ++++
 .../test/resources/log4j-asynch-queue-full.xml  |  38 +++
 .../src/test/resources/perf/SimplePerfTest.bat  |  47 +++
 .../src/test/resources/perf/SimplePerfTest.sh   |  57 ++++
 .../src/test/resources/perf/runResponseTm.sh    |  62 ++++
 .../AsyncAppenderLog4j1LocationBenchmark.java   |  71 +++++
 .../AsyncAppenderLog4j2LocationBenchmark.java   |  75 +++++
 .../AsyncAppenderLogbackLocationBenchmark.java  |  77 +++++
 .../perf/jmh/AsyncLoggersLocationBenchmark.java |  84 +++++
 .../jmh/Log4j2AppenderComparisonBenchmark.java  | 221 +++++++++++++
 .../perf/jmh/MemoryHandlerJULBenchmark.java     |   1 +
 .../jmh/MemoryHandlerJULLocationBenchmark.java  |  74 +++++
 .../resources/log4j2-appenderComparison.xml     |  68 ++++
 .../perf-WithoutAnyAppender-location.xml        |  12 +
 ...perf-log4j12-async-location-noOpAppender.xml |  31 ++
 ...perf-logback-async-location-noOpAppender.xml |  31 ++
 .../perf5AsyncApndWithLoc-noOpAppender.xml      |  31 ++
 src/changes/changes.xml                         |   3 +
 .../images/AsyncWithLocationThrpt1T-labeled.png | Bin 0 -> 23503 bytes
 .../images/AsyncWithLocationThrpt1T.png         | Bin 0 -> 17751 bytes
 ...ResponseTimeAsyncLogging16Threads@8kEach.png | Bin 0 -> 30694 bytes
 ...ogging16Threads@8kEachLog4j2Only-labeled.png | Bin 0 -> 42723 bytes
 .../ResponseTimeAsyncLogging1Thread@128k.png    | Bin 0 -> 25701 bytes
 ...ResponseTimeAsyncLogging4Threads@16kEach.png | Bin 0 -> 35566 bytes
 ...AsyncLogging4Threads@16kEachWithoutMixed.png | Bin 0 -> 37846 bytes
 ...amAllAsyncClassicVsLog4j1-16Threads@128k.png | Bin 0 -> 33079 bytes
 src/site/xdoc/manual/appenders.xml              |   4 +-
 src/site/xdoc/manual/async.xml                  | 311 ++++---------------
 src/site/xdoc/manual/configuration.xml.vm       |   6 +-
 src/site/xdoc/manual/garbagefree.xml            |  21 +-
 src/site/xdoc/performance.xml                   |  82 ++++-
 61 files changed, 2151 insertions(+), 1120 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/614e39e0/src/changes/changes.xml
----------------------------------------------------------------------


[2/3] logging-log4j2 git commit: [LOG4J2-1384] Update Apache Commons CSV from 1.2 to 1.3.

Posted by gg...@apache.org.
[LOG4J2-1384] Update Apache Commons CSV from 1.2 to 1.3.

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

Branch: refs/heads/master
Commit: be3fcda670a6ad4eb4d7210e67e5956fd85d5950
Parents: 8e85826
Author: ggregory <gg...@apache.org>
Authored: Mon May 9 11:12:12 2016 -0700
Committer: ggregory <gg...@apache.org>
Committed: Mon May 9 11:12:12 2016 -0700

----------------------------------------------------------------------
 pom.xml                 | 2 +-
 src/changes/changes.xml | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/be3fcda6/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index b4564e3..f00fd21 100644
--- a/pom.xml
+++ b/pom.xml
@@ -734,7 +734,7 @@
       <dependency>
         <groupId>org.apache.commons</groupId>
         <artifactId>commons-csv</artifactId>
-        <version>1.2</version>
+        <version>1.3</version>
       </dependency>
       <!-- GC-free -->
       <dependency>

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/be3fcda6/src/changes/changes.xml
----------------------------------------------------------------------
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 6700840..a1eb86a 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -42,6 +42,9 @@
       <action issue="LOG4J2-1374" dev="rpopma" type="update">
         Migrate tests from Logback 1.1.3 to 1.1.7.
       </action>
+      <action issue="LOG4J2-1384" dev="ggregory" type="update">
+        Update Apache Commons CSV from 1.2 to 1.3.
+      </action>
       <action issue="LOG4J2-1373" dev="rpopma" type="add">
         (GC) Update Logger wrapper Generator tool to generate methods for the new Logger methods.
       </action>