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

clebertsuconic pushed a commit to branch new-logging
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git


The following commit(s) were added to refs/heads/new-logging by this push:
     new f730ad74af Removing log facade package
f730ad74af is described below

commit f730ad74afec561a67a144971c3ce51b2b8608a2
Author: Clebert Suconic <[email protected]>
AuthorDate: Mon Aug 1 23:11:52 2022 -0400

    Removing log facade package
---
 .../client/cdi/logger/ActiveMQCDILogger.java       |  4 +-
 .../bootstrap/ActiveMQBootstrapLogger.java         |  4 +-
 artemis-commons/pom.xml                            |  5 --
 .../activemq/artemis/logs/ActiveMQUtilBundle.java  |  3 +-
 .../activemq/artemis/logs/ActiveMQUtilLogger.java  |  3 +-
 .../apache/activemq/artemis/logs/AuditLogger.java  |  7 +-
 .../activemq/artemis/logs/BundleFactory.java       | 57 ++++++++++++++++
 .../artemis/core/client/ActiveMQClientLogger.java  |  4 +-
 .../core/client/ActiveMQClientMessageBundle.java   |  4 +-
 artemis-features/src/main/resources/features.xml   |  1 -
 .../jms/client/ActiveMQJMSClientBundle.java        |  4 +-
 .../jms/client/ActiveMQJMSClientLogger.java        |  4 +-
 .../jms/bridge/ActiveMQJMSBridgeLogger.java        |  4 +-
 .../jms/server/ActiveMQJMSServerBundle.java        |  4 +-
 .../jms/server/ActiveMQJMSServerLogger.java        |  4 +-
 .../artemis/journal/ActiveMQJournalBundle.java     |  4 +-
 .../artemis/journal/ActiveMQJournalLogger.java     |  4 +-
 artemis-log-facade/pom.xml                         | 78 ----------------------
 .../activemq/artemis/logprocessor/CodeFactory.java | 69 -------------------
 artemis-log-processor/pom.xml                      |  5 --
 .../artemis/logprocessor/SimpleBundle.java         | 13 +++-
 artemis-protocols/artemis-amqp-protocol/pom.xml    |  5 --
 .../amqp/logger/ActiveMQAMQPProtocolLogger.java    |  4 +-
 .../logger/ActiveMQAMQPProtocolMessageBundle.java  |  4 +-
 .../artemis/core/protocol/mqtt/MQTTLogger.java     |  5 +-
 .../stomp/ActiveMQStompProtocolLogger.java         |  4 +-
 .../stomp/ActiveMQStompProtocolMessageBundle.java  |  4 +-
 .../activemq/artemis/ra/ActiveMQRABundle.java      |  4 +-
 .../activemq/artemis/ra/ActiveMQRALogger.java      |  4 +-
 .../activemq/artemis/rest/ActiveMQRestLogger.java  |  4 +-
 .../activemq/artemis/osgi/ActiveMQOsgiLogger.java  |  4 +-
 .../artemis/core/server/ActiveMQMessageBundle.java |  4 +-
 .../artemis/core/server/ActiveMQServerLogger.java  |  4 +-
 .../impl/LoggingActiveMQServerPluginLogger.java    |  4 +-
 .../extensions/ActiveMQServiceExtensionLogger.java |  4 +-
 .../xa/recovery/ActiveMQXARecoveryLogger.java      |  4 +-
 .../apache/activemq/artemis/ActiveMQWebLogger.java |  4 +-
 pom.xml                                            |  1 -
 38 files changed, 127 insertions(+), 225 deletions(-)

diff --git 
a/artemis-cdi-client/src/main/java/org/apache/artemis/client/cdi/logger/ActiveMQCDILogger.java
 
b/artemis-cdi-client/src/main/java/org/apache/artemis/client/cdi/logger/ActiveMQCDILogger.java
index 4f75c76eeb..a1ce276b65 100644
--- 
a/artemis-cdi-client/src/main/java/org/apache/artemis/client/cdi/logger/ActiveMQCDILogger.java
+++ 
b/artemis-cdi-client/src/main/java/org/apache/artemis/client/cdi/logger/ActiveMQCDILogger.java
@@ -21,9 +21,9 @@ package org.apache.artemis.client.cdi.logger;
 
 import javax.enterprise.inject.spi.ProcessBean;
 
-import org.apache.activemq.artemis.logprocessor.CodeFactory;
 import org.apache.activemq.artemis.logprocessor.annotation.LogBundle;
 import org.apache.activemq.artemis.logprocessor.annotation.LogMessage;
+import org.apache.activemq.artemis.logs.BundleFactory;
 
 /**
  * Logger code 57
@@ -42,7 +42,7 @@ import 
org.apache.activemq.artemis.logprocessor.annotation.LogMessage;
 @LogBundle(projectCode = "AMQ")
 public interface ActiveMQCDILogger {
 
-   ActiveMQCDILogger LOGGER = 
CodeFactory.getCodeClass(ActiveMQCDILogger.class, 
ActiveMQCDILogger.class.getPackage().getName());
+   ActiveMQCDILogger LOGGER = BundleFactory.newBundle(ActiveMQCDILogger.class, 
ActiveMQCDILogger.class.getPackage().getName());
 
    @LogMessage(id = 571000, value = "Discovered configuration class {}", level 
= LogMessage.Level.INFO)
    void discoveredConfiguration(ProcessBean<?> pb);
diff --git 
a/artemis-cli/src/main/java/org/apache/activemq/artemis/integration/bootstrap/ActiveMQBootstrapLogger.java
 
b/artemis-cli/src/main/java/org/apache/activemq/artemis/integration/bootstrap/ActiveMQBootstrapLogger.java
index f0c1904f95..bfb3f7fd50 100644
--- 
a/artemis-cli/src/main/java/org/apache/activemq/artemis/integration/bootstrap/ActiveMQBootstrapLogger.java
+++ 
b/artemis-cli/src/main/java/org/apache/activemq/artemis/integration/bootstrap/ActiveMQBootstrapLogger.java
@@ -16,9 +16,9 @@
  */
 package org.apache.activemq.artemis.integration.bootstrap;
 
-import org.apache.activemq.artemis.logprocessor.CodeFactory;
 import org.apache.activemq.artemis.logprocessor.annotation.LogBundle;
 import org.apache.activemq.artemis.logprocessor.annotation.LogMessage;
+import org.apache.activemq.artemis.logs.BundleFactory;
 
 /**
  * Logger Code 10
@@ -37,7 +37,7 @@ import 
org.apache.activemq.artemis.logprocessor.annotation.LogMessage;
 @LogBundle(projectCode = "AMQ")
 public interface ActiveMQBootstrapLogger {
 
-   ActiveMQBootstrapLogger LOGGER = 
CodeFactory.getCodeClass(ActiveMQBootstrapLogger.class, 
ActiveMQBootstrapLogger.class.getPackage().getName());
+   ActiveMQBootstrapLogger LOGGER = 
BundleFactory.newBundle(ActiveMQBootstrapLogger.class, 
ActiveMQBootstrapLogger.class.getPackage().getName());
 
    @LogMessage(id = 101000, value = "Starting ActiveMQ Artemis Server", level 
= LogMessage.Level.INFO)
    void serverStarting();
diff --git a/artemis-commons/pom.xml b/artemis-commons/pom.xml
index 5b8448f9fd..f03d52f8aa 100644
--- a/artemis-commons/pom.xml
+++ b/artemis-commons/pom.xml
@@ -52,11 +52,6 @@
       <!-- ^^ these dependencies are shaded on this JAR -->
 
       <!-- logging -->
-      <dependency>
-         <groupId>org.apache.activemq</groupId>
-         <artifactId>artemis-log-facade</artifactId>
-         <version>${project.version}</version>
-      </dependency>
       <dependency>
          <groupId>org.apache.activemq</groupId>
          <artifactId>artemis-log-processor</artifactId>
diff --git 
a/artemis-commons/src/main/java/org/apache/activemq/artemis/logs/ActiveMQUtilBundle.java
 
b/artemis-commons/src/main/java/org/apache/activemq/artemis/logs/ActiveMQUtilBundle.java
index 4c4de7882a..1d01bb3eea 100644
--- 
a/artemis-commons/src/main/java/org/apache/activemq/artemis/logs/ActiveMQUtilBundle.java
+++ 
b/artemis-commons/src/main/java/org/apache/activemq/artemis/logs/ActiveMQUtilBundle.java
@@ -17,7 +17,6 @@
 package org.apache.activemq.artemis.logs;
 
 import org.apache.activemq.artemis.api.core.ActiveMQIllegalStateException;
-import org.apache.activemq.artemis.logprocessor.CodeFactory;
 import org.apache.activemq.artemis.logprocessor.annotation.LogBundle;
 import org.apache.activemq.artemis.logprocessor.annotation.Message;
 
@@ -31,7 +30,7 @@ import 
org.apache.activemq.artemis.logprocessor.annotation.Message;
 @LogBundle(projectCode = "AMQ")
 public interface ActiveMQUtilBundle {
 
-   ActiveMQUtilBundle BUNDLE = 
CodeFactory.getCodeClass(ActiveMQUtilBundle.class);
+   ActiveMQUtilBundle BUNDLE = 
BundleFactory.newBundle(ActiveMQUtilBundle.class);
 
    @Message(id = 209000, value = "invalid property: {}")
    ActiveMQIllegalStateException invalidProperty(String part);
diff --git 
a/artemis-commons/src/main/java/org/apache/activemq/artemis/logs/ActiveMQUtilLogger.java
 
b/artemis-commons/src/main/java/org/apache/activemq/artemis/logs/ActiveMQUtilLogger.java
index 9bd7120145..53da5beae2 100644
--- 
a/artemis-commons/src/main/java/org/apache/activemq/artemis/logs/ActiveMQUtilLogger.java
+++ 
b/artemis-commons/src/main/java/org/apache/activemq/artemis/logs/ActiveMQUtilLogger.java
@@ -16,7 +16,6 @@
  */
 package org.apache.activemq.artemis.logs;
 
-import org.apache.activemq.artemis.logprocessor.CodeFactory;
 import org.apache.activemq.artemis.logprocessor.annotation.LogBundle;
 import org.apache.activemq.artemis.logprocessor.annotation.LogMessage;
 
@@ -26,7 +25,7 @@ import 
org.apache.activemq.artemis.logprocessor.annotation.LogMessage;
 @LogBundle(projectCode = "AMQ")
 public interface ActiveMQUtilLogger {
 
-   ActiveMQUtilLogger LOGGER = 
CodeFactory.getCodeClass(ActiveMQUtilLogger.class, 
ActiveMQUtilLogger.class.getPackage().getName());
+   ActiveMQUtilLogger LOGGER = 
BundleFactory.newBundle(ActiveMQUtilLogger.class, 
ActiveMQUtilLogger.class.getPackage().getName());
 
    @LogMessage(id = 201000, value = "Network is healthy, starting service {}", 
level = LogMessage.Level.INFO)
    void startingService(String component);
diff --git 
a/artemis-commons/src/main/java/org/apache/activemq/artemis/logs/AuditLogger.java
 
b/artemis-commons/src/main/java/org/apache/activemq/artemis/logs/AuditLogger.java
index 75e406d240..cd3a6adcb5 100644
--- 
a/artemis-commons/src/main/java/org/apache/activemq/artemis/logs/AuditLogger.java
+++ 
b/artemis-commons/src/main/java/org/apache/activemq/artemis/logs/AuditLogger.java
@@ -16,7 +16,6 @@
  */
 package org.apache.activemq.artemis.logs;
 
-import org.apache.activemq.artemis.logprocessor.CodeFactory;
 import org.apache.activemq.artemis.logprocessor.annotation.LogBundle;
 import org.apache.activemq.artemis.logprocessor.annotation.GetLogger;
 import org.apache.activemq.artemis.logprocessor.annotation.LogMessage;
@@ -35,9 +34,9 @@ import java.util.Set;
 @LogBundle(projectCode = "AMQ")
 public interface AuditLogger {
 
-   AuditLogger BASE_LOGGER = CodeFactory.getCodeClass(AuditLogger.class, 
"org.apache.activemq.audit.base");
-   AuditLogger RESOURCE_LOGGER = CodeFactory.getCodeClass(AuditLogger.class, 
"org.apache.activemq.audit.resource");
-   AuditLogger MESSAGE_LOGGER = CodeFactory.getCodeClass(AuditLogger.class, 
"org.apache.activemq.audit.message");
+   AuditLogger BASE_LOGGER = BundleFactory.newBundle(AuditLogger.class, 
"org.apache.activemq.audit.base");
+   AuditLogger RESOURCE_LOGGER = BundleFactory.newBundle(AuditLogger.class, 
"org.apache.activemq.audit.resource");
+   AuditLogger MESSAGE_LOGGER = BundleFactory.newBundle(AuditLogger.class, 
"org.apache.activemq.audit.message");
 
    ThreadLocal<String> remoteAddress = new ThreadLocal<>();
 
diff --git 
a/artemis-commons/src/main/java/org/apache/activemq/artemis/logs/BundleFactory.java
 
b/artemis-commons/src/main/java/org/apache/activemq/artemis/logs/BundleFactory.java
new file mode 100644
index 0000000000..43c9e52470
--- /dev/null
+++ 
b/artemis-commons/src/main/java/org/apache/activemq/artemis/logs/BundleFactory.java
@@ -0,0 +1,57 @@
+/*
+ * 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.activemq.artemis.logs;
+
+import java.lang.reflect.Constructor;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class BundleFactory {
+
+
+   public static <T> T newBundle(final Class<T> type) {
+      return newBundle(type, type.getName());
+   }
+
+   public static <T> T newBundle(final Class<T> type, String category) {
+      final String implClassName = type.getName() + "_impl";
+
+      final Class<? extends T> implClass;
+      try {
+         implClass = Class.forName(implClassName, true, 
type.getClassLoader()).asSubclass(type);
+      } catch (Exception e) {
+         throw new IllegalArgumentException("Unable to find class for 
log/message impl: " + implClassName, e);
+      }
+
+      final Constructor<? extends T> constructor;
+      try {
+         constructor = implClass.getConstructor(Logger.class);
+      } catch (Exception e) {
+         throw new IllegalArgumentException("Unable to find constructor for 
log/message impl: " + implClassName, e);
+      }
+
+      try {
+         Logger logger = LoggerFactory.getLogger(category);
+
+         return type.cast(constructor.newInstance(logger));
+      } catch (Exception e) {
+         throw new IllegalArgumentException("Unable to create instance for 
log/message impl: " + implClassName, e);
+      }
+   }
+}
\ No newline at end of file
diff --git 
a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/ActiveMQClientLogger.java
 
b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/ActiveMQClientLogger.java
index 0480e9a247..f0c158b351 100644
--- 
a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/ActiveMQClientLogger.java
+++ 
b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/ActiveMQClientLogger.java
@@ -20,9 +20,9 @@ import java.net.UnknownHostException;
 
 import org.apache.activemq.artemis.api.core.ActiveMQExceptionType;
 import org.apache.activemq.artemis.api.core.Interceptor;
-import org.apache.activemq.artemis.logprocessor.CodeFactory;
 import org.apache.activemq.artemis.logprocessor.annotation.LogBundle;
 import org.apache.activemq.artemis.logprocessor.annotation.LogMessage;
+import org.apache.activemq.artemis.logs.BundleFactory;
 import org.w3c.dom.Node;
 
 /**
@@ -31,7 +31,7 @@ import org.w3c.dom.Node;
 @LogBundle(projectCode = "AMQ")
 public interface ActiveMQClientLogger {
 
-   ActiveMQClientLogger LOGGER = 
CodeFactory.getCodeClass(ActiveMQClientLogger.class, 
ActiveMQClientLogger.class.getPackage().getName());
+   ActiveMQClientLogger LOGGER = 
BundleFactory.newBundle(ActiveMQClientLogger.class, 
ActiveMQClientLogger.class.getPackage().getName());
 
    @LogMessage(id = 212001, value = "Error on clearing messages", level = 
LogMessage.Level.WARN)
    void errorClearingMessages(Throwable e);
diff --git 
a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/ActiveMQClientMessageBundle.java
 
b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/ActiveMQClientMessageBundle.java
index 92d14e7a4a..2fa542214c 100644
--- 
a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/ActiveMQClientMessageBundle.java
+++ 
b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/ActiveMQClientMessageBundle.java
@@ -32,9 +32,9 @@ import 
org.apache.activemq.artemis.api.core.ActiveMQTransactionOutcomeUnknownExc
 import 
org.apache.activemq.artemis.api.core.ActiveMQTransactionRolledBackException;
 import org.apache.activemq.artemis.api.core.ActiveMQUnBlockedException;
 import org.apache.activemq.artemis.core.cluster.DiscoveryGroup;
-import org.apache.activemq.artemis.logprocessor.CodeFactory;
 import org.apache.activemq.artemis.logprocessor.annotation.LogBundle;
 import org.apache.activemq.artemis.logprocessor.annotation.Message;
+import org.apache.activemq.artemis.logs.BundleFactory;
 import org.apache.activemq.artemis.spi.core.remoting.Connection;
 import org.w3c.dom.Node;
 
@@ -48,7 +48,7 @@ import org.w3c.dom.Node;
 @LogBundle(projectCode = "AMQ")
 public interface ActiveMQClientMessageBundle {
 
-   ActiveMQClientMessageBundle BUNDLE = 
CodeFactory.getCodeClass(ActiveMQClientMessageBundle.class);
+   ActiveMQClientMessageBundle BUNDLE = 
BundleFactory.newBundle(ActiveMQClientMessageBundle.class);
 
    @Message(id = 219000, value = "ClientSession closed while creating session")
    ActiveMQInternalErrorException clientSessionClosed();
diff --git a/artemis-features/src/main/resources/features.xml 
b/artemis-features/src/main/resources/features.xml
index 7de6fadb58..96e673b5e3 100644
--- a/artemis-features/src/main/resources/features.xml
+++ b/artemis-features/src/main/resources/features.xml
@@ -54,7 +54,6 @@
                <bundle 
dependency="true">mvn:commons-collections/commons-collections/${commons.collections.version}</bundle>
 
                <bundle 
dependency="true">wrap:mvn:org.jgroups/jgroups/${jgroups.version}</bundle>
-               
<bundle>wrap:mvn:org.apache.activemq/artemis-log-facade/${pom.version}</bundle>
        </feature>
 
        <feature name="artemis-core" version="${pom.version}" 
description="ActiveMQ Artemis broker libraries">
diff --git 
a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQJMSClientBundle.java
 
b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQJMSClientBundle.java
index efeb11258a..6a662d3443 100644
--- 
a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQJMSClientBundle.java
+++ 
b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQJMSClientBundle.java
@@ -28,9 +28,9 @@ import 
org.apache.activemq.artemis.api.core.ActiveMQIllegalStateException;
 import 
org.apache.activemq.artemis.api.core.ActiveMQInvalidFilterExpressionException;
 import org.apache.activemq.artemis.api.core.ActiveMQNonExistentQueueException;
 import org.apache.activemq.artemis.api.core.SimpleString;
-import org.apache.activemq.artemis.logprocessor.CodeFactory;
 import org.apache.activemq.artemis.logprocessor.annotation.LogBundle;
 import org.apache.activemq.artemis.logprocessor.annotation.Message;
+import org.apache.activemq.artemis.logs.BundleFactory;
 
 /**
  * Logger Code 13
@@ -42,7 +42,7 @@ import 
org.apache.activemq.artemis.logprocessor.annotation.Message;
 @LogBundle(projectCode = "AMQ")
 public interface ActiveMQJMSClientBundle {
 
-   ActiveMQJMSClientBundle BUNDLE = 
CodeFactory.getCodeClass(ActiveMQJMSClientBundle.class);
+   ActiveMQJMSClientBundle BUNDLE = 
BundleFactory.newBundle(ActiveMQJMSClientBundle.class);
 
    @Message(id = 139000, value = "Invalid filter: {}")
    ActiveMQInvalidFilterExpressionException invalidFilter(SimpleString filter, 
Throwable e);
diff --git 
a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQJMSClientLogger.java
 
b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQJMSClientLogger.java
index e48bdc6f54..3912fe31b5 100644
--- 
a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQJMSClientLogger.java
+++ 
b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQJMSClientLogger.java
@@ -16,9 +16,9 @@
  */
 package org.apache.activemq.artemis.jms.client;
 
-import org.apache.activemq.artemis.logprocessor.CodeFactory;
 import org.apache.activemq.artemis.logprocessor.annotation.LogBundle;
 import org.apache.activemq.artemis.logprocessor.annotation.LogMessage;
+import org.apache.activemq.artemis.logs.BundleFactory;
 
 /**
  * Logger Code 13
@@ -37,7 +37,7 @@ import 
org.apache.activemq.artemis.logprocessor.annotation.LogMessage;
 @LogBundle(projectCode = "AMQ")
 public interface ActiveMQJMSClientLogger {
 
-   ActiveMQJMSClientLogger LOGGER = 
CodeFactory.getCodeClass(ActiveMQJMSClientLogger.class, 
ActiveMQJMSClientLogger.class.getPackage().getName());
+   ActiveMQJMSClientLogger LOGGER = 
BundleFactory.newBundle(ActiveMQJMSClientLogger.class, 
ActiveMQJMSClientLogger.class.getPackage().getName());
 
    @LogMessage(id = 132000, value = "I'm closing a JMS connection you left 
open. Please make sure you close all JMS connections explicitly before letting 
them go out of scope! see stacktrace to find out where it was created", level = 
LogMessage.Level.WARN)
    void connectionLeftOpen(Exception e);
diff --git 
a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/ActiveMQJMSBridgeLogger.java
 
b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/ActiveMQJMSBridgeLogger.java
index d303f97ea4..665bd896c2 100644
--- 
a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/ActiveMQJMSBridgeLogger.java
+++ 
b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/ActiveMQJMSBridgeLogger.java
@@ -18,9 +18,9 @@ package org.apache.activemq.artemis.jms.bridge;
 
 import javax.management.ObjectName;
 
-import org.apache.activemq.artemis.logprocessor.CodeFactory;
 import org.apache.activemq.artemis.logprocessor.annotation.LogBundle;
 import org.apache.activemq.artemis.logprocessor.annotation.LogMessage;
+import org.apache.activemq.artemis.logs.BundleFactory;
 
 /**
  * Logger Code 34
@@ -28,7 +28,7 @@ import 
org.apache.activemq.artemis.logprocessor.annotation.LogMessage;
 @LogBundle(projectCode = "AMQ")
 public interface ActiveMQJMSBridgeLogger {
 
-   ActiveMQJMSBridgeLogger LOGGER = 
CodeFactory.getCodeClass(ActiveMQJMSBridgeLogger.class, 
ActiveMQJMSBridgeLogger.class.getPackage().getName());
+   ActiveMQJMSBridgeLogger LOGGER = 
BundleFactory.newBundle(ActiveMQJMSBridgeLogger.class, 
ActiveMQJMSBridgeLogger.class.getPackage().getName());
 
    @LogMessage(id = 341000, value = "Failed to set up JMS bridge {}} 
connections. Most probably the source or target servers are unavailable." + " 
Will retry after a pause of {} ms", level = LogMessage.Level.INFO)
    void failedToSetUpBridge(String bridgeName, long failureRetryInterval);
diff --git 
a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/ActiveMQJMSServerBundle.java
 
b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/ActiveMQJMSServerBundle.java
index c19791d302..792d83db8e 100644
--- 
a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/ActiveMQJMSServerBundle.java
+++ 
b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/ActiveMQJMSServerBundle.java
@@ -19,9 +19,9 @@ package org.apache.activemq.artemis.jms.server;
 import org.apache.activemq.artemis.api.core.ActiveMQAddressExistsException;
 import org.apache.activemq.artemis.api.core.ActiveMQIllegalStateException;
 import org.apache.activemq.artemis.api.core.ActiveMQInternalErrorException;
-import org.apache.activemq.artemis.logprocessor.CodeFactory;
 import org.apache.activemq.artemis.logprocessor.annotation.LogBundle;
 import org.apache.activemq.artemis.logprocessor.annotation.Message;
+import org.apache.activemq.artemis.logs.BundleFactory;
 
 /**
  * Logger Code 12
@@ -29,7 +29,7 @@ import 
org.apache.activemq.artemis.logprocessor.annotation.Message;
 @LogBundle(projectCode = "AMQ")
 public interface ActiveMQJMSServerBundle {
 
-   ActiveMQJMSServerBundle BUNDLE = 
CodeFactory.getCodeClass(ActiveMQJMSServerBundle.class);
+   ActiveMQJMSServerBundle BUNDLE = 
BundleFactory.newBundle(ActiveMQJMSServerBundle.class);
 
    @Message(id = 129000, value = "Connection Factory {} does not exist")
    ActiveMQInternalErrorException cfDoesntExist(String name);
diff --git 
a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/ActiveMQJMSServerLogger.java
 
b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/ActiveMQJMSServerLogger.java
index 90f6e7967f..8f6b65db95 100644
--- 
a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/ActiveMQJMSServerLogger.java
+++ 
b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/ActiveMQJMSServerLogger.java
@@ -17,9 +17,9 @@
 package org.apache.activemq.artemis.jms.server;
 
 import org.apache.activemq.artemis.api.core.client.ClientSessionFactory;
-import org.apache.activemq.artemis.logprocessor.CodeFactory;
 import org.apache.activemq.artemis.logprocessor.annotation.LogBundle;
 import org.apache.activemq.artemis.logprocessor.annotation.LogMessage;
+import org.apache.activemq.artemis.logs.BundleFactory;
 import org.w3c.dom.Node;
 
 /**
@@ -31,7 +31,7 @@ public interface ActiveMQJMSServerLogger {
    /**
     * The default logger.
     */
-   ActiveMQJMSServerLogger LOGGER = 
CodeFactory.getCodeClass(ActiveMQJMSServerLogger.class, 
ActiveMQJMSServerLogger.class.getPackage().getName());
+   ActiveMQJMSServerLogger LOGGER = 
BundleFactory.newBundle(ActiveMQJMSServerLogger.class, 
ActiveMQJMSServerLogger.class.getPackage().getName());
 
    @LogMessage(id = 121004, value = "JMS Server Manager Caching command for {} 
since the JMS Server is not active.",
       level = LogMessage.Level.INFO)
diff --git 
a/artemis-journal/src/main/java/org/apache/activemq/artemis/journal/ActiveMQJournalBundle.java
 
b/artemis-journal/src/main/java/org/apache/activemq/artemis/journal/ActiveMQJournalBundle.java
index 27d3921de5..9aa40abc69 100644
--- 
a/artemis-journal/src/main/java/org/apache/activemq/artemis/journal/ActiveMQJournalBundle.java
+++ 
b/artemis-journal/src/main/java/org/apache/activemq/artemis/journal/ActiveMQJournalBundle.java
@@ -17,9 +17,9 @@
 package org.apache.activemq.artemis.journal;
 
 import org.apache.activemq.artemis.api.core.ActiveMQIOErrorException;
-import org.apache.activemq.artemis.logprocessor.CodeFactory;
 import org.apache.activemq.artemis.logprocessor.annotation.LogBundle;
 import org.apache.activemq.artemis.logprocessor.annotation.Message;
+import org.apache.activemq.artemis.logs.BundleFactory;
 
 /**
  * Logger Code 14
@@ -31,7 +31,7 @@ import 
org.apache.activemq.artemis.logprocessor.annotation.Message;
 @LogBundle(projectCode = "AMQ")
 public interface ActiveMQJournalBundle {
 
-   ActiveMQJournalBundle BUNDLE = 
CodeFactory.getCodeClass(ActiveMQJournalBundle.class);
+   ActiveMQJournalBundle BUNDLE = 
BundleFactory.newBundle(ActiveMQJournalBundle.class);
 
    @Message(id = 149000, value = "failed to rename file {} to {}")
    ActiveMQIOErrorException ioRenameFileError(String name, String newFileName);
diff --git 
a/artemis-journal/src/main/java/org/apache/activemq/artemis/journal/ActiveMQJournalLogger.java
 
b/artemis-journal/src/main/java/org/apache/activemq/artemis/journal/ActiveMQJournalLogger.java
index db6ce55967..7c43e65d5c 100644
--- 
a/artemis-journal/src/main/java/org/apache/activemq/artemis/journal/ActiveMQJournalLogger.java
+++ 
b/artemis-journal/src/main/java/org/apache/activemq/artemis/journal/ActiveMQJournalLogger.java
@@ -17,9 +17,9 @@
 package org.apache.activemq.artemis.journal;
 
 import org.apache.activemq.artemis.core.journal.impl.JournalFile;
-import org.apache.activemq.artemis.logprocessor.CodeFactory;
 import org.apache.activemq.artemis.logprocessor.annotation.LogBundle;
 import org.apache.activemq.artemis.logprocessor.annotation.LogMessage;
+import org.apache.activemq.artemis.logs.BundleFactory;
 
 /**
  * Logger Code 14
@@ -30,7 +30,7 @@ public interface ActiveMQJournalLogger {
    /**
     * The journal logger.
     */
-   ActiveMQJournalLogger LOGGER = 
CodeFactory.getCodeClass(ActiveMQJournalLogger.class, 
ActiveMQJournalLogger.class.getPackage().getName());
+   ActiveMQJournalLogger LOGGER = 
BundleFactory.newBundle(ActiveMQJournalLogger.class, 
ActiveMQJournalLogger.class.getPackage().getName());
 
    @LogMessage(id = 141000, value = "*** running direct journal blast: {}", 
level = LogMessage.Level.INFO)
    void runningJournalBlast(Integer numIts);
diff --git a/artemis-log-facade/pom.xml b/artemis-log-facade/pom.xml
deleted file mode 100644
index 56180cfa4f..0000000000
--- a/artemis-log-facade/pom.xml
+++ /dev/null
@@ -1,78 +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.
--->
-<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns="http://maven.apache.org/POM/4.0.0";
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
-   <modelVersion>4.0.0</modelVersion>
-
-   <parent>
-      <groupId>org.apache.activemq</groupId>
-      <artifactId>artemis-pom</artifactId>
-      <version>3.0.0-SNAPSHOT</version>
-   </parent>
-
-   <artifactId>artemis-log-facade</artifactId>
-   <packaging>jar</packaging>
-   <name>ActiveMQ Log Facade</name>
-
-   <properties>
-      <activemq.basedir>${project.basedir}/..</activemq.basedir>
-   </properties>
-
-   <dependencies>
-      <dependency>
-         <groupId>org.slf4j</groupId>
-         <artifactId>slf4j-api</artifactId>
-         <!-- License: MIT -->
-      </dependency>
-      <dependency>
-         <groupId>org.apache.logging.log4j</groupId>
-         <artifactId>log4j-slf4j-impl</artifactId>
-         <scope>test</scope>
-      </dependency>
-
-      <!-- needed to compile the tests -->
-      <dependency>
-         <groupId>junit</groupId>
-         <artifactId>junit</artifactId>
-         <scope>test</scope>
-         <!-- License: EPL 1.0 -->
-      </dependency>
-   </dependencies>
-
-   <build>
-      <plugins>
-         <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-compiler-plugin</artifactId>
-            <executions>
-               <execution>
-                  <id>default-compile</id>
-                  <phase>compile</phase>
-                  <goals>
-                     <goal>compile</goal>
-                  </goals>
-                  <configuration>
-                     <!-- Disable annotation processing for ourselves. -->
-                     <compilerArgument>-proc:none</compilerArgument>
-                  </configuration>
-               </execution>
-            </executions>
-         </plugin>
-      </plugins>
-   </build>
-
-</project>
diff --git 
a/artemis-log-facade/src/main/java/org/apache/activemq/artemis/logprocessor/CodeFactory.java
 
b/artemis-log-facade/src/main/java/org/apache/activemq/artemis/logprocessor/CodeFactory.java
deleted file mode 100644
index a9562634e5..0000000000
--- 
a/artemis-log-facade/src/main/java/org/apache/activemq/artemis/logprocessor/CodeFactory.java
+++ /dev/null
@@ -1,69 +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
- * <p>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p>
- * 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.activemq.artemis.logprocessor;
-
-import java.lang.reflect.Constructor;
-import java.security.PrivilegedAction;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import static java.security.AccessController.doPrivileged;
-
-public class CodeFactory {
-
-   private static final Logger logger = 
LoggerFactory.getLogger(CodeFactory.class);
-
-   public static <T> T getCodeClass(final Class<T> type) {
-      return getCodeClass(type, type.getName());
-   }
-
-   public static <T> T getCodeClass(final Class<T> type, String category) {
-      return doPrivileged(new PrivilegedAction<T>() {
-         @Override
-         public T run() {
-            final String implClassName = type.getName() + "_impl";
-
-            logger.trace("Loading [{}]", implClassName);
-
-            final Class<? extends T> implClass;
-            try {
-               implClass = Class.forName(implClassName, true, 
type.getClassLoader()).asSubclass(type);
-            } catch (Exception e) {
-               throw new IllegalArgumentException("Unable to find class for 
log/message impl: " + implClassName, e);
-            }
-
-            final Constructor<? extends T> constructor;
-            try {
-               constructor = implClass.getConstructor(Logger.class);
-            } catch (Exception e) {
-               throw new IllegalArgumentException("Unable to find constructor 
for log/message impl: " + implClassName, e);
-            }
-
-            try {
-               Logger logger = LoggerFactory.getLogger(category);
-
-               return type.cast(constructor.newInstance(logger));
-            } catch (Exception e) {
-               throw new IllegalArgumentException("Unable to create instance 
for log/message impl: " + implClassName, e);
-            }
-         }
-      });
-   }
-
-}
diff --git a/artemis-log-processor/pom.xml b/artemis-log-processor/pom.xml
index e4ecc946de..f43f71de09 100644
--- a/artemis-log-processor/pom.xml
+++ b/artemis-log-processor/pom.xml
@@ -33,11 +33,6 @@
    </properties>
 
    <dependencies>
-      <dependency>
-         <groupId>org.apache.activemq</groupId>
-         <artifactId>artemis-log-facade</artifactId>
-         <version>${project.version}</version>
-      </dependency>
       <dependency>
          <groupId>org.apache.activemq</groupId>
          <artifactId>artemis-unit-test-support</artifactId>
diff --git 
a/artemis-log-processor/src/test/java/org/apache/activemq/artemis/logprocessor/SimpleBundle.java
 
b/artemis-log-processor/src/test/java/org/apache/activemq/artemis/logprocessor/SimpleBundle.java
index 7f18d3512f..185ec455f4 100644
--- 
a/artemis-log-processor/src/test/java/org/apache/activemq/artemis/logprocessor/SimpleBundle.java
+++ 
b/artemis-log-processor/src/test/java/org/apache/activemq/artemis/logprocessor/SimpleBundle.java
@@ -24,11 +24,22 @@ import 
org.apache.activemq.artemis.logprocessor.annotation.LogBundle;
 import org.apache.activemq.artemis.logprocessor.annotation.LogMessage;
 import org.apache.activemq.artemis.logprocessor.annotation.Message;
 import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 @LogBundle(projectCode = "TST", enforceExceptionParameterAsLast = false)
 public interface SimpleBundle {
 
-   SimpleBundle MESSAGES = CodeFactory.getCodeClass(SimpleBundle.class);
+   static SimpleBundle init() {
+      try {
+         Logger logger = LoggerFactory.getLogger(SimpleBundle.class.getName());
+         return (SimpleBundle) Class.forName(SimpleBundle.class.getName() + 
"_impl").getConstructor(Logger.class).newInstance(logger);
+      } catch (Exception e) {
+         LoggerFactory.getLogger(SimpleBundle.class).error(e.getMessage(), e);
+      }
+      return null;
+   }
+
+   SimpleBundle MESSAGES = init();
 
    @Message(id = 1, value = "Test")
    String simpleTest();
diff --git a/artemis-protocols/artemis-amqp-protocol/pom.xml 
b/artemis-protocols/artemis-amqp-protocol/pom.xml
index 4f36889b6d..44a0fc3ec2 100644
--- a/artemis-protocols/artemis-amqp-protocol/pom.xml
+++ b/artemis-protocols/artemis-amqp-protocol/pom.xml
@@ -56,11 +56,6 @@
          <!-- Superfluous, except for osgi manifest handling -->
          <optional>true</optional>
       </dependency>
-      <dependency>
-         <groupId>org.apache.activemq</groupId>
-         <artifactId>artemis-log-facade</artifactId>
-         <version>${project.version}</version>
-      </dependency>
       <dependency>
          <groupId>org.slf4j</groupId>
          <artifactId>slf4j-api</artifactId>
diff --git 
a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/logger/ActiveMQAMQPProtocolLogger.java
 
b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/logger/ActiveMQAMQPProtocolLogger.java
index bed138c7a8..2693bc9de8 100644
--- 
a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/logger/ActiveMQAMQPProtocolLogger.java
+++ 
b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/logger/ActiveMQAMQPProtocolLogger.java
@@ -16,9 +16,9 @@
  */
 package org.apache.activemq.artemis.protocol.amqp.logger;
 
-import org.apache.activemq.artemis.logprocessor.CodeFactory;
 import org.apache.activemq.artemis.logprocessor.annotation.LogBundle;
 import org.apache.activemq.artemis.logprocessor.annotation.LogMessage;
+import org.apache.activemq.artemis.logs.BundleFactory;
 
 /**
  * Logger Code 11
@@ -38,7 +38,7 @@ import 
org.apache.activemq.artemis.logprocessor.annotation.LogMessage;
 @LogBundle(projectCode = "AMQ")
 public interface ActiveMQAMQPProtocolLogger {
 
-   ActiveMQAMQPProtocolLogger LOGGER = 
CodeFactory.getCodeClass(ActiveMQAMQPProtocolLogger.class, 
ActiveMQAMQPProtocolLogger.class.getPackage().getName());
+   ActiveMQAMQPProtocolLogger LOGGER = 
BundleFactory.newBundle(ActiveMQAMQPProtocolLogger.class, 
ActiveMQAMQPProtocolLogger.class.getPackage().getName());
 
    @LogMessage(id = 111000, value = "Scheduled task can't be removed from 
scheduledPool.", level = LogMessage.Level.WARN)
    void cantRemovingScheduledTask();
diff --git 
a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/logger/ActiveMQAMQPProtocolMessageBundle.java
 
b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/logger/ActiveMQAMQPProtocolMessageBundle.java
index d482f46b8a..e4a3a414c3 100644
--- 
a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/logger/ActiveMQAMQPProtocolMessageBundle.java
+++ 
b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/logger/ActiveMQAMQPProtocolMessageBundle.java
@@ -16,9 +16,9 @@
  */
 package org.apache.activemq.artemis.protocol.amqp.logger;
 
-import org.apache.activemq.artemis.logprocessor.CodeFactory;
 import org.apache.activemq.artemis.logprocessor.annotation.LogBundle;
 import org.apache.activemq.artemis.logprocessor.annotation.Message;
+import org.apache.activemq.artemis.logs.BundleFactory;
 import 
org.apache.activemq.artemis.protocol.amqp.exceptions.ActiveMQAMQPIllegalStateException;
 import 
org.apache.activemq.artemis.protocol.amqp.exceptions.ActiveMQAMQPInternalErrorException;
 import 
org.apache.activemq.artemis.protocol.amqp.exceptions.ActiveMQAMQPInvalidFieldException;
@@ -37,7 +37,7 @@ import 
org.apache.activemq.artemis.protocol.amqp.exceptions.ActiveMQAMQPSecurity
 @LogBundle(projectCode = "AMQ")
 public interface ActiveMQAMQPProtocolMessageBundle {
 
-   ActiveMQAMQPProtocolMessageBundle BUNDLE = 
CodeFactory.getCodeClass(ActiveMQAMQPProtocolMessageBundle.class);
+   ActiveMQAMQPProtocolMessageBundle BUNDLE = 
BundleFactory.newBundle(ActiveMQAMQPProtocolMessageBundle.class);
 
    @Message(id = 119000, value = "target address not set")
    ActiveMQAMQPInvalidFieldException targetAddressNotSet();
diff --git 
a/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTLogger.java
 
b/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTLogger.java
index 655dc2b1ed..c3a7bc9c4e 100644
--- 
a/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTLogger.java
+++ 
b/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTLogger.java
@@ -18,9 +18,10 @@
 package org.apache.activemq.artemis.core.protocol.mqtt;
 
 import org.apache.activemq.artemis.core.server.MessageReference;
-import org.apache.activemq.artemis.logprocessor.CodeFactory;
 import org.apache.activemq.artemis.logprocessor.annotation.LogBundle;
 import org.apache.activemq.artemis.logprocessor.annotation.LogMessage;
+import org.apache.activemq.artemis.logs.BundleFactory;
+
 /**
  * Logger Code 83
  *
@@ -39,7 +40,7 @@ import 
org.apache.activemq.artemis.logprocessor.annotation.LogMessage;
 @LogBundle(projectCode = "AMQ")
 public interface MQTTLogger {
 
-   MQTTLogger LOGGER = CodeFactory.getCodeClass(MQTTLogger.class, 
MQTTLogger.class.getPackage().getName());
+   MQTTLogger LOGGER = BundleFactory.newBundle(MQTTLogger.class, 
MQTTLogger.class.getPackage().getName());
 
    @LogMessage(id = 832000, value = "Unable to send message: {}", level = 
LogMessage.Level.WARN)
    void unableToSendMessage(MessageReference message, Exception e);
diff --git 
a/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/ActiveMQStompProtocolLogger.java
 
b/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/ActiveMQStompProtocolLogger.java
index cd2ca5f4a6..0f6124238a 100644
--- 
a/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/ActiveMQStompProtocolLogger.java
+++ 
b/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/ActiveMQStompProtocolLogger.java
@@ -16,9 +16,9 @@
  */
 package org.apache.activemq.artemis.core.protocol.stomp;
 
-import org.apache.activemq.artemis.logprocessor.CodeFactory;
 import org.apache.activemq.artemis.logprocessor.annotation.LogBundle;
 import org.apache.activemq.artemis.logprocessor.annotation.LogMessage;
+import org.apache.activemq.artemis.logs.BundleFactory;
 
 /**
  * Logger Code 33
@@ -38,7 +38,7 @@ import 
org.apache.activemq.artemis.logprocessor.annotation.LogMessage;
 @LogBundle(projectCode = "AMQ")
 public interface ActiveMQStompProtocolLogger {
 
-   ActiveMQStompProtocolLogger LOGGER = 
CodeFactory.getCodeClass(ActiveMQStompProtocolLogger.class, 
ActiveMQStompProtocolLogger.class.getPackage().getName());
+   ActiveMQStompProtocolLogger LOGGER = 
BundleFactory.newBundle(ActiveMQStompProtocolLogger.class, 
ActiveMQStompProtocolLogger.class.getPackage().getName());
 
    @LogMessage(id = 332068, value = "connection closed {}", level = 
LogMessage.Level.WARN)
    void connectionClosed(StompConnection connection);
diff --git 
a/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/ActiveMQStompProtocolMessageBundle.java
 
b/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/ActiveMQStompProtocolMessageBundle.java
index ebd82bb85a..9564d7b024 100644
--- 
a/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/ActiveMQStompProtocolMessageBundle.java
+++ 
b/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/ActiveMQStompProtocolMessageBundle.java
@@ -16,9 +16,9 @@
  */
 package org.apache.activemq.artemis.core.protocol.stomp;
 
-import org.apache.activemq.artemis.logprocessor.CodeFactory;
 import org.apache.activemq.artemis.logprocessor.annotation.LogBundle;
 import org.apache.activemq.artemis.logprocessor.annotation.Message;
+import org.apache.activemq.artemis.logs.BundleFactory;
 
 /**
  * Logger Code 33
@@ -33,7 +33,7 @@ import 
org.apache.activemq.artemis.logprocessor.annotation.Message;
 @LogBundle(projectCode = "AMQ")
 public interface ActiveMQStompProtocolMessageBundle {
 
-   ActiveMQStompProtocolMessageBundle BUNDLE = 
CodeFactory.getCodeClass(ActiveMQStompProtocolMessageBundle.class);
+   ActiveMQStompProtocolMessageBundle BUNDLE = 
BundleFactory.newBundle(ActiveMQStompProtocolMessageBundle.class);
 
    @Message(id = 339000, value = "Stomp Connection TTL cannot be negative: {}")
    IllegalStateException negativeConnectionTTL(Long ttl);
diff --git 
a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRABundle.java 
b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRABundle.java
index 3543863ab7..1ee2dde9c1 100644
--- 
a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRABundle.java
+++ 
b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRABundle.java
@@ -21,9 +21,9 @@ import javax.jms.JMSRuntimeException;
 import javax.resource.NotSupportedException;
 
 import org.apache.activemq.artemis.api.core.ActiveMQIllegalStateException;
-import org.apache.activemq.artemis.logprocessor.CodeFactory;
 import org.apache.activemq.artemis.logprocessor.annotation.LogBundle;
 import org.apache.activemq.artemis.logprocessor.annotation.Message;
+import org.apache.activemq.artemis.logs.BundleFactory;
 
 /**
  * Logger Code 15
@@ -36,7 +36,7 @@ public interface ActiveMQRABundle {
     */
    String ISE = "This method is not applicable inside the application server. 
See the JEE spec, e.g. JEE 7 Section 6.7";
 
-   ActiveMQRABundle BUNDLE = CodeFactory.getCodeClass(ActiveMQRABundle.class);
+   ActiveMQRABundle BUNDLE = BundleFactory.newBundle(ActiveMQRABundle.class);
 
    @Message(id = 159000, value = "Error decoding password using codec 
instance")
    ActiveMQIllegalStateException errorDecodingPassword(Exception e);
diff --git 
a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRALogger.java 
b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRALogger.java
index f69db0e17c..4ed254e2d6 100644
--- 
a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRALogger.java
+++ 
b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRALogger.java
@@ -16,10 +16,10 @@
  */
 package org.apache.activemq.artemis.ra;
 
-import org.apache.activemq.artemis.logprocessor.CodeFactory;
 import org.apache.activemq.artemis.logprocessor.annotation.LogBundle;
 import org.apache.activemq.artemis.logprocessor.annotation.LogMessage;
 import org.apache.activemq.artemis.logprocessor.annotation.Message;
+import org.apache.activemq.artemis.logs.BundleFactory;
 import org.apache.activemq.artemis.ra.inflow.ActiveMQActivationSpec;
 
 import javax.jms.IllegalStateException;
@@ -35,7 +35,7 @@ public interface ActiveMQRALogger {
     * like the other loggers, this is because some Application Servers use 
introspection to identify properties which can
     * sometimes use a classloader when the rar is uploaded and its possible 
getpackage() can return null
     */
-   ActiveMQRALogger LOGGER = CodeFactory.getCodeClass(ActiveMQRALogger.class, 
ActiveMQRALogger.class.getName());
+   ActiveMQRALogger LOGGER = BundleFactory.newBundle(ActiveMQRALogger.class, 
ActiveMQRALogger.class.getName());
 
    @LogMessage(id = 151000, value = "awaiting topic/queue creation {}", level 
= LogMessage.Level.INFO)
    void awaitingTopicQueueCreation(String destination);
diff --git 
a/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/ActiveMQRestLogger.java
 
b/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/ActiveMQRestLogger.java
index 1fb688e0b6..dfc0a83cdd 100644
--- 
a/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/ActiveMQRestLogger.java
+++ 
b/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/ActiveMQRestLogger.java
@@ -17,7 +17,7 @@
 package org.apache.activemq.artemis.rest;
 
 import org.apache.activemq.artemis.api.core.ActiveMQException;
-import org.apache.activemq.artemis.logprocessor.CodeFactory;
+import org.apache.activemq.artemis.logs.BundleFactory;
 import org.apache.activemq.artemis.rest.queue.push.xml.XmlLink;
 import org.apache.activemq.artemis.logprocessor.annotation.LogBundle;
 import org.apache.activemq.artemis.logprocessor.annotation.LogMessage;
@@ -29,7 +29,7 @@ import 
org.apache.activemq.artemis.logprocessor.annotation.LogMessage;
 @LogBundle(projectCode = "AMQ")
 public interface ActiveMQRestLogger {
 
-   ActiveMQRestLogger LOGGER = 
CodeFactory.getCodeClass(ActiveMQRestLogger.class, 
ActiveMQRestLogger.class.getPackage().getName());
+   ActiveMQRestLogger LOGGER = 
BundleFactory.newBundle(ActiveMQRestLogger.class, 
ActiveMQRestLogger.class.getPackage().getName());
 
    @LogMessage(id = 181000, value = "Loading REST push store from: {}", level 
= LogMessage.Level.INFO)
    void loadingRestStore(String path);
diff --git 
a/artemis-server-osgi/src/main/java/org/apache/activemq/artemis/osgi/ActiveMQOsgiLogger.java
 
b/artemis-server-osgi/src/main/java/org/apache/activemq/artemis/osgi/ActiveMQOsgiLogger.java
index 68abac3ccf..951a3fbd99 100644
--- 
a/artemis-server-osgi/src/main/java/org/apache/activemq/artemis/osgi/ActiveMQOsgiLogger.java
+++ 
b/artemis-server-osgi/src/main/java/org/apache/activemq/artemis/osgi/ActiveMQOsgiLogger.java
@@ -16,9 +16,9 @@
  */
 package org.apache.activemq.artemis.osgi;
 
-import org.apache.activemq.artemis.logprocessor.CodeFactory;
 import org.apache.activemq.artemis.logprocessor.annotation.LogBundle;
 import org.apache.activemq.artemis.logprocessor.annotation.LogMessage;
+import org.apache.activemq.artemis.logs.BundleFactory;
 
 /**
  * Logger code 58
@@ -29,7 +29,7 @@ import 
org.apache.activemq.artemis.logprocessor.annotation.LogMessage;
 @LogBundle(projectCode = "AMQ")
 public interface ActiveMQOsgiLogger {
 
-   ActiveMQOsgiLogger LOGGER = 
CodeFactory.getCodeClass(ActiveMQOsgiLogger.class, 
ActiveMQOsgiLogger.class.getPackage().getName());
+   ActiveMQOsgiLogger LOGGER = 
BundleFactory.newBundle(ActiveMQOsgiLogger.class, 
ActiveMQOsgiLogger.class.getPackage().getName());
 
    @LogMessage(id = 581000, value = "Broker config {} found. Tracking 
protocols {}", level = LogMessage.Level.INFO)
    void brokerConfigFound(String name, String protocols);
diff --git 
a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQMessageBundle.java
 
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQMessageBundle.java
index 61c85960d8..46d3f7bcc4 100644
--- 
a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQMessageBundle.java
+++ 
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQMessageBundle.java
@@ -54,9 +54,9 @@ import org.apache.activemq.artemis.core.io.SequentialFile;
 import org.apache.activemq.artemis.core.postoffice.Binding;
 import 
org.apache.activemq.artemis.core.protocol.core.impl.wireformat.ReplicationSyncFileMessage;
 import org.apache.activemq.artemis.core.security.CheckType;
-import org.apache.activemq.artemis.logprocessor.CodeFactory;
 import org.apache.activemq.artemis.logprocessor.annotation.LogBundle;
 import org.apache.activemq.artemis.logprocessor.annotation.Message;
+import org.apache.activemq.artemis.logs.BundleFactory;
 
 /**
  * Logger Code 22
@@ -70,7 +70,7 @@ import 
org.apache.activemq.artemis.logprocessor.annotation.Message;
 @LogBundle(projectCode = "AMQ")
 public interface ActiveMQMessageBundle {
 
-   ActiveMQMessageBundle BUNDLE = 
CodeFactory.getCodeClass(ActiveMQMessageBundle.class);
+   ActiveMQMessageBundle BUNDLE = 
BundleFactory.newBundle(ActiveMQMessageBundle.class);
 
    @Message(id = 229000, value = "Activation for server {}")
    String activationForServer(ActiveMQServer server);
diff --git 
a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServerLogger.java
 
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServerLogger.java
index 4fedb7b9d2..2edfb66ed9 100644
--- 
a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServerLogger.java
+++ 
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServerLogger.java
@@ -48,9 +48,9 @@ import 
org.apache.activemq.artemis.core.server.cluster.qourum.ServerConnectVote;
 import org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl;
 import org.apache.activemq.artemis.core.server.impl.ServerSessionImpl;
 import org.apache.activemq.artemis.core.server.management.Notification;
-import org.apache.activemq.artemis.logprocessor.CodeFactory;
 import org.apache.activemq.artemis.logprocessor.annotation.LogBundle;
 import org.apache.activemq.artemis.logprocessor.annotation.LogMessage;
+import org.apache.activemq.artemis.logs.BundleFactory;
 import org.apache.activemq.artemis.spi.core.remoting.Connection;
 import org.w3c.dom.Node;
 
@@ -72,7 +72,7 @@ import org.w3c.dom.Node;
 @LogBundle(projectCode = "AMQ")
 public interface ActiveMQServerLogger {
 
-   ActiveMQServerLogger LOGGER = 
CodeFactory.getCodeClass(ActiveMQServerLogger.class, 
ActiveMQServerLogger.class.getPackage().getName());
+   ActiveMQServerLogger LOGGER = 
BundleFactory.newBundle(ActiveMQServerLogger.class, 
ActiveMQServerLogger.class.getPackage().getName());
 
    @LogMessage(id = 223000, value = "Received Interrupt Exception whilst 
waiting for component to shutdown: {}", level = LogMessage.Level.DEBUG)
    void interruptWhilstStoppingComponent(String componentClassName);
diff --git 
a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/plugin/impl/LoggingActiveMQServerPluginLogger.java
 
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/plugin/impl/LoggingActiveMQServerPluginLogger.java
index e54b76aab4..70e50ecf17 100644
--- 
a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/plugin/impl/LoggingActiveMQServerPluginLogger.java
+++ 
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/plugin/impl/LoggingActiveMQServerPluginLogger.java
@@ -31,9 +31,9 @@ import org.apache.activemq.artemis.core.server.ServerSession;
 import org.apache.activemq.artemis.core.server.cluster.Bridge;
 import org.apache.activemq.artemis.core.server.impl.AckReason;
 import org.apache.activemq.artemis.core.transaction.Transaction;
-import org.apache.activemq.artemis.logprocessor.CodeFactory;
 import org.apache.activemq.artemis.logprocessor.annotation.LogBundle;
 import org.apache.activemq.artemis.logprocessor.annotation.LogMessage;
+import org.apache.activemq.artemis.logs.BundleFactory;
 import org.apache.activemq.artemis.spi.core.protocol.RemotingConnection;
 import org.apache.activemq.artemis.utils.critical.CriticalComponent;
 
@@ -46,7 +46,7 @@ public interface LoggingActiveMQServerPluginLogger {
    /**
     * The LoggingPlugin logger.
     */
-   LoggingActiveMQServerPluginLogger LOGGER = 
CodeFactory.getCodeClass(LoggingActiveMQServerPluginLogger.class, 
LoggingActiveMQServerPluginLogger.class.getPackage().getName());
+   LoggingActiveMQServerPluginLogger LOGGER = 
BundleFactory.newBundle(LoggingActiveMQServerPluginLogger.class, 
LoggingActiveMQServerPluginLogger.class.getPackage().getName());
 
    @LogMessage(id = 841000, value = "created connection: {}", level = 
LogMessage.Level.INFO)
    void afterCreateConnection(RemotingConnection connection);
diff --git 
a/artemis-service-extensions/src/main/java/org/apache/activemq/artemis/service/extensions/ActiveMQServiceExtensionLogger.java
 
b/artemis-service-extensions/src/main/java/org/apache/activemq/artemis/service/extensions/ActiveMQServiceExtensionLogger.java
index ac06baf1f7..92d1a38aee 100644
--- 
a/artemis-service-extensions/src/main/java/org/apache/activemq/artemis/service/extensions/ActiveMQServiceExtensionLogger.java
+++ 
b/artemis-service-extensions/src/main/java/org/apache/activemq/artemis/service/extensions/ActiveMQServiceExtensionLogger.java
@@ -17,9 +17,9 @@
 
 package org.apache.activemq.artemis.service.extensions;
 
-import org.apache.activemq.artemis.logprocessor.CodeFactory;
 import org.apache.activemq.artemis.logprocessor.annotation.LogBundle;
 import org.apache.activemq.artemis.logprocessor.annotation.LogMessage;
+import org.apache.activemq.artemis.logs.BundleFactory;
 
 /**
  * Logger Code 35
@@ -31,7 +31,7 @@ public interface ActiveMQServiceExtensionLogger {
    /**
     * The default logger.
     */
-   ActiveMQServiceExtensionLogger LOGGER = 
CodeFactory.getCodeClass(ActiveMQServiceExtensionLogger.class, 
ActiveMQServiceExtensionLogger.class.getPackage().getName());
+   ActiveMQServiceExtensionLogger LOGGER = 
BundleFactory.newBundle(ActiveMQServiceExtensionLogger.class, 
ActiveMQServiceExtensionLogger.class.getPackage().getName());
 
    @LogMessage(id = 352000, value = "Attempted to locate a Transaction Manager 
but none found.", level = LogMessage.Level.WARN)
    void transactionManagerNotFound();
diff --git 
a/artemis-service-extensions/src/main/java/org/apache/activemq/artemis/service/extensions/xa/recovery/ActiveMQXARecoveryLogger.java
 
b/artemis-service-extensions/src/main/java/org/apache/activemq/artemis/service/extensions/xa/recovery/ActiveMQXARecoveryLogger.java
index 05198c83ce..7c10576bcc 100644
--- 
a/artemis-service-extensions/src/main/java/org/apache/activemq/artemis/service/extensions/xa/recovery/ActiveMQXARecoveryLogger.java
+++ 
b/artemis-service-extensions/src/main/java/org/apache/activemq/artemis/service/extensions/xa/recovery/ActiveMQXARecoveryLogger.java
@@ -17,9 +17,9 @@
 package org.apache.activemq.artemis.service.extensions.xa.recovery;
 
 import org.apache.activemq.artemis.api.core.client.ClientSessionFactory;
-import org.apache.activemq.artemis.logprocessor.CodeFactory;
 import org.apache.activemq.artemis.logprocessor.annotation.LogBundle;
 import org.apache.activemq.artemis.logprocessor.annotation.LogMessage;
+import org.apache.activemq.artemis.logs.BundleFactory;
 import org.w3c.dom.Node;
 
 /**
@@ -28,7 +28,7 @@ import org.w3c.dom.Node;
 @LogBundle(projectCode = "AMQ")
 public interface ActiveMQXARecoveryLogger {
 
-   ActiveMQXARecoveryLogger LOGGER = 
CodeFactory.getCodeClass(ActiveMQXARecoveryLogger.class, 
ActiveMQXARecoveryLogger.class.getPackage().getName());
+   ActiveMQXARecoveryLogger LOGGER = 
BundleFactory.newBundle(ActiveMQXARecoveryLogger.class, 
ActiveMQXARecoveryLogger.class.getPackage().getName());
 
    @LogMessage(id = 171003, value = "JMS Server Manager Running cached command 
for {}", level = LogMessage.Level.INFO)
    void serverRunningCachedCommand(Runnable run);
diff --git 
a/artemis-web/src/main/java/org/apache/activemq/artemis/ActiveMQWebLogger.java 
b/artemis-web/src/main/java/org/apache/activemq/artemis/ActiveMQWebLogger.java
index d6ddd9f41c..7fbac2ffea 100644
--- 
a/artemis-web/src/main/java/org/apache/activemq/artemis/ActiveMQWebLogger.java
+++ 
b/artemis-web/src/main/java/org/apache/activemq/artemis/ActiveMQWebLogger.java
@@ -16,9 +16,9 @@
  */
 package org.apache.activemq.artemis;
 
-import org.apache.activemq.artemis.logprocessor.CodeFactory;
 import org.apache.activemq.artemis.logprocessor.annotation.LogBundle;
 import org.apache.activemq.artemis.logprocessor.annotation.LogMessage;
+import org.apache.activemq.artemis.logs.BundleFactory;
 
 import java.io.File;
 
@@ -29,7 +29,7 @@ import java.io.File;
 @LogBundle(projectCode = "AMQ")
 public interface ActiveMQWebLogger  {
 
-   ActiveMQWebLogger LOGGER = 
CodeFactory.getCodeClass(ActiveMQWebLogger.class, 
ActiveMQWebLogger.class.getPackage().getName());
+   ActiveMQWebLogger LOGGER = BundleFactory.newBundle(ActiveMQWebLogger.class, 
ActiveMQWebLogger.class.getPackage().getName());
 
    @LogMessage(id = 241001, value = "HTTP Server started at {}", level = 
LogMessage.Level.INFO)
    void webserverStarted(String bind);
diff --git a/pom.xml b/pom.xml
index 332374ce7f..f6b2340640 100644
--- a/pom.xml
+++ b/pom.xml
@@ -30,7 +30,6 @@
    </parent>
 
    <modules>
-      <module>artemis-log-facade</module>
       <module>artemis-log-processor</module>
       <module>artemis-protocols</module>
       <module>artemis-dto</module>

Reply via email to