You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by ct...@apache.org on 2020/02/28 13:05:56 UTC

[accumulo-maven-plugin] branch master updated: Add logging for plugin's IT

This is an automated email from the ASF dual-hosted git repository.

ctubbsii pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/accumulo-maven-plugin.git


The following commit(s) were added to refs/heads/master by this push:
     new 4dc0225  Add logging for plugin's IT
4dc0225 is described below

commit 4dc0225f52b5584cb09d12ff3ab4b83256104182
Author: Christopher Tubbs <ct...@apache.org>
AuthorDate: Fri Feb 28 08:05:21 2020 -0500

    Add logging for plugin's IT
---
 src/it/plugin-test/pom.xml                         | 47 ++++++++++++++++++++--
 .../src/test/resources/log4j2-test.properties      | 35 ++++++++++++++++
 2 files changed, 79 insertions(+), 3 deletions(-)

diff --git a/src/it/plugin-test/pom.xml b/src/it/plugin-test/pom.xml
index aa08111..8dab11d 100644
--- a/src/it/plugin-test/pom.xml
+++ b/src/it/plugin-test/pom.xml
@@ -55,6 +55,16 @@
       <groupId>org.apache.accumulo</groupId>
       <artifactId>accumulo-minicluster</artifactId>
       <version>@accumulo.version@</version>
+      <exclusions>
+        <exclusion>
+          <groupId>org.slf4j</groupId>
+          <artifactId>slf4j-log4j12</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>log4j</groupId>
+          <artifactId>log4j</artifactId>
+        </exclusion>
+      </exclusions>
     </dependency>
     <dependency>
       <groupId>org.apache.commons</groupId>
@@ -80,6 +90,22 @@
       <groupId>org.apache.zookeeper</groupId>
       <artifactId>zookeeper</artifactId>
       <version>3.4.14</version>
+      <exclusions>
+        <exclusion>
+          <groupId>org.slf4j</groupId>
+          <artifactId>slf4j-log4j12</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>log4j</groupId>
+          <artifactId>log4j</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <!-- needed for zookeeper jmx support, which can't be disabled in 3.4 -->
+      <groupId>log4j</groupId>
+      <artifactId>log4j</artifactId>
+      <version>1.2.17</version>
     </dependency>
     <dependency>
       <groupId>org.slf4j</groupId>
@@ -87,9 +113,24 @@
       <version>1.7.30</version>
     </dependency>
     <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-simple</artifactId>
-      <version>1.7.30</version>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-1.2-api</artifactId>
+      <version>2.13.0</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-api</artifactId>
+      <version>2.13.0</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-core</artifactId>
+      <version>2.13.0</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-slf4j-impl</artifactId>
+      <version>2.13.0</version>
     </dependency>
     <dependency>
       <groupId>org.apache.hadoop</groupId>
diff --git a/src/it/plugin-test/src/test/resources/log4j2-test.properties b/src/it/plugin-test/src/test/resources/log4j2-test.properties
new file mode 100644
index 0000000..f8ca122
--- /dev/null
+++ b/src/it/plugin-test/src/test/resources/log4j2-test.properties
@@ -0,0 +1,35 @@
+#
+# 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.
+#
+
+## Log4j2 file that configures logging for all Accumulo services
+## The system properties referenced below are configured by accumulo-env.sh
+
+status = info
+dest = err
+name = Accumulo2MavenPluginLoggingProperties
+
+appender.console.type = Console
+appender.console.name = STDOUT
+appender.console.target = SYSTEM_OUT
+appender.console.layout.type = PatternLayout
+appender.console.layout.pattern = %d{ISO8601} [%c{2}] %-5p: %m%n
+
+rootLogger.level = debug
+rootLogger.appenderRef.console.ref = STDOUT
+