PROTON-2478 Remove log4j2 and replace with slf4j simple for logging

Replace usage of log4j2 with slf4j simple logging in the test and
examples and remove packaging of the log4j bindings from the library
archive.
diff --git a/apache-qpid-protonj2/pom.xml b/apache-qpid-protonj2/pom.xml
index 93a3894..85469d8 100644
--- a/apache-qpid-protonj2/pom.xml
+++ b/apache-qpid-protonj2/pom.xml
@@ -36,11 +36,6 @@
       <groupId>org.apache.qpid</groupId>
       <artifactId>protonj2-client</artifactId>
     </dependency>
-    <dependency>
-      <groupId>org.apache.logging.log4j</groupId>
-      <artifactId>log4j-slf4j-impl</artifactId>
-      <optional>true</optional>
-    </dependency>
   </dependencies>
 
   <build>
diff --git a/apache-qpid-protonj2/src/main/assembly/bin.xml b/apache-qpid-protonj2/src/main/assembly/bin.xml
index c4d8906..53dcdbe 100644
--- a/apache-qpid-protonj2/src/main/assembly/bin.xml
+++ b/apache-qpid-protonj2/src/main/assembly/bin.xml
@@ -45,18 +45,9 @@
       <useProjectArtifact>false</useProjectArtifact>
       <useTransitiveFiltering>true</useTransitiveFiltering>
       <excludes>
-        <exclude>org.apache.logging.log4j:log4j-slf4j-impl</exclude>
         <exclude>io.netty.incubator:*</exclude>
       </excludes>
     </dependencySet>
-    <dependencySet>
-      <outputDirectory>/lib/optional</outputDirectory>
-      <useProjectArtifact>false</useProjectArtifact>
-      <useTransitiveFiltering>true</useTransitiveFiltering>
-      <includes>
-        <include>org.apache.logging.log4j:log4j-slf4j-impl</include>
-      </includes>
-    </dependencySet>
   </dependencySets>
   <moduleSets>
     <moduleSet>
diff --git a/pom.xml b/pom.xml
index e812cdb..6a0005c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -42,7 +42,6 @@
     <mockito.version>4.1.0</mockito.version>
     <proton.version>0.33.10</proton.version>
     <slf4j.version>1.7.32</slf4j.version>
-    <log4j.slf4j.version>2.16.0</log4j.slf4j.version>
     <hamcrest.version>2.2</hamcrest.version>
     <netty.version>4.1.72.Final</netty.version>
     <netty.iouring.version>0.0.11.Final</netty.iouring.version>
@@ -114,9 +113,9 @@
         <version>${slf4j.version}</version>
       </dependency>
       <dependency>
-        <groupId>org.apache.logging.log4j</groupId>
-        <artifactId>log4j-slf4j-impl</artifactId>
-        <version>${log4j.slf4j.version}</version>
+        <groupId>org.slf4j</groupId>
+        <artifactId>slf4j-simple</artifactId>
+        <version>${slf4j.version}</version>
       </dependency>
       <dependency>
         <groupId>io.netty</groupId>
diff --git a/protonj2-client-examples/pom.xml b/protonj2-client-examples/pom.xml
index bd0228f..bbb9869 100644
--- a/protonj2-client-examples/pom.xml
+++ b/protonj2-client-examples/pom.xml
@@ -37,12 +37,9 @@
       <groupId>org.apache.qpid</groupId>
       <artifactId>protonj2-client</artifactId>
     </dependency>
-
-    <!-- Provide a logging implementation to avoid
-         notice from SLF4J that none was found -->
     <dependency>
-      <groupId>org.apache.logging.log4j</groupId>
-      <artifactId>log4j-slf4j-impl</artifactId>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-simple</artifactId>
     </dependency>
   </dependencies>
 
diff --git a/protonj2-client-examples/src/main/resources/log4j2-test.properties b/protonj2-client-examples/src/main/resources/simplelogger.properties
similarity index 64%
copy from protonj2-client-examples/src/main/resources/log4j2-test.properties
copy to protonj2-client-examples/src/main/resources/simplelogger.properties
index 8dac3e7..75c368b 100644
--- a/protonj2-client-examples/src/main/resources/log4j2-test.properties
+++ b/protonj2-client-examples/src/main/resources/simplelogger.properties
@@ -16,22 +16,12 @@
 # specific language governing permissions and limitations
 # under the License.
 #
+org.slf4j.simpleLogger.logFile=System.out
 
-name=ClientModuleTestPropertiesConfig
-status=warn
+org.slf4j.simpleLogger.defaultLogLevel=warn
 
-appender.console.type=Console
-appender.console.name=STDOUT
-appender.console.layout.type=PatternLayout
-appender.console.layout.pattern=%d [%-15.15t] - %-5p %-30.30c{1} - %m%n
+org.slf4j.simpleLogger.showDateTime=true
+org.slf4j.simpleLogger.dateTimeFormat=yyyy-MM-dd HH:mm:ss,SSS
 
-rootLogger.level=info
-rootLogger.appenderRef.console.ref=STDOUT
-
-logger.client.name=org.apache.qpid.protonj2.client
-logger.client.level=info
-
-logger.proton.name=org.apache.qpid.protonj2
-logger.proton.level=info
-
-
+org.slf4j.simpleLogger.log.org.apache.qpid.protonj2=warn
+org.slf4j.simpleLogger.log.org.apache.qpid.protonj2.client=warn
diff --git a/protonj2-client-examples/src/test/resources/log4j2-test.properties b/protonj2-client-examples/src/test/resources/log4j2-test.properties
deleted file mode 100644
index a8cadef..0000000
--- a/protonj2-client-examples/src/test/resources/log4j2-test.properties
+++ /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.
-#
-
-name=ClientModuleTestPropertiesConfig
-status=warn
-
-appender.console.type=Console
-appender.console.name=STDOUT
-appender.console.layout.type=PatternLayout
-appender.console.layout.pattern=%d [%-15.15t] - %-5p %-30.30c{1} - %m%n
-
-rootLogger.level=debug
-rootLogger.appenderRef.console.ref=STDOUT
-
-logger.client.name=org.apache.qpid.protonj2.client
-logger.client.level=debug
-
-logger.proton.name=org.apache.qpid.protonj2
-logger.proton.level=debug
-
-
diff --git a/protonj2-client-examples/src/main/resources/log4j2-test.properties b/protonj2-client-examples/src/test/resources/simplelogger.properties
similarity index 64%
copy from protonj2-client-examples/src/main/resources/log4j2-test.properties
copy to protonj2-client-examples/src/test/resources/simplelogger.properties
index 8dac3e7..26a01f3 100644
--- a/protonj2-client-examples/src/main/resources/log4j2-test.properties
+++ b/protonj2-client-examples/src/test/resources/simplelogger.properties
@@ -16,22 +16,12 @@
 # specific language governing permissions and limitations
 # under the License.
 #
+org.slf4j.simpleLogger.logFile=System.out
 
-name=ClientModuleTestPropertiesConfig
-status=warn
+org.slf4j.simpleLogger.defaultLogLevel=warn
 
-appender.console.type=Console
-appender.console.name=STDOUT
-appender.console.layout.type=PatternLayout
-appender.console.layout.pattern=%d [%-15.15t] - %-5p %-30.30c{1} - %m%n
+org.slf4j.simpleLogger.showDateTime=true
+org.slf4j.simpleLogger.dateTimeFormat=yyyy-MM-dd HH:mm:ss,SSS
 
-rootLogger.level=info
-rootLogger.appenderRef.console.ref=STDOUT
-
-logger.client.name=org.apache.qpid.protonj2.client
-logger.client.level=info
-
-logger.proton.name=org.apache.qpid.protonj2
-logger.proton.level=info
-
-
+org.slf4j.simpleLogger.log.org.apache.qpid.protonj2=debug
+org.slf4j.simpleLogger.log.org.apache.qpid.protonj2.client=debug
diff --git a/protonj2-client/pom.xml b/protonj2-client/pom.xml
index c7cd536..9f39a9c 100644
--- a/protonj2-client/pom.xml
+++ b/protonj2-client/pom.xml
@@ -100,8 +100,8 @@
       <scope>test</scope>
     </dependency>
     <dependency>
-      <groupId>org.apache.logging.log4j</groupId>
-      <artifactId>log4j-slf4j-impl</artifactId>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-simple</artifactId>
       <scope>test</scope>
     </dependency>
     <dependency>
diff --git a/protonj2-client/src/test/resources/log4j2-test.properties b/protonj2-client/src/test/resources/log4j2-test.properties
deleted file mode 100644
index 0fc0d65..0000000
--- a/protonj2-client/src/test/resources/log4j2-test.properties
+++ /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.
-#
-
-name=ClientModuleTestPropertiesConfig
-status=warn
-
-appender.console.type=Console
-appender.console.name=STDOUT
-appender.console.layout.type=PatternLayout
-appender.console.layout.pattern=%d [%-15.15t] - %-5p %-30.30c{1} - %m%n
-
-rootLogger.level=debug
-rootLogger.appenderRef.console.ref=STDOUT
-
-logger.client.name=org.apache.qpid.protonj2.client
-logger.client.level=trace
-
-logger.proton.name=org.apache.qpid.protonj2
-logger.proton.level=trace
-
-
diff --git a/protonj2-client-examples/src/main/resources/log4j2-test.properties b/protonj2-client/src/test/resources/simplelogger.properties
similarity index 64%
rename from protonj2-client-examples/src/main/resources/log4j2-test.properties
rename to protonj2-client/src/test/resources/simplelogger.properties
index 8dac3e7..da58933 100644
--- a/protonj2-client-examples/src/main/resources/log4j2-test.properties
+++ b/protonj2-client/src/test/resources/simplelogger.properties
@@ -16,22 +16,12 @@
 # specific language governing permissions and limitations
 # under the License.
 #
+org.slf4j.simpleLogger.logFile=System.out
 
-name=ClientModuleTestPropertiesConfig
-status=warn
+org.slf4j.simpleLogger.defaultLogLevel=debug
 
-appender.console.type=Console
-appender.console.name=STDOUT
-appender.console.layout.type=PatternLayout
-appender.console.layout.pattern=%d [%-15.15t] - %-5p %-30.30c{1} - %m%n
+org.slf4j.simpleLogger.showDateTime=true
+org.slf4j.simpleLogger.dateTimeFormat=yyyy-MM-dd HH:mm:ss,SSS
 
-rootLogger.level=info
-rootLogger.appenderRef.console.ref=STDOUT
-
-logger.client.name=org.apache.qpid.protonj2.client
-logger.client.level=info
-
-logger.proton.name=org.apache.qpid.protonj2
-logger.proton.level=info
-
-
+org.slf4j.simpleLogger.log.org.apache.qpid.protonj2=trace
+org.slf4j.simpleLogger.log.org.apache.qpid.protonj2.client=trace
diff --git a/protonj2-test-driver/pom.xml b/protonj2-test-driver/pom.xml
index 95cf883..1d33768 100644
--- a/protonj2-test-driver/pom.xml
+++ b/protonj2-test-driver/pom.xml
@@ -81,8 +81,8 @@
       <scope>test</scope>
     </dependency>
     <dependency>
-      <groupId>org.apache.logging.log4j</groupId>
-      <artifactId>log4j-slf4j-impl</artifactId>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-simple</artifactId>
       <scope>test</scope>
     </dependency>
   </dependencies>
diff --git a/protonj2-test-driver/src/test/resources/log4j.properties b/protonj2-test-driver/src/test/resources/log4j.properties
deleted file mode 100644
index fb65374..0000000
--- a/protonj2-test-driver/src/test/resources/log4j.properties
+++ /dev/null
@@ -1,33 +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.
-## ---------------------------------------------------------------------------
-
-log4j.rootLogger=TRACE, out, stdout
-
-# The logging properties used during tests, tune as needed.
-log4j.logger.org.apache.qpid.protonj2=TRACE
-
-# CONSOLE appender not used by default
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=%d [%-15.15t] - %-5p %-30.30c{1} - %m%n
-
-# File appender
-log4j.appender.out=org.apache.log4j.FileAppender
-log4j.appender.out.layout=org.apache.log4j.PatternLayout
-log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] - %-5p %-30.30c{1} - %m%n
-log4j.appender.out.file=target/protonj2-test.log
-log4j.appender.out.append=true
diff --git a/protonj2-test-driver/src/test/resources/log4j2-test.properties b/protonj2-test-driver/src/test/resources/log4j2-test.properties
deleted file mode 100644
index 75e8ffc..0000000
--- a/protonj2-test-driver/src/test/resources/log4j2-test.properties
+++ /dev/null
@@ -1,36 +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.
-#
-
-name=ClientModuleTestPropertiesConfig
-status=warn
-
-appender.console.type=Console
-appender.console.name=STDOUT
-appender.console.layout.type=PatternLayout
-appender.console.layout.pattern=%d [%-15.15t] - %-5p %-30.30c{1} - %m%n
-
-rootLogger.level=trace
-rootLogger.appenderRef.console.ref=STDOUT
-
-logger.proton.name=org.apache.qpid.protonj2
-logger.proton.level=trace
-
-logger.testpeer.name=org.apache.qpid.protonj2.test.driver
-logger.testpeer.level=trace
-
diff --git a/protonj2-client-examples/src/main/resources/log4j2-test.properties b/protonj2-test-driver/src/test/resources/simplelogger.properties
similarity index 64%
copy from protonj2-client-examples/src/main/resources/log4j2-test.properties
copy to protonj2-test-driver/src/test/resources/simplelogger.properties
index 8dac3e7..c0cd8b8 100644
--- a/protonj2-client-examples/src/main/resources/log4j2-test.properties
+++ b/protonj2-test-driver/src/test/resources/simplelogger.properties
@@ -16,22 +16,11 @@
 # specific language governing permissions and limitations
 # under the License.
 #
+org.slf4j.simpleLogger.logFile=System.out
 
-name=ClientModuleTestPropertiesConfig
-status=warn
+org.slf4j.simpleLogger.defaultLogLevel=debug
 
-appender.console.type=Console
-appender.console.name=STDOUT
-appender.console.layout.type=PatternLayout
-appender.console.layout.pattern=%d [%-15.15t] - %-5p %-30.30c{1} - %m%n
+org.slf4j.simpleLogger.showDateTime=true
+org.slf4j.simpleLogger.dateTimeFormat=yyyy-MM-dd HH:mm:ss,SSS
 
-rootLogger.level=info
-rootLogger.appenderRef.console.ref=STDOUT
-
-logger.client.name=org.apache.qpid.protonj2.client
-logger.client.level=info
-
-logger.proton.name=org.apache.qpid.protonj2
-logger.proton.level=info
-
-
+org.slf4j.simpleLogger.log.org.apache.qpid.protonj2=trace
diff --git a/protonj2/pom.xml b/protonj2/pom.xml
index 532c8da..fbc9a17 100644
--- a/protonj2/pom.xml
+++ b/protonj2/pom.xml
@@ -80,8 +80,8 @@
       <scope>test</scope>
     </dependency>
     <dependency>
-      <groupId>org.apache.logging.log4j</groupId>
-      <artifactId>log4j-slf4j-impl</artifactId>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-simple</artifactId>
       <scope>test</scope>
     </dependency>
   </dependencies>
diff --git a/protonj2/src/test/resources/log4j2-test.properties b/protonj2/src/test/resources/log4j2-test.properties
deleted file mode 100644
index 75e8ffc..0000000
--- a/protonj2/src/test/resources/log4j2-test.properties
+++ /dev/null
@@ -1,36 +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.
-#
-
-name=ClientModuleTestPropertiesConfig
-status=warn
-
-appender.console.type=Console
-appender.console.name=STDOUT
-appender.console.layout.type=PatternLayout
-appender.console.layout.pattern=%d [%-15.15t] - %-5p %-30.30c{1} - %m%n
-
-rootLogger.level=trace
-rootLogger.appenderRef.console.ref=STDOUT
-
-logger.proton.name=org.apache.qpid.protonj2
-logger.proton.level=trace
-
-logger.testpeer.name=org.apache.qpid.protonj2.test.driver
-logger.testpeer.level=trace
-
diff --git a/protonj2-client-examples/src/main/resources/log4j2-test.properties b/protonj2/src/test/resources/simplelogger.properties
similarity index 64%
copy from protonj2-client-examples/src/main/resources/log4j2-test.properties
copy to protonj2/src/test/resources/simplelogger.properties
index 8dac3e7..b4ce39a 100644
--- a/protonj2-client-examples/src/main/resources/log4j2-test.properties
+++ b/protonj2/src/test/resources/simplelogger.properties
@@ -16,22 +16,12 @@
 # specific language governing permissions and limitations
 # under the License.
 #
+org.slf4j.simpleLogger.logFile=System.out
 
-name=ClientModuleTestPropertiesConfig
-status=warn
+org.slf4j.simpleLogger.defaultLogLevel=trace
 
-appender.console.type=Console
-appender.console.name=STDOUT
-appender.console.layout.type=PatternLayout
-appender.console.layout.pattern=%d [%-15.15t] - %-5p %-30.30c{1} - %m%n
+org.slf4j.simpleLogger.showDateTime=true
+org.slf4j.simpleLogger.dateTimeFormat=yyyy-MM-dd HH:mm:ss,SSS
 
-rootLogger.level=info
-rootLogger.appenderRef.console.ref=STDOUT
-
-logger.client.name=org.apache.qpid.protonj2.client
-logger.client.level=info
-
-logger.proton.name=org.apache.qpid.protonj2
-logger.proton.level=info
-
-
+org.slf4j.simpleLogger.log.org.apache.qpid.protonj2=trace
+org.slf4j.simpleLogger.log.org.apache.qpid.protonj2.test.driver=trace