You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cl...@apache.org on 2022/07/21 20:58:52 UTC

[activemq-artemis] 30/33: ensure exceptions/causes are the last arg passed, as the logging framework expects, and processor now enforces

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

commit e9b367fbe1851d76dcb0f7ff06288cb151167162
Author: Robbie Gemmell <ro...@apache.org>
AuthorDate: Thu Jul 21 16:27:41 2022 +0100

    ensure exceptions/causes are the last arg passed, as the logging framework expects, and processor now enforces
---
 .../artemis/core/server/NetworkHealthCheck.java    | 14 ++--
 .../activemq/artemis/logs/ActiveMQUtilBundle.java  |  2 +-
 .../activemq/artemis/logs/ActiveMQUtilLogger.java  | 14 ++--
 .../artemis/utils/PasswordMaskingUtil.java         |  2 +-
 .../api/core/UDPBroadcastEndpointFactory.java      |  2 +-
 .../artemis/core/client/ActiveMQClientLogger.java  | 10 +--
 .../core/protocol/core/impl/ChannelImpl.java       |  2 +-
 .../jms/client/ActiveMQJMSClientBundle.java        |  2 +-
 .../artemis/jms/client/ActiveMQSession.java        |  2 +-
 .../jms/bridge/ActiveMQJMSBridgeLogger.java        |  8 +-
 .../artemis/jms/bridge/impl/JMSBridgeImpl.java     | 16 ++--
 .../jms/server/ActiveMQJMSServerLogger.java        |  6 +-
 .../jms/server/impl/JMSServerManagerImpl.java      |  4 +-
 .../activemq/artemis/core/io/DummyCallback.java    |  2 +-
 .../core/journal/impl/JournalFilesRepository.java  |  2 +-
 .../artemis/core/journal/impl/JournalImpl.java     |  2 +-
 .../artemis/journal/ActiveMQJournalLogger.java     |  8 +-
 .../protocol/amqp/broker/AMQPLargeMessage.java     |  2 +-
 .../stomp/ActiveMQStompProtocolLogger.java         |  2 +-
 .../core/protocol/stomp/StompProtocolManager.java  |  2 +-
 .../activemq/artemis/ra/ActiveMQRALogger.java      |  4 +-
 .../artemis/ra/inflow/ActiveMQActivation.java      |  4 +-
 .../activemq/artemis/rest/ActiveMQRestLogger.java  |  2 +-
 .../artemis/rest/queue/push/FilePushStore.java     |  2 +-
 .../activemq/artemis/osgi/ActiveMQOsgiLogger.java  |  4 +-
 .../activemq/artemis/osgi/DataSourceTracker.java   |  4 +-
 .../activemq/artemis/osgi/ProtocolTracker.java     |  6 +-
 .../artemis/core/filter/impl/FilterImpl.java       |  2 +-
 .../paging/cursor/impl/PageCursorProviderImpl.java |  6 +-
 .../core/paging/impl/PageTransactionInfoImpl.java  |  2 +-
 .../journal/AbstractJournalStorageManager.java     |  4 +-
 .../impl/journal/JournalStorageManager.java        |  4 +-
 .../impl/journal/LargeServerMessageImpl.java       |  2 +-
 .../TXLargeMessageConfirmationOperation.java       |  2 +-
 .../core/postoffice/impl/PostOfficeImpl.java       |  2 +-
 .../core/remoting/impl/invm/InVMConnection.java    |  2 +-
 .../remoting/server/impl/RemotingServiceImpl.java  |  2 +-
 .../core/replication/ReplicationEndpoint.java      |  6 +-
 .../artemis/core/server/ActiveMQMessageBundle.java |  4 +-
 .../artemis/core/server/ActiveMQServerLogger.java  | 96 +++++++++++-----------
 .../core/server/cluster/ClusterManager.java        |  8 +-
 .../core/server/cluster/impl/BridgeImpl.java       | 12 +--
 .../federation/AbstractFederationStream.java       |  4 +-
 .../core/server/federation/FederatedAbstract.java  |  8 +-
 .../federation/FederatedQueueConsumerImpl.java     |  6 +-
 .../federation/address/FederatedAddress.java       | 10 +--
 .../server/federation/queue/FederatedQueue.java    |  2 +-
 .../server/group/impl/LocalGroupingHandler.java    |  8 +-
 .../core/server/impl/ActiveMQServerImpl.java       | 16 ++--
 .../core/server/impl/ConnectorsService.java        |  4 +-
 .../core/server/impl/FileBasedNodeManager.java     |  4 +-
 .../core/server/impl/PostOfficeJournalLoader.java  |  2 +-
 .../artemis/core/server/impl/QueueImpl.java        |  8 +-
 .../artemis/core/server/impl/QueueManagerImpl.java |  4 +-
 .../server/impl/ReplicationBackupActivation.java   |  2 +-
 .../server/impl/ReplicationPrimaryActivation.java  |  2 +-
 .../core/server/impl/ServerConsumerImpl.java       |  6 +-
 .../core/server/impl/ServerSessionImpl.java        |  2 +-
 .../core/server/impl/ServiceRegistryImpl.java      |  2 +-
 .../server/impl/SharedNothingBackupActivation.java |  2 +-
 .../server/impl/SharedNothingLiveActivation.java   |  2 +-
 .../server/impl/TransientQueueManagerImpl.java     |  2 +-
 .../management/impl/ManagementServiceImpl.java     |  4 +-
 .../core/transaction/impl/ResourceManagerImpl.java |  4 +-
 .../security/ActiveMQBasicSecurityManager.java     |  2 +-
 .../core/security/jaas/ReloadableProperties.java   |  2 +-
 .../xa/recovery/ActiveMQXARecoveryLogger.java      |  8 +-
 .../xa/recovery/ActiveMQXAResourceWrapper.java     |  4 +-
 68 files changed, 202 insertions(+), 202 deletions(-)

diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/core/server/NetworkHealthCheck.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/core/server/NetworkHealthCheck.java
index 5916eb9b96..9e3a0ef28b 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/core/server/NetworkHealthCheck.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/core/server/NetworkHealthCheck.java
@@ -88,7 +88,7 @@ public class NetworkHealthCheck extends ActiveMQScheduledComponent {
             netToUse = null;
          }
       } catch (Exception e) {
-         ActiveMQUtilLogger.LOGGER.failedToSetNIC(e, nicName);
+         ActiveMQUtilLogger.LOGGER.failedToSetNIC(nicName, e);
          netToUse = null;
       }
 
@@ -131,7 +131,7 @@ public class NetworkHealthCheck extends ActiveMQScheduledComponent {
                   String strAddress = address.trim();
                   this.addAddress(strAddress);
                } catch (Exception e) {
-                  ActiveMQUtilLogger.LOGGER.failedToParseAddressList(e, addressList);
+                  ActiveMQUtilLogger.LOGGER.failedToParseAddressList(addressList, e);
                }
             }
          }
@@ -149,7 +149,7 @@ public class NetworkHealthCheck extends ActiveMQScheduledComponent {
                try {
                   this.addURL(new URL(address.trim()));
                } catch (Exception e) {
-                  ActiveMQUtilLogger.LOGGER.failedToParseUrlList(e, addressList);
+                  ActiveMQUtilLogger.LOGGER.failedToParseUrlList(addressList, e);
                }
             }
          }
@@ -289,7 +289,7 @@ public class NetworkHealthCheck extends ActiveMQScheduledComponent {
                   ActiveMQUtilLogger.LOGGER.startingService(component.toString());
                   component.start();
                } catch (Exception e) {
-                  ActiveMQUtilLogger.LOGGER.errorStartingComponent(e, component.toString());
+                  ActiveMQUtilLogger.LOGGER.errorStartingComponent(component.toString(), e);
                }
             }
             ownShutdown = false;
@@ -302,7 +302,7 @@ public class NetworkHealthCheck extends ActiveMQScheduledComponent {
                   ActiveMQUtilLogger.LOGGER.stoppingService(component.toString());
                   component.stop();
                } catch (Exception e) {
-                  ActiveMQUtilLogger.LOGGER.errorStoppingComponent(e, component.toString());
+                  ActiveMQUtilLogger.LOGGER.errorStoppingComponent(component.toString(), e);
                }
             }
          }
@@ -351,7 +351,7 @@ public class NetworkHealthCheck extends ActiveMQScheduledComponent {
             return null;
          }
       } catch (Exception e) {
-         ActiveMQUtilLogger.LOGGER.failedToCheckAddress(e, straddress);
+         ActiveMQUtilLogger.LOGGER.failedToCheckAddress(straddress, e);
          return null;
       }
    }
@@ -433,7 +433,7 @@ public class NetworkHealthCheck extends ActiveMQScheduledComponent {
          is.close();
          return true;
       } catch (Exception e) {
-         ActiveMQUtilLogger.LOGGER.failedToCheckURL(e, url.toString());
+         ActiveMQUtilLogger.LOGGER.failedToCheckURL(url.toString(), e);
          return false;
       }
    }
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 bce2df7d1b..a04c138e97 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
@@ -44,7 +44,7 @@ public interface ActiveMQUtilBundle {
    IllegalStateException stringTooLong(Integer length);
 
    @Message(id = 209003, value = "Error instantiating codec {}")
-   IllegalArgumentException errorCreatingCodec(@Cause Exception e, String codecClassName);
+   IllegalArgumentException errorCreatingCodec(String codecClassName, @Cause Exception e);
 
    @Message(id = 209004, value = "Failed to parse long value from {}")
    IllegalArgumentException failedToParseLong(String value);
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 7fa668976f..d31c4f70b7 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
@@ -48,25 +48,25 @@ public interface ActiveMQUtilLogger {
    void urlWasntReacheable(String url);
 
    @LogMessage(id = 202004, value = "Error starting component {} ", level = LogMessage.Level.WARN)
-   void errorStartingComponent(@Cause Exception e, String component);
+   void errorStartingComponent(String component, @Cause Exception e);
 
    @LogMessage(id = 202005, value = "Error stopping component {} ", level = LogMessage.Level.WARN)
-   void errorStoppingComponent(@Cause Exception e, String component);
+   void errorStoppingComponent(String component, @Cause Exception e);
 
    @LogMessage(id = 202006, value = "Failed to check Url {}.", level = LogMessage.Level.WARN)
-   void failedToCheckURL(@Cause Exception e, String url);
+   void failedToCheckURL(String url, @Cause Exception e);
 
    @LogMessage(id = 202007, value = "Failed to check Address {}.", level = LogMessage.Level.WARN)
-   void failedToCheckAddress(@Cause Exception e, String address);
+   void failedToCheckAddress(String address, @Cause Exception e);
 
    @LogMessage(id = 202008, value = "Failed to check Address list {}.", level = LogMessage.Level.WARN)
-   void failedToParseAddressList(@Cause Exception e, String addressList);
+   void failedToParseAddressList(String addressList, @Cause Exception e);
 
    @LogMessage(id = 202009, value = "Failed to check Url list {}.", level = LogMessage.Level.WARN)
-   void failedToParseUrlList(@Cause Exception e, String urlList);
+   void failedToParseUrlList(String urlList, @Cause Exception e);
 
    @LogMessage(id = 202010, value = "Failed to set NIC {}.", level = LogMessage.Level.WARN)
-   void failedToSetNIC(@Cause Exception e, String nic);
+   void failedToSetNIC(String nic, @Cause Exception e);
 
    @LogMessage(id = 202011, value = "Failed to read from stream {}.", level = LogMessage.Level.WARN)
    void failedToReadFromStream(String stream);
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/PasswordMaskingUtil.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/PasswordMaskingUtil.java
index 2287e5303d..5125a575ad 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/PasswordMaskingUtil.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/PasswordMaskingUtil.java
@@ -198,7 +198,7 @@ public final class PasswordMaskingUtil {
                // As a last resort, load the codec class using the current thread's context class loader
                return (SensitiveDataCodec<String>) Thread.currentThread().getContextClassLoader().loadClass(codecClassName).newInstance();
             } catch (Exception e2) {
-               throw ActiveMQUtilBundle.BUNDLE.errorCreatingCodec(e2, codecClassName);
+               throw ActiveMQUtilBundle.BUNDLE.errorCreatingCodec(codecClassName, e2);
             }
          }
       });
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/UDPBroadcastEndpointFactory.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/UDPBroadcastEndpointFactory.java
index c447a8dfc3..08b8c30f30 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/UDPBroadcastEndpointFactory.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/UDPBroadcastEndpointFactory.java
@@ -155,7 +155,7 @@ public final class UDPBroadcastEndpointFactory implements BroadcastEndpointFacto
                continue;
             } catch (IOException e) {
                if (open) {
-                  ActiveMQClientLogger.LOGGER.unableToReceiveBroadcast(e, this.toString());
+                  ActiveMQClientLogger.LOGGER.unableToReceiveBroadcast(this.toString(), e);
                }
             }
             break;
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 2389dabbe9..8f27c585a7 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
@@ -53,7 +53,7 @@ public interface ActiveMQClientLogger {
    void createConnectorException(@Cause Exception e);
 
    @LogMessage(id = 212008, value = "I am closing a core ClientSessionFactory you left open. Please make sure you close all ClientSessionFactories explicitly " + "before letting them go out of scope! {}", level = LogMessage.Level.WARN)
-   void factoryLeftOpen(@Cause Exception e, int i);
+   void factoryLeftOpen(int i, @Cause Exception e);
 
    @LogMessage(id = 212009, value = "resetting session after failure", level = LogMessage.Level.WARN)
    void resettingSessionAfterFailure();
@@ -74,7 +74,7 @@ public interface ActiveMQClientLogger {
    void errorDuringPrepare(@Cause Throwable e);
 
    @LogMessage(id = 212016, value = "I am closing a core ClientSession you left open. Please make sure you close all ClientSessions explicitly before letting them go out of scope! {}", level = LogMessage.Level.WARN)
-   void clientSessionNotClosed(@Cause Exception e, int identity);
+   void clientSessionNotClosed(int identity, @Cause Exception e);
 
    @LogMessage(id = 212017, value = "error adding packet", level = LogMessage.Level.WARN)
    void errorAddingPacket(@Cause Exception e);
@@ -138,7 +138,7 @@ public interface ActiveMQClientLogger {
    void connectionFailureDetected(String remoteAddress, String message, ActiveMQExceptionType type);
 
    @LogMessage(id = 212038, value = "Failure in calling interceptor: {}", level = LogMessage.Level.WARN)
-   void errorCallingInterceptor(@Cause Throwable e, Interceptor interceptor);
+   void errorCallingInterceptor(Interceptor interceptor, @Cause Throwable e);
 
    @LogMessage(id = 212040, value = "Timed out waiting for netty ssl close future to complete", level = LogMessage.Level.WARN)
    void timeoutClosingSSL();
@@ -221,7 +221,7 @@ public interface ActiveMQClientLogger {
    void unableToReceiveClusterTopology(@Cause Throwable e);
 
    @LogMessage(id = 212065, value = "{} getting exception when receiving broadcasting ", level = LogMessage.Level.WARN)
-   void unableToReceiveBroadcast(@Cause Exception e, String target);
+   void unableToReceiveBroadcast(String target, @Cause Exception e);
 
    @LogMessage(id = 212066, value = "failed to parse int property ", level = LogMessage.Level.WARN)
    void unableToParseValue(@Cause Throwable e);
@@ -314,7 +314,7 @@ public interface ActiveMQClientLogger {
    void caughtunexpectedThrowable(@Cause Throwable t);
 
    @LogMessage(id = 214018, value = "Failed to invoke getTextContent() on node {}", level = LogMessage.Level.ERROR)
-   void errorOnXMLTransform(@Cause Throwable t, Node n);
+   void errorOnXMLTransform(Node n, @Cause Throwable t);
 
    @LogMessage(id = 214019, value = "Invalid configuration", level = LogMessage.Level.ERROR)
    void errorOnXMLTransformInvalidConf(@Cause Throwable t);
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ChannelImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ChannelImpl.java
index 02b7ebc093..3edd9beee6 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ChannelImpl.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ChannelImpl.java
@@ -589,7 +589,7 @@ public final class ChannelImpl implements Channel {
                   return interceptor.getClass().getName();
                }
             } catch (final Throwable e) {
-               ActiveMQClientLogger.LOGGER.errorCallingInterceptor(e, interceptor);
+               ActiveMQClientLogger.LOGGER.errorCallingInterceptor(interceptor, e);
             }
          }
       }
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 cb376888d7..9f9a642ba8 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
@@ -46,7 +46,7 @@ public interface ActiveMQJMSClientBundle {
    ActiveMQJMSClientBundle BUNDLE = CodeFactory.getCodeClass(ActiveMQJMSClientBundle.class);
 
    @Message(id = 139000, value = "Invalid filter: {}")
-   ActiveMQInvalidFilterExpressionException invalidFilter(@Cause Throwable e, SimpleString filter);
+   ActiveMQInvalidFilterExpressionException invalidFilter(SimpleString filter, @Cause Throwable e);
 
    @Message(id = 139001, value = "Invalid Subscription Name. It is required to set the subscription name")
    ActiveMQIllegalStateException invalidSubscriptionName();
diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQSession.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQSession.java
index 35d8060574..74c2ccddce 100644
--- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQSession.java
+++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQSession.java
@@ -961,7 +961,7 @@ public class ActiveMQSession implements QueueSession, TopicSession {
             SelectorParser.parse(filterString.trim());
          }
       } catch (FilterException e) {
-         throw JMSExceptionHelper.convertFromActiveMQException(ActiveMQJMSClientBundle.BUNDLE.invalidFilter(e, new SimpleString(filterString)));
+         throw JMSExceptionHelper.convertFromActiveMQException(ActiveMQJMSClientBundle.BUNDLE.invalidFilter(new SimpleString(filterString), e));
       }
 
       ActiveMQDestination activeMQDestination = (ActiveMQDestination) queue;
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 7c87eb7e21..8c75b5d4f9 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
@@ -59,19 +59,19 @@ public interface ActiveMQJMSBridgeLogger {
    void bridgeNotStarted(String bridgeName);
 
    @LogMessage(id = 342006, value = "JMS Bridge {}, detected failure on bridge connection", level = LogMessage.Level.WARN)
-   void bridgeFailure(@Cause Exception e, String bridgeName);
+   void bridgeFailure(String bridgeName, @Cause Exception e);
 
    @LogMessage(id = 342009, value = "JMS Bridge {} failed to send + acknowledge batch, closing JMS objects", level = LogMessage.Level.WARN)
-   void bridgeAckError(@Cause Exception e, String bridgeName);
+   void bridgeAckError(String bridgeName, @Cause Exception e);
 
    @LogMessage(id = 342010, value = "Failed to connect JMS Bridge {}", level = LogMessage.Level.WARN)
-   void bridgeConnectError(@Cause Exception e, String bridgeName);
+   void bridgeConnectError(String bridgeName, @Cause Exception e);
 
    @LogMessage(id = 342011, value = "Transaction rolled back, retrying TX", level = LogMessage.Level.WARN)
    void transactionRolledBack(@Cause Exception e);
 
    @LogMessage(id = 344001, value = "JMS Bridge {}, failed to start source connection", level = LogMessage.Level.ERROR)
-   void jmsBridgeSrcConnectError(@Cause Exception e, String bridgeName);
+   void jmsBridgeSrcConnectError(String bridgeName, @Cause Exception e);
 
    @LogMessage(id = 344002, value = "Failed to start JMS Bridge {}.  QoS Mode: {} requires a Transaction Manager, none found", level = LogMessage.Level.ERROR)
    void jmsBridgeTransactionManagerMissing(String bridgeName, QualityOfServiceMode qosMode);
diff --git a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/impl/JMSBridgeImpl.java b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/impl/JMSBridgeImpl.java
index 403c96b5cd..aff9967368 100644
--- a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/impl/JMSBridgeImpl.java
+++ b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/impl/JMSBridgeImpl.java
@@ -1306,7 +1306,7 @@ public final class JMSBridgeImpl implements JMSBridge {
          // If this fails we should attempt to cleanup or we might end up in some weird state
 
          // Adding a log.warn, so the use may see the cause of the failure and take actions
-         ActiveMQJMSBridgeLogger.LOGGER.bridgeConnectError(e, bridgeName);
+         ActiveMQJMSBridgeLogger.LOGGER.bridgeConnectError(bridgeName, e);
 
          cleanup();
 
@@ -1495,7 +1495,7 @@ public final class JMSBridgeImpl implements JMSBridge {
          }
       } catch (Exception e) {
          if (!stopping) {
-            ActiveMQJMSBridgeLogger.LOGGER.bridgeAckError(e, bridgeName);
+            ActiveMQJMSBridgeLogger.LOGGER.bridgeAckError(bridgeName, e);
          }
 
          // We don't call failure otherwise failover would be broken with ActiveMQ
@@ -1539,7 +1539,7 @@ public final class JMSBridgeImpl implements JMSBridge {
          } catch (Throwable ignored) {
          }
 
-         ActiveMQJMSBridgeLogger.LOGGER.bridgeAckError(e, bridgeName);
+         ActiveMQJMSBridgeLogger.LOGGER.bridgeAckError(bridgeName, e);
 
          //we don't do handle failure here because the tx
          //may be rolledback due to failover. All failure handling
@@ -1555,7 +1555,7 @@ public final class JMSBridgeImpl implements JMSBridge {
             messages.clear();
 
          } catch (Exception e) {
-            ActiveMQJMSBridgeLogger.LOGGER.bridgeAckError(e, bridgeName);
+            ActiveMQJMSBridgeLogger.LOGGER.bridgeAckError(bridgeName, e);
 
             handleFailureOnSend();
          }
@@ -1577,7 +1577,7 @@ public final class JMSBridgeImpl implements JMSBridge {
          }
 
       } catch (Exception e) {
-         ActiveMQJMSBridgeLogger.LOGGER.bridgeAckError(e, bridgeName);
+         ActiveMQJMSBridgeLogger.LOGGER.bridgeAckError(bridgeName, e);
 
          try {
             sourceSession.rollback();
@@ -1846,7 +1846,7 @@ public final class JMSBridgeImpl implements JMSBridge {
          try {
             sourceConn.start();
          } catch (JMSException e) {
-            ActiveMQJMSBridgeLogger.LOGGER.jmsBridgeSrcConnectError(e, bridgeName);
+            ActiveMQJMSBridgeLogger.LOGGER.jmsBridgeSrcConnectError(bridgeName, e);
          }
       }
 
@@ -1932,7 +1932,7 @@ public final class JMSBridgeImpl implements JMSBridge {
             try {
                startSource();
             } catch (JMSException e) {
-               ActiveMQJMSBridgeLogger.LOGGER.jmsBridgeSrcConnectError(e, bridgeName);
+               ActiveMQJMSBridgeLogger.LOGGER.jmsBridgeSrcConnectError(bridgeName, e);
             }
          }
       }
@@ -2019,7 +2019,7 @@ public final class JMSBridgeImpl implements JMSBridge {
          if (stopping) {
             return;
          }
-         ActiveMQJMSBridgeLogger.LOGGER.bridgeFailure(e, bridgeName);
+         ActiveMQJMSBridgeLogger.LOGGER.bridgeFailure(bridgeName, e);
          if (isSource) {
             connectedSource = false;
          } else {
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 5fa7f20bd7..3ceb87dee5 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
@@ -49,7 +49,7 @@ public interface ActiveMQJMSServerLogger {
    void recoveryConnectFailed(String s);
 
    @LogMessage(id = 122011, value = "error unbinding {} from Registry", level = LogMessage.Level.WARN)
-   void bindingsUnbindError(@Cause Exception e, String key);
+   void bindingsUnbindError(String key, @Cause Exception e);
 
    @LogMessage(id = 122012, value = "JMS Server Manager error", level = LogMessage.Level.WARN)
    void jmsServerError(@Cause Exception e);
@@ -59,14 +59,14 @@ public interface ActiveMQJMSServerLogger {
 
    @LogMessage(id = 122014, value = "Notified of connection failure in xa recovery connectionFactory for provider {} will attempt reconnect on next pass",
       level = LogMessage.Level.WARN)
-   void xaRecoverConnectionError(@Cause Exception e, ClientSessionFactory csf);
+   void xaRecoverConnectionError(ClientSessionFactory csf, @Cause Exception e);
 
    @LogMessage(id = 122016, value = "Error in XA Recovery", level = LogMessage.Level.DEBUG)
    void xaRecoveryError(@Cause Exception e);
 
    @LogMessage(id = 122017, value = "Tried to correct invalid \"host\" value \"0.0.0.0\" for \"{}\" connector, but received an exception.",
       level = LogMessage.Level.WARN)
-   void failedToCorrectHost(@Cause Exception e, String name);
+   void failedToCorrectHost(String name, @Cause Exception e);
 
    @LogMessage(id = 122018,
       value = "Failed to send notification: {}",
diff --git a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/impl/JMSServerManagerImpl.java b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/impl/JMSServerManagerImpl.java
index 160817824f..e256237f1a 100644
--- a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/impl/JMSServerManagerImpl.java
+++ b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/impl/JMSServerManagerImpl.java
@@ -1398,7 +1398,7 @@ public class JMSServerManagerImpl extends CleaningActivateCallback implements JM
                try {
                   registry.unbind(key);
                } catch (Exception e) {
-                  ActiveMQJMSServerLogger.LOGGER.bindingsUnbindError(e, key);
+                  ActiveMQJMSServerLogger.LOGGER.bindingsUnbindError(key, e);
                }
             }
          }
@@ -1523,7 +1523,7 @@ public class JMSServerManagerImpl extends CleaningActivateCallback implements JM
             ActiveMQJMSServerLogger.LOGGER.invalidHostForConnector(transportConfiguration.getName(), newHost);
             params.put(TransportConstants.HOST_PROP_NAME, newHost);
          } catch (UnknownHostException e) {
-            ActiveMQJMSServerLogger.LOGGER.failedToCorrectHost(e, transportConfiguration.getName());
+            ActiveMQJMSServerLogger.LOGGER.failedToCorrectHost(transportConfiguration.getName(), e);
          }
       }
    }
diff --git a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/DummyCallback.java b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/DummyCallback.java
index 2ee5186f6d..9679269309 100644
--- a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/DummyCallback.java
+++ b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/DummyCallback.java
@@ -33,7 +33,7 @@ public class DummyCallback extends SyncIOCompletion {
 
    @Override
    public void onError(final int errorCode, final String errorMessage) {
-      ActiveMQJournalLogger.LOGGER.errorWritingData(new Exception(errorMessage), errorMessage, errorCode);
+      ActiveMQJournalLogger.LOGGER.errorWritingData(errorMessage, errorCode, new Exception(errorMessage));
    }
 
    @Override
diff --git a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalFilesRepository.java b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalFilesRepository.java
index d7bd882248..97e9b58458 100644
--- a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalFilesRepository.java
+++ b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalFilesRepository.java
@@ -713,7 +713,7 @@ public class JournalFilesRepository {
          try {
             return Long.parseLong(fileName.substring(fileName.lastIndexOf("-") + 1, fileName.indexOf('.')));
          } catch (Throwable e2) {
-            ActiveMQJournalLogger.LOGGER.errorRetrievingID(e, fileName);
+            ActiveMQJournalLogger.LOGGER.errorRetrievingID(fileName, e);
          }
          return 0;
       }
diff --git a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalImpl.java b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalImpl.java
index 06b98c6a59..20940392ed 100644
--- a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalImpl.java
+++ b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalImpl.java
@@ -3079,7 +3079,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal
                   try {
                      filesRepository.addFreeFile(file, false);
                   } catch (Throwable e) {
-                     ActiveMQJournalLogger.LOGGER.errorReinitializingFile(e, file);
+                     ActiveMQJournalLogger.LOGGER.errorReinitializingFile(file, e);
                   }
                }
             } finally {
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 75f8826283..0d5879d414 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
@@ -133,7 +133,7 @@ public interface ActiveMQJournalLogger {
    void timeoutOnPollerShutdown(@Cause Exception e);
 
    @LogMessage(id = 142023, value = "Executor on file {} couldn't complete its tasks in 60 seconds.", level = LogMessage.Level.WARN)
-   void couldNotCompleteTask(@Cause Exception e, String name);
+   void couldNotCompleteTask(String name, @Cause Exception e);
 
    @LogMessage(id = 142024, value = "Error completing callback", level = LogMessage.Level.WARN)
    void errorCompletingCallback(@Cause Throwable e);
@@ -145,7 +145,7 @@ public interface ActiveMQJournalLogger {
    void timeoutOnWriterShutdown(@Cause Throwable e);
 
    @LogMessage(id = 142027, value = "Error on writing data! {} code - {}", level = LogMessage.Level.WARN)
-   void errorWritingData(@Cause Throwable e, String errorMessage, Integer errorCode);
+   void errorWritingData(String errorMessage, int errorCode, @Cause Throwable e);
 
    @LogMessage(id = 142028, value = "Error replaying pending commands after compacting", level = LogMessage.Level.WARN)
    void errorReplayingCommands(@Cause Throwable e);
@@ -157,13 +157,13 @@ public interface ActiveMQJournalLogger {
    void errorOpeningFile(@Cause Throwable e);
 
    @LogMessage(id = 142031, value = "Error retrieving ID part of the file name {}", level = LogMessage.Level.WARN)
-   void errorRetrievingID(@Cause Throwable e, String fileName);
+   void errorRetrievingID(String fileName, @Cause Throwable e);
 
    @LogMessage(id = 142032, value = "Error reading journal file", level = LogMessage.Level.WARN)
    void errorReadingFile(@Cause Throwable e);
 
    @LogMessage(id = 142033, value = "Error reinitializing file {}", level = LogMessage.Level.WARN)
-   void errorReinitializingFile(@Cause Throwable e, JournalFile file);
+   void errorReinitializingFile(JournalFile file, @Cause Throwable e);
 
    @LogMessage(id = 142034, value = "Exception on submitting write", level = LogMessage.Level.WARN)
    void errorSubmittingWrite(@Cause Throwable e);
diff --git a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPLargeMessage.java b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPLargeMessage.java
index a80aa2663c..ec86311338 100644
--- a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPLargeMessage.java
+++ b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPLargeMessage.java
@@ -515,7 +515,7 @@ public class AMQPLargeMessage extends AMQPMessage implements LargeServerMessage
          return copy;
 
       } catch (Exception e) {
-         ActiveMQServerLogger.LOGGER.lareMessageErrorCopying(e, this);
+         ActiveMQServerLogger.LOGGER.lareMessageErrorCopying(this, e);
          return null;
       }
    }
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 03493e1d41..e1638e38fd 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
@@ -48,5 +48,5 @@ public interface ActiveMQStompProtocolLogger {
    void sentErrorToClient(String address, String message);
 
    @LogMessage(id = 334023, value = "Unable to send frame {}", level = LogMessage.Level.ERROR)
-   void errorSendingFrame(@Cause Exception e, StompFrame frame);
+   void errorSendingFrame(StompFrame frame, @Cause Exception e);
 }
diff --git a/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompProtocolManager.java b/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompProtocolManager.java
index 1f83b02a68..3fa7fd76e9 100644
--- a/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompProtocolManager.java
+++ b/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompProtocolManager.java
@@ -209,7 +209,7 @@ public class StompProtocolManager extends AbstractProtocolManager<StompFrame, St
          try {
             connection.physicalSend(frame);
          } catch (Exception e) {
-            ActiveMQStompProtocolLogger.LOGGER.errorSendingFrame(e, frame);
+            ActiveMQStompProtocolLogger.LOGGER.errorSendingFrame(frame, e);
             return false;
          }
          return true;
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 0bd6680bb9..fe65766839 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
@@ -75,7 +75,7 @@ public interface ActiveMQRALogger {
    void handlingJMSFailure(@Cause Exception e);
 
    @LogMessage(id = 152005, value = "Failure in broker activation {}", level = LogMessage.Level.WARN)
-   void failureInActivation(@Cause Throwable t, ActiveMQActivationSpec spec);
+   void failureInActivation(ActiveMQActivationSpec spec, @Cause Throwable t);
 
    @LogMessage(id = 152006, value = "Unable to call after delivery", level = LogMessage.Level.WARN)
    void unableToCallAfterDelivery(@Cause Exception e);
@@ -102,7 +102,7 @@ public interface ActiveMQRALogger {
    void errorStoppingRA(@Cause Exception e);
 
    @LogMessage(id = 154003, value = "Unable to reconnect {}", level = LogMessage.Level.ERROR)
-   void errorReconnecting(@Cause Throwable t, ActiveMQActivationSpec spec);
+   void errorReconnecting(ActiveMQActivationSpec spec, @Cause Throwable t);
 
    @LogMessage(id = 154004, value = "Failed to deliver message", level = LogMessage.Level.ERROR)
    void errorDeliveringMessage(@Cause Throwable t);
diff --git a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQActivation.java b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQActivation.java
index fe81e3c3b7..4947d6681f 100644
--- a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQActivation.java
+++ b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQActivation.java
@@ -706,7 +706,7 @@ public class ActiveMQActivation {
          } else if (failure instanceof ActiveMQException && ((ActiveMQException) failure).getType() == ActiveMQExceptionType.NOT_CONNECTED) {
             ActiveMQRALogger.LOGGER.awaitingJMSServerCreation();
          } else {
-            ActiveMQRALogger.LOGGER.failureInActivation(failure, spec);
+            ActiveMQRALogger.LOGGER.failureInActivation(spec, failure);
          }
       }
       int reconnectCount = 0;
@@ -747,7 +747,7 @@ public class ActiveMQActivation {
                      ActiveMQRALogger.LOGGER.awaitingJMSServerCreation();
                   }
                } else {
-                  ActiveMQRALogger.LOGGER.errorReconnecting(t, spec);
+                  ActiveMQRALogger.LOGGER.errorReconnecting(spec, t);
                }
             }
             ++reconnectCount;
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 3ae22311f8..77fd74ddf5 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
@@ -57,7 +57,7 @@ public interface ActiveMQRestLogger {
    void deprecatedConfiguration(String oldConfigParameter, String newConfigParameter);
 
    @LogMessage(id = 184000, value = "Failed to load push store {}, it is probably corrupted", level = LogMessage.Level.ERROR)
-   void errorLoadingStore(@Cause Exception e, String name);
+   void errorLoadingStore(String name, @Cause Exception e);
 
    @LogMessage(id = 184001, value = "Error updating store", level = LogMessage.Level.ERROR)
    void errorUpdatingStore(@Cause Exception e);
diff --git a/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/queue/push/FilePushStore.java b/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/queue/push/FilePushStore.java
index d788cefd39..77ad60a1de 100644
--- a/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/queue/push/FilePushStore.java
+++ b/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/queue/push/FilePushStore.java
@@ -50,7 +50,7 @@ public class FilePushStore implements PushStore {
                ActiveMQRestLogger.LOGGER.addingPushRegistration(reg.getId());
                map.put(reg.getId(), reg);
             } catch (Exception e) {
-               ActiveMQRestLogger.LOGGER.errorLoadingStore(e, file.getName());
+               ActiveMQRestLogger.LOGGER.errorLoadingStore(file.getName(), e);
             }
          }
       }
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 9c12a52b37..52e88484f2 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
@@ -42,10 +42,10 @@ public interface ActiveMQOsgiLogger {
    void protocolWasRemovedForBroker(String protocol, String name, String message);
 
    @LogMessage(id = 582000, value = "Error starting broker: {}", level = LogMessage.Level.WARN)
-   void errorStartingBroker(@Cause Exception e, String name);
+   void errorStartingBroker(String name, @Cause Exception e);
 
    @LogMessage(id = 582001, value = "Error stopping broker: {}", level = LogMessage.Level.WARN)
-   void errorStoppingBroker(@Cause Exception e, String name);
+   void errorStoppingBroker(String name, @Cause Exception e);
 
    @LogMessage(id = 582002, value = "Error getting dataSource provider infos.", level = LogMessage.Level.WARN)
    void errorGettingDataSourceProviderInfo(@Cause Exception e);
diff --git a/artemis-server-osgi/src/main/java/org/apache/activemq/artemis/osgi/DataSourceTracker.java b/artemis-server-osgi/src/main/java/org/apache/activemq/artemis/osgi/DataSourceTracker.java
index bfc7362402..03b0d3931c 100644
--- a/artemis-server-osgi/src/main/java/org/apache/activemq/artemis/osgi/DataSourceTracker.java
+++ b/artemis-server-osgi/src/main/java/org/apache/activemq/artemis/osgi/DataSourceTracker.java
@@ -54,7 +54,7 @@ public class DataSourceTracker implements ServiceTrackerCustomizer<DataSource, D
       try {
          callback.start();
       } catch (Exception ex) {
-         ActiveMQOsgiLogger.LOGGER.errorStartingBroker(ex, name);
+         ActiveMQOsgiLogger.LOGGER.errorStartingBroker(name, ex);
       }
       return dataSource;
    }
@@ -70,7 +70,7 @@ public class DataSourceTracker implements ServiceTrackerCustomizer<DataSource, D
       try {
          callback.stop();
       } catch (Exception ex) {
-         ActiveMQOsgiLogger.LOGGER.errorStoppingBroker(ex, name);
+         ActiveMQOsgiLogger.LOGGER.errorStoppingBroker(name, ex);
       }
    }
 }
diff --git a/artemis-server-osgi/src/main/java/org/apache/activemq/artemis/osgi/ProtocolTracker.java b/artemis-server-osgi/src/main/java/org/apache/activemq/artemis/osgi/ProtocolTracker.java
index 8e091291be..5161640d82 100644
--- a/artemis-server-osgi/src/main/java/org/apache/activemq/artemis/osgi/ProtocolTracker.java
+++ b/artemis-server-osgi/src/main/java/org/apache/activemq/artemis/osgi/ProtocolTracker.java
@@ -65,7 +65,7 @@ public class ProtocolTracker implements ServiceTrackerCustomizer<ProtocolManager
          try {
             callback.start();
          } catch (Exception e) {
-            ActiveMQOsgiLogger.LOGGER.errorStartingBroker(e, name);
+            ActiveMQOsgiLogger.LOGGER.errorStartingBroker(name, e);
          }
       }
    }
@@ -106,7 +106,7 @@ public class ProtocolTracker implements ServiceTrackerCustomizer<ProtocolManager
             try {
                callback.start();
             } catch (Exception e) {
-               ActiveMQOsgiLogger.LOGGER.errorStartingBroker(e, name);
+               ActiveMQOsgiLogger.LOGGER.errorStartingBroker(name, e);
             }
          }
       }
@@ -121,7 +121,7 @@ public class ProtocolTracker implements ServiceTrackerCustomizer<ProtocolManager
             try {
                callback.stop();
             } catch (Exception e) {
-               ActiveMQOsgiLogger.LOGGER.errorStoppingBroker(e, name);
+               ActiveMQOsgiLogger.LOGGER.errorStoppingBroker(name, e);
             }
          }
          this.protocols.put(protocol, false);
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/filter/impl/FilterImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/filter/impl/FilterImpl.java
index 3f183a53f7..b4b7d9dfff 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/filter/impl/FilterImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/filter/impl/FilterImpl.java
@@ -88,7 +88,7 @@ public class FilterImpl implements Filter {
          if (logger.isDebugEnabled()) {
             logger.debug("Invalid filter", e);
          }
-         throw ActiveMQMessageBundle.BUNDLE.invalidFilter(e, filterStr);
+         throw ActiveMQMessageBundle.BUNDLE.invalidFilter(filterStr, e);
       }
       return new FilterImpl(filterStr, booleanExpression);
    }
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PageCursorProviderImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PageCursorProviderImpl.java
index 200593243b..c1a8475577 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PageCursorProviderImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PageCursorProviderImpl.java
@@ -206,7 +206,7 @@ public class PageCursorProviderImpl implements PageCursorProvider {
          try {
             sub.onPageModeCleared(tx);
          } catch (Exception e) {
-            ActiveMQServerLogger.LOGGER.errorCleaningPagingOnQueue(e, sub.getQueue().getName().toString());
+            ActiveMQServerLogger.LOGGER.errorCleaningPagingOnQueue(sub.getQueue().getName().toString(), e);
          }
       }
 
@@ -290,7 +290,7 @@ public class PageCursorProviderImpl implements PageCursorProvider {
                   }
                }
             } catch (Exception ex) {
-               ActiveMQServerLogger.LOGGER.problemCleaningPageAddress(ex, pagingStore.getAddress());
+               ActiveMQServerLogger.LOGGER.problemCleaningPageAddress(pagingStore.getAddress(), ex);
                logger.warn(ex.getMessage(), ex);
                return;
             } finally {
@@ -441,7 +441,7 @@ public class PageCursorProviderImpl implements PageCursorProvider {
             onDeletePage(depagedPage);
          }
       } catch (Exception ex) {
-         ActiveMQServerLogger.LOGGER.problemCleaningPageAddress(ex, pagingStore.getAddress());
+         ActiveMQServerLogger.LOGGER.problemCleaningPageAddress(pagingStore.getAddress(), ex);
          return;
       }
 
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/PageTransactionInfoImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/PageTransactionInfoImpl.java
index 261ec4572f..8c96074b5e 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/PageTransactionInfoImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/PageTransactionInfoImpl.java
@@ -105,7 +105,7 @@ public final class PageTransactionInfoImpl implements PageTransactionInfo {
             try {
                storageManager.deletePageTransactional(this.recordID);
             } catch (Exception e) {
-               ActiveMQServerLogger.LOGGER.pageTxDeleteError(e, recordID);
+               ActiveMQServerLogger.LOGGER.pageTxDeleteError(recordID, e);
             }
          }
          if (pagingManager != null) {
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/AbstractJournalStorageManager.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/AbstractJournalStorageManager.java
index b5870a521e..41b1174457 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/AbstractJournalStorageManager.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/AbstractJournalStorageManager.java
@@ -459,7 +459,7 @@ public abstract class AbstractJournalStorageManager extends CriticalComponentImp
 
    private void messageUpdateCallback(long id, boolean found) {
       if (!found) {
-         ActiveMQServerLogger.LOGGER.cannotFindMessageOnJournal(new Exception(), id);
+         ActiveMQServerLogger.LOGGER.cannotFindMessageOnJournal(id, new Exception());
       }
    }
 
@@ -1283,7 +1283,7 @@ public abstract class AbstractJournalStorageManager extends CriticalComponentImp
       } catch (Throwable ignored) {
       }
 
-      ActiveMQServerLogger.LOGGER.failedToLoadPreparedTX(e, String.valueOf(encodingXid != null ? encodingXid.xid : null));
+      ActiveMQServerLogger.LOGGER.failedToLoadPreparedTX(String.valueOf(encodingXid != null ? encodingXid.xid : null), e);
 
       try {
          rollback(txInfo.getId());
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/JournalStorageManager.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/JournalStorageManager.java
index 075461f942..b1e79b400c 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/JournalStorageManager.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/JournalStorageManager.java
@@ -342,7 +342,7 @@ public class JournalStorageManager extends AbstractJournalStorageManager {
             try {
                msg.delete();
             } catch (Exception e) {
-               ActiveMQServerLogger.LOGGER.journalErrorDeletingMessage(e, messageId);
+               ActiveMQServerLogger.LOGGER.journalErrorDeletingMessage(messageId, e);
             }
             if (replicator != null) {
                replicator.largeMessageDelete(messageId, JournalStorageManager.this);
@@ -511,7 +511,7 @@ public class JournalStorageManager extends AbstractJournalStorageManager {
                   confirmLargeMessage(largeServerMessage);
                }
             } catch (Exception e) {
-               ActiveMQServerLogger.LOGGER.journalErrorDeletingMessage(e, largeServerMessage.toMessage().getMessageID());
+               ActiveMQServerLogger.LOGGER.journalErrorDeletingMessage(largeServerMessage.toMessage().getMessageID(), e);
             }
          }
 
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/LargeServerMessageImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/LargeServerMessageImpl.java
index 63fe38b592..9501c5d2ae 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/LargeServerMessageImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/LargeServerMessageImpl.java
@@ -307,7 +307,7 @@ public final class LargeServerMessageImpl extends CoreMessage implements CoreLar
          return newMessage.toMessage();
 
       } catch (Exception e) {
-         ActiveMQServerLogger.LOGGER.lareMessageErrorCopying(e, this);
+         ActiveMQServerLogger.LOGGER.lareMessageErrorCopying(this, e);
          return null;
       }
    }
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/TXLargeMessageConfirmationOperation.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/TXLargeMessageConfirmationOperation.java
index 9e252e97d8..5b34a327fa 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/TXLargeMessageConfirmationOperation.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/TXLargeMessageConfirmationOperation.java
@@ -38,7 +38,7 @@ public final class TXLargeMessageConfirmationOperation extends TransactionOperat
          try {
             journalStorageManager.confirmPendingLargeMessage(msg);
          } catch (Throwable e) {
-            ActiveMQServerLogger.LOGGER.journalErrorConfirmingLargeMessage(e, msg);
+            ActiveMQServerLogger.LOGGER.journalErrorConfirmingLargeMessage(msg, e);
          }
       }
    }
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/PostOfficeImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/PostOfficeImpl.java
index 73bda80942..e5fd7b1b72 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/PostOfficeImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/PostOfficeImpl.java
@@ -1953,7 +1953,7 @@ public class PostOfficeImpl implements PostOffice, NotificationListener, Binding
                // that the address is removed before the reaper removes it
                logger.debug(e.getMessage(), e);
             } else {
-               ActiveMQServerLogger.LOGGER.errorRemovingAutoCreatedDestination(e, "address", address);
+               ActiveMQServerLogger.LOGGER.errorRemovingAutoCreatedDestination("address", address, e);
             }
          }
       }
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/invm/InVMConnection.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/invm/InVMConnection.java
index eba1628f62..9a1618a85c 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/invm/InVMConnection.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/invm/InVMConnection.java
@@ -214,7 +214,7 @@ public class InVMConnection implements Connection {
                   }
                } catch (Exception e) {
                   final String msg = "Failed to write to handler on connector " + this;
-                  ActiveMQServerLogger.LOGGER.errorWritingToInvmConnector(e, this);
+                  ActiveMQServerLogger.LOGGER.errorWritingToInvmConnector(this, e);
                   throw new IllegalStateException(msg, e);
                } finally {
                   buffer.release();
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/server/impl/RemotingServiceImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/server/impl/RemotingServiceImpl.java
index 699b29dcac..fcc9f77584 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/server/impl/RemotingServiceImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/server/impl/RemotingServiceImpl.java
@@ -283,7 +283,7 @@ public class RemotingServiceImpl implements RemotingService, ServerConnectionLif
             managementService.registerAcceptor(acceptor, info);
          }
       } catch (Exception e) {
-         ActiveMQServerLogger.LOGGER.errorCreatingAcceptor(e, info.getFactoryClassName());
+         ActiveMQServerLogger.LOGGER.errorCreatingAcceptor(info.getFactoryClassName(), e);
       }
 
       return acceptor;
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/replication/ReplicationEndpoint.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/replication/ReplicationEndpoint.java
index cbf48116c0..39276edbf6 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/replication/ReplicationEndpoint.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/replication/ReplicationEndpoint.java
@@ -241,11 +241,11 @@ public final class ReplicationEndpoint implements ChannelHandler, ActiveMQCompon
          }
       } catch (ActiveMQException e) {
          logger.warn(e.getMessage(), e);
-         ActiveMQServerLogger.LOGGER.errorHandlingReplicationPacket(e, packet);
+         ActiveMQServerLogger.LOGGER.errorHandlingReplicationPacket(packet, e);
          response = new ActiveMQExceptionMessage(e);
       } catch (Exception e) {
          logger.warn(e.getMessage(), e);
-         ActiveMQServerLogger.LOGGER.errorHandlingReplicationPacket(e, packet);
+         ActiveMQServerLogger.LOGGER.errorHandlingReplicationPacket(packet, e);
          response = new ActiveMQExceptionMessage(ActiveMQMessageBundle.BUNDLE.replicationUnhandledError(e));
       }
 
@@ -637,7 +637,7 @@ public final class ReplicationEndpoint implements ChannelHandler, ActiveMQCompon
                      }
                      message.deleteFile();
                   } catch (Exception e) {
-                     ActiveMQServerLogger.LOGGER.errorDeletingLargeMessage(e, packet.getMessageId());
+                     ActiveMQServerLogger.LOGGER.errorDeletingLargeMessage(packet.getMessageId(), e);
                   }
                }
             });
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 f5f75054a3..47c32cc542 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
@@ -131,7 +131,7 @@ public interface ActiveMQMessageBundle {
    ActiveMQQueueExistsException queueAlreadyExists(SimpleString queueName, SimpleString addressName);
 
    @Message(id = 229020, value = "Invalid filter: {}")
-   ActiveMQInvalidFilterExpressionException invalidFilter(@Cause Throwable e, SimpleString filter);
+   ActiveMQInvalidFilterExpressionException invalidFilter(SimpleString filter, @Cause Throwable e);
 
    @Message(id = 229021, value = "MessageId was not assigned to Message")
    ActiveMQIllegalStateException messageIdNotAssigned();
@@ -287,7 +287,7 @@ public interface ActiveMQMessageBundle {
    IllegalArgumentException nullPassword();
 
    @Message(id = 229074, value = "Error instantiating transformer class {}")
-   IllegalArgumentException errorCreatingTransformerClass(@Cause Exception e, String transformerClassName);
+   IllegalArgumentException errorCreatingTransformerClass(String transformerClassName, @Cause Exception e);
 
    @Message(id = 229075, value = "method autoEncode doesn't know how to convert {} yet")
    IllegalArgumentException autoConvertError(Class<? extends Object> aClass);
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 bc2ed282ac..23f9e2dcc0 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
@@ -148,10 +148,10 @@ public interface ActiveMQServerLogger {
    void errorRemovingConnection();
 
    @LogMessage(id = 221022, value = "unable to start connector service: {}", level = LogMessage.Level.INFO)
-   void errorStartingConnectorService(@Cause Throwable e, String name);
+   void errorStartingConnectorService(String name, @Cause Throwable e);
 
    @LogMessage(id = 221023, value = "unable to stop connector service: {}", level = LogMessage.Level.INFO)
-   void errorStoppingConnectorService(@Cause Throwable e, String name);
+   void errorStoppingConnectorService(String name, @Cause Throwable e);
 
    @LogMessage(id = 221024, value = "Backup server {} is synchronized with live server, nodeID={}.", level = LogMessage.Level.INFO)
    void backupServerSynchronized(ActiveMQServerImpl server, String liveID);
@@ -405,13 +405,13 @@ public interface ActiveMQServerLogger {
    void errorScanningURLs(@Cause Exception e);
 
    @LogMessage(id = 222021, value = "problem undeploying {}", level = LogMessage.Level.WARN)
-   void problemUndeployingNode(@Cause Exception e, Node node);
+   void problemUndeployingNode(Node node, @Cause Exception e);
 
    @LogMessage(id = 222022, value = "Timed out waiting for paging cursor to stop {}", level = LogMessage.Level.WARN)
    void timedOutStoppingPagingCursor(Executor executor);
 
    @LogMessage(id = 222023, value = "problem cleaning page address {}", level = LogMessage.Level.WARN)
-   void problemCleaningPageAddress(@Cause Exception e, SimpleString address);
+   void problemCleaningPageAddress(SimpleString address, @Cause Exception e);
 
    @LogMessage(id = 222024, value = "Could not complete operations on IO context {}", level = LogMessage.Level.WARN)
    void problemCompletingOperations(OperationContext e);
@@ -444,7 +444,7 @@ public interface ActiveMQServerLogger {
    void pageSuspectFile(String fileName, int position, int msgNumber);
 
    @LogMessage(id = 222034, value = "Can not delete page transaction id={}", level = LogMessage.Level.WARN)
-   void pageTxDeleteError(@Cause Exception e, long recordID);
+   void pageTxDeleteError(long recordID, @Cause Exception e);
 
    @LogMessage(id = 222035, value = "Directory {} did not have an identification file {}", level = LogMessage.Level.WARN)
    void pageStoreFactoryNoIdFile(String s, String addressFile);
@@ -474,7 +474,7 @@ public interface ActiveMQServerLogger {
    void journalCannotFindQueueForMessage(Long queueID);
 
    @LogMessage(id = 222044, value = "It was not possible to delete message {}", level = LogMessage.Level.WARN)
-   void journalErrorDeletingMessage(@Cause Exception e, Long messageID);
+   void journalErrorDeletingMessage(Long messageID, @Cause Exception e);
 
    @LogMessage(id = 222045, value = "Message in prepared tx for queue {} which does not exist. This message will be ignored.", level = LogMessage.Level.WARN)
    void journalMessageInPreparedTX(Long queueID);
@@ -501,7 +501,7 @@ public interface ActiveMQServerLogger {
    void errorIncrementDelayDeletionCount(@Cause Exception e);
 
    @LogMessage(id = 222053, value = "Error on copying large message {} for DLA or Expiry", level = LogMessage.Level.WARN)
-   void lareMessageErrorCopying(@Cause Exception e, LargeServerMessage largeServerMessage);
+   void lareMessageErrorCopying(LargeServerMessage largeServerMessage, @Cause Exception e);
 
    @LogMessage(id = 222054, value = "Error on executing IOCallback", level = LogMessage.Level.WARN)
    void errorExecutingAIOCallback(@Cause Throwable t);
@@ -519,7 +519,7 @@ public interface ActiveMQServerLogger {
    void duplicateMessageDetected(org.apache.activemq.artemis.api.core.Message message);
 
    @LogMessage(id = 222060, value = "Error while confirming large message completion on rollback for recordID={}", level = LogMessage.Level.WARN)
-   void journalErrorConfirmingLargeMessage(@Cause Throwable e, Long messageID);
+   void journalErrorConfirmingLargeMessage(Long messageID, @Cause Throwable e);
 
    @LogMessage(id = 222061, value = "Client connection failed, clearing up resources for session {}", level = LogMessage.Level.WARN)
    void clientConnectionFailed(String name);
@@ -564,13 +564,13 @@ public interface ActiveMQServerLogger {
    void nettyChannelStillBound(Channel channel, SocketAddress remoteAddress);
 
    @LogMessage(id = 222078, value = "Error instantiating remoting interceptor {}", level = LogMessage.Level.WARN)
-   void errorCreatingRemotingInterceptor(@Cause Exception e, String interceptorClass);
+   void errorCreatingRemotingInterceptor(String interceptorClass, @Cause Exception e);
 
    @LogMessage(id = 222079, value = "The following keys are invalid for configuring the acceptor: {} the acceptor will not be started.", level = LogMessage.Level.WARN)
    void invalidAcceptorKeys(String s);
 
    @LogMessage(id = 222080, value = "Error instantiating remoting acceptor {}", level = LogMessage.Level.WARN)
-   void errorCreatingAcceptor(@Cause Exception e, String factoryClassName);
+   void errorCreatingAcceptor(String factoryClassName, @Cause Exception e);
 
    @LogMessage(id = 222081, value = "Timed out waiting for remoting thread pool to terminate", level = LogMessage.Level.WARN)
    void timeoutRemotingThreadPool();
@@ -588,7 +588,7 @@ public interface ActiveMQServerLogger {
    void invalidPacketForReplication(Packet packet);
 
    @LogMessage(id = 222086, value = "error handling packet {} for replication", level = LogMessage.Level.WARN)
-   void errorHandlingReplicationPacket(@Cause Exception e, Packet packet);
+   void errorHandlingReplicationPacket(Packet packet, @Cause Exception e);
 
    @LogMessage(id = 222087, value = "Replication Error while closing the page on backup", level = LogMessage.Level.WARN)
    void errorClosingPageOnReplication(@Cause Exception e);
@@ -597,7 +597,7 @@ public interface ActiveMQServerLogger {
    void journalcomparisonMismatch(String s);
 
    @LogMessage(id = 222089, value = "Replication Error deleting large message ID = {}", level = LogMessage.Level.WARN)
-   void errorDeletingLargeMessage(@Cause Exception e, long messageId);
+   void errorDeletingLargeMessage(long messageId, @Cause Exception e);
 
    @LogMessage(id = 222090, value = "Replication Large MessageID {}  is not available on backup server. Ignoring replication message", level = LogMessage.Level.WARN)
    void largeMessageNotAvailable(long messageId);
@@ -612,13 +612,13 @@ public interface ActiveMQServerLogger {
    void timedOutWaitingToStopBridge();
 
    @LogMessage(id = 222094, value = "Bridge unable to send message {}, will try again once bridge reconnects", level = LogMessage.Level.WARN)
-   void bridgeUnableToSendMessage(@Cause Exception e, MessageReference ref);
+   void bridgeUnableToSendMessage(MessageReference ref, @Cause Exception e);
 
    @LogMessage(id = 222095, value = "Connection failed with failedOver={}", level = LogMessage.Level.WARN)
    void bridgeConnectionFailed(Boolean failedOver);
 
    @LogMessage(id = 222096, value = "Error on querying binding on bridge {}. Retrying in 100 milliseconds", level = LogMessage.Level.WARN)
-   void errorQueryingBridge(@Cause Throwable t, String name);
+   void errorQueryingBridge(String name, @Cause Throwable t);
 
    @LogMessage(id = 222097, value = "Address {} does not have any bindings, retry #({})", level = LogMessage.Level.WARN)
    void errorQueryingBridge(String address, Integer retryCount);
@@ -627,7 +627,7 @@ public interface ActiveMQServerLogger {
    void errorStartingBridge(String name);
 
    @LogMessage(id = 222099, value = "Bridge {} is unable to connect to destination. It will be disabled.", level = LogMessage.Level.WARN)
-   void errorConnectingBridge(@Cause Exception e, Bridge bridge);
+   void errorConnectingBridge(Bridge bridge, @Cause Exception e);
 
    @LogMessage(id = 222100, value = "ServerLocator was shutdown, can not retry on opening connection for bridge", level = LogMessage.Level.WARN)
    void bridgeLocatorShutdown();
@@ -660,28 +660,28 @@ public interface ActiveMQServerLogger {
    void noQueueIdDefined(org.apache.activemq.artemis.api.core.Message message, org.apache.activemq.artemis.api.core.Message messageCopy, SimpleString idsHeaderName);
 
    @LogMessage(id = 222111, value = "exception while invoking {} on {}", level = LogMessage.Level.TRACE)
-   void managementOperationError(@Cause Exception e, String op, String resourceName);
+   void managementOperationError(String op, String resourceName, @Cause Exception e);
 
    @LogMessage(id = 222112, value = "exception while retrieving attribute {} on {}", level = LogMessage.Level.WARN)
-   void managementAttributeError(@Cause Exception e, String att, String resourceName);
+   void managementAttributeError(String att, String resourceName, @Cause Exception e);
 
    @LogMessage(id = 222113, value = "On ManagementService stop, there are {} unexpected registered MBeans: {}", level = LogMessage.Level.WARN)
    void managementStopError(Integer size, List<String> unexpectedResourceNames);
 
    @LogMessage(id = 222114, value = "Unable to delete group binding info {}", level = LogMessage.Level.WARN)
-   void unableToDeleteGroupBindings(@Cause Exception e, SimpleString groupId);
+   void unableToDeleteGroupBindings(SimpleString groupId, @Cause Exception e);
 
    @LogMessage(id = 222115, value = "Error closing serverLocator={}", level = LogMessage.Level.WARN)
-   void errorClosingServerLocator(@Cause Exception e, ServerLocatorInternal clusterLocator);
+   void errorClosingServerLocator(ServerLocatorInternal clusterLocator, @Cause Exception e);
 
    @LogMessage(id = 222116, value = "unable to start broadcast group {}", level = LogMessage.Level.WARN)
-   void unableToStartBroadcastGroup(@Cause Exception e, String name);
+   void unableToStartBroadcastGroup(String name, @Cause Exception e);
 
    @LogMessage(id = 222117, value = "unable to start cluster connection {}", level = LogMessage.Level.WARN)
-   void unableToStartClusterConnection(@Cause Exception e, SimpleString name);
+   void unableToStartClusterConnection(SimpleString name, @Cause Exception e);
 
    @LogMessage(id = 222118, value = "unable to start Bridge {}", level = LogMessage.Level.WARN)
-   void unableToStartBridge(@Cause Exception e, SimpleString name);
+   void unableToStartBridge(SimpleString name, @Cause Exception e);
 
    @LogMessage(id = 222119, value = "No connector with name {}. backup cannot be announced.", level = LogMessage.Level.WARN)
    void announceBackupNoConnector(String connectorName);
@@ -747,10 +747,10 @@ public interface ActiveMQServerLogger {
    void remoteQueueAlreadyBoundOnClusterConnection(Object messageFlowRecord, SimpleString clusterName);
 
    @LogMessage(id = 222141, value = "Node Manager can not open file {}", level = LogMessage.Level.WARN)
-   void nodeManagerCantOpenFile(@Cause Exception e, File file);
+   void nodeManagerCantOpenFile(File file, @Cause Exception e);
 
    @LogMessage(id = 222142, value = "Error on resetting large message deliver - {}", level = LogMessage.Level.WARN)
-   void errorResttingLargeMessage(@Cause Throwable e, Object deliverer);
+   void errorResttingLargeMessage(Object deliverer, @Cause Throwable e);
 
    @LogMessage(id = 222143, value = "Timed out waiting for executor to complete", level = LogMessage.Level.WARN)
    void errorTransferringConsumer();
@@ -759,7 +759,7 @@ public interface ActiveMQServerLogger {
    void errorFlushingExecutorsOnQueue();
 
    @LogMessage(id = 222145, value = "Error expiring reference {} on queue", level = LogMessage.Level.WARN)
-   void errorExpiringReferencesOnQueue(@Cause Exception e, MessageReference ref);
+   void errorExpiringReferencesOnQueue(MessageReference ref, @Cause Exception e);
 
    @LogMessage(id = 222146, value = "Message has expired. No bindings for Expiry Address {} so dropping it", level = LogMessage.Level.WARN)
    void errorExpiringReferencesNoBindings(SimpleString expiryAddress);
@@ -777,13 +777,13 @@ public interface ActiveMQServerLogger {
    void messageExceededMaxDeliveryNoDLA(MessageReference ref, SimpleString name);
 
    @LogMessage(id = 222151, value = "removing consumer which did not handle a message, consumer={}, message={}", level = LogMessage.Level.WARN)
-   void removingBadConsumer(@Cause Throwable e, Consumer consumer, Object reference);
+   void removingBadConsumer(Consumer consumer, Object reference, @Cause Throwable e);
 
    @LogMessage(id = 222152, value = "Unable to decrement reference counting on queue", level = LogMessage.Level.WARN)
    void errorDecrementingRefCount(@Cause Throwable e);
 
    @LogMessage(id = 222153, value = "Cannot locate record for message id = {} on Journal", level = LogMessage.Level.WARN)
-   void cannotFindMessageOnJournal(@Cause Throwable e, Long messageID);
+   void cannotFindMessageOnJournal(Long messageID, @Cause Throwable e);
 
    @LogMessage(id = 222154, value = "Error checking DLQ", level = LogMessage.Level.WARN)
    void errorCheckingDLQ(@Cause Throwable e);
@@ -979,7 +979,7 @@ public interface ActiveMQServerLogger {
    void fileDoesNotExist(String path);
 
    @LogMessage(id = 222220, value = "   Error while cleaning paging on queue {}", level = LogMessage.Level.WARN)
-   void errorCleaningPagingOnQueue(@Cause Exception e, String queue);
+   void errorCleaningPagingOnQueue(String queue, @Cause Exception e);
 
    @LogMessage(id = 222221, value = "Error while cleaning page, during the commit", level = LogMessage.Level.WARN)
    void errorCleaningPagingDuringCommit(@Cause Exception e);
@@ -1174,10 +1174,10 @@ public interface ActiveMQServerLogger {
    void emptyAddressFile(String addressFile, String directory);
 
    @LogMessage(id = 222286, value = "Error executing {} federation plugin method.", level = LogMessage.Level.WARN)
-   void federationPluginExecutionError(@Cause Throwable e, String pluginMethod);
+   void federationPluginExecutionError(String pluginMethod, @Cause Throwable e);
 
    @LogMessage(id = 222287, value = "Error looking up bindings for address {}.", level = LogMessage.Level.WARN)
-   void federationBindingsLookupError(@Cause Throwable e, SimpleString address);
+   void federationBindingsLookupError(SimpleString address, @Cause Throwable e);
 
    @LogMessage(id = 222288, value = "Page {}, message {} could not be found on offset {}, with starting message {}. This represents a logic error or inconsistency on the data, and the system will try once again from the beggining of the page file.", level = LogMessage.Level.WARN)
    void pageLookupError(long pageNr, int messageNr, int offset, int startNr);
@@ -1210,7 +1210,7 @@ public interface ActiveMQServerLogger {
    void unableStartManagementContext(@Cause Exception e);
 
    @LogMessage(id = 222298, value = "Failed to create bootstrap user \"{}\". User management may not function.", level = LogMessage.Level.WARN)
-   void failedToCreateBootstrapCredentials(@Cause Exception e, String user);
+   void failedToCreateBootstrapCredentials(String user, @Cause Exception e);
 
    @LogMessage(id = 222299, value = "No bootstrap credentials found. User management may not function.", level = LogMessage.Level.WARN)
    void noBootstrapCredentialsFound();
@@ -1225,16 +1225,16 @@ public interface ActiveMQServerLogger {
    void failedToDealWithObjectProperty(SimpleString property, String exceptionMessage);
 
    @LogMessage(id = 222303, value = "Redistribution by {} of messageID = {} failed", level = LogMessage.Level.WARN)
-   void errorRedistributing(@Cause Throwable t, String queueName, long m);
+   void errorRedistributing(String queueName, long m, @Cause Throwable t);
 
    @LogMessage(id = 222304, value = "Unable to load message from journal", level = LogMessage.Level.WARN)
    void unableToLoadMessageFromJournal(@Cause Throwable t);
 
    @LogMessage(id = 222305, value = "Error federating message {}.", level = LogMessage.Level.WARN)
-   void federationDispatchError(@Cause Throwable e, String message);
+   void federationDispatchError(String message, @Cause Throwable e);
 
    @LogMessage(id = 222306, value = "Failed to load prepared TX and it will be rolled back: {}", level = LogMessage.Level.WARN)
-   void failedToLoadPreparedTX(@Cause Throwable e, String message);
+   void failedToLoadPreparedTX(String message, @Cause Throwable e);
 
    @LogMessage(id = 222307, value = "The queues element is deprecated and replaced by the addresses element", level = LogMessage.Level.WARN)
    void queuesElementDeprecated();
@@ -1248,16 +1248,16 @@ public interface ActiveMQServerLogger {
    void initializationError(@Cause Throwable e);
 
    @LogMessage(id = 224001, value = "Error deploying URI {}", level = LogMessage.Level.ERROR)
-   void errorDeployingURI(@Cause Throwable e, URI uri);
+   void errorDeployingURI(URI uri, @Cause Throwable e);
 
    @LogMessage(id = 224002, value = "Error deploying URI", level = LogMessage.Level.ERROR)
    void errorDeployingURI(@Cause Throwable e);
 
    @LogMessage(id = 224003, value = "Error undeploying URI {}", level = LogMessage.Level.ERROR)
-   void errorUnDeployingURI(@Cause Throwable e, URI a);
+   void errorUnDeployingURI(URI a, @Cause Throwable e);
 
    @LogMessage(id = 224005, value = "Unable to deploy node {}", level = LogMessage.Level.ERROR)
-   void unableToDeployNode(@Cause Exception e, Node node);
+   void unableToDeployNode(Node node, @Cause Exception e);
 
    @LogMessage(id = 224006, value = "Invalid filter: {}", level = LogMessage.Level.ERROR)
    void invalidFilter(SimpleString filter);
@@ -1311,7 +1311,7 @@ public interface ActiveMQServerLogger {
    void stompErrorTXExists(String txID);
 
    @LogMessage(id = 224027, value = "Failed to write to handler on invm connector {}", level = LogMessage.Level.ERROR)
-   void errorWritingToInvmConnector(@Cause Exception e, Runnable runnable);
+   void errorWritingToInvmConnector(Runnable runnable, @Cause Exception e);
 
    @LogMessage(id = 224028, value = "Failed to stop acceptor {}", level = LogMessage.Level.ERROR)
    void errorStoppingAcceptor(String name);
@@ -1320,7 +1320,7 @@ public interface ActiveMQServerLogger {
    void largeMessageIncompatible();
 
    @LogMessage(id = 224030, value = "Could not cancel reference {}", level = LogMessage.Level.ERROR)
-   void errorCancellingRefOnBridge(@Cause Exception e, MessageReference ref2);
+   void errorCancellingRefOnBridge(MessageReference ref2, @Cause Exception e);
 
    @LogMessage(id = 224032, value = "Failed to pause bridge", level = LogMessage.Level.ERROR)
    void errorPausingBridge(@Cause Exception e);
@@ -1353,7 +1353,7 @@ public interface ActiveMQServerLogger {
    void errorDelivering(@Cause Exception e);
 
    @LogMessage(id = 224042, value = "Error while restarting the backup server: {}", level = LogMessage.Level.ERROR)
-   void errorRestartingBackupServer(@Cause Exception e, ActiveMQServer backup);
+   void errorRestartingBackupServer(ActiveMQServer backup, @Cause Exception e);
 
    @LogMessage(id = 224043, value = "Failed to send forced delivery message", level = LogMessage.Level.ERROR)
    void errorSendingForcedDelivery(@Cause Exception e);
@@ -1365,13 +1365,13 @@ public interface ActiveMQServerLogger {
    void errorRunningLargeMessageDeliverer(@Cause Exception e);
 
    @LogMessage(id = 224046, value = "Exception while browser handled from {}", level = LogMessage.Level.ERROR)
-   void errorBrowserHandlingMessage(@Cause Exception e, MessageReference current);
+   void errorBrowserHandlingMessage(MessageReference current, @Cause Exception e);
 
    @LogMessage(id = 224047, value = "Failed to delete large message file", level = LogMessage.Level.ERROR)
    void errorDeletingLargeMessageFile(@Cause Throwable e);
 
    @LogMessage(id = 224048, value = "Failed to remove temporary queue {}", level = LogMessage.Level.ERROR)
-   void errorRemovingTempQueue(@Cause Exception e, SimpleString bindingName);
+   void errorRemovingTempQueue(SimpleString bindingName, @Cause Exception e);
 
    @LogMessage(id = 224049, value = "Cannot find consumer with id {}", level = LogMessage.Level.ERROR)
    void cannotFindConsumer(long consumerID);
@@ -1386,7 +1386,7 @@ public interface ActiveMQServerLogger {
    void errorCallingRepoListener(@Cause Throwable e);
 
    @LogMessage(id = 224053, value = "failed to timeout transaction, xid:{}", level = LogMessage.Level.ERROR)
-   void errorTimingOutTX(@Cause Exception e, Xid xid);
+   void errorTimingOutTX(Xid xid, @Cause Exception e);
 
    @LogMessage(id = 224054, value = "exception while stopping the replication manager", level = LogMessage.Level.ERROR)
    void errorStoppingReplicationManager(@Cause Throwable t);
@@ -1424,7 +1424,7 @@ public interface ActiveMQServerLogger {
    void incompatibleWithHAPolicyChosen(String parameter);
 
    @LogMessage(id = 224065, value = "Failed to remove auto-created {} {}", level = LogMessage.Level.ERROR)
-   void errorRemovingAutoCreatedDestination(@Cause Exception e, String destinationType, SimpleString bindingName);
+   void errorRemovingAutoCreatedDestination(String destinationType, SimpleString bindingName, @Cause Exception e);
 
    @LogMessage(id = 224066, value = "Error opening context for LDAP", level = LogMessage.Level.ERROR)
    void errorOpeningContextForLDAP(@Cause Exception e);
@@ -1433,7 +1433,7 @@ public interface ActiveMQServerLogger {
    void errorPopulatingSecurityRolesFromLDAP(@Cause Exception e);
 
    @LogMessage(id = 224068, value = "Unable to stop component: {}", level = LogMessage.Level.ERROR)
-   void errorStoppingComponent(@Cause Throwable t, String componentClassName);
+   void errorStoppingComponent(String componentClassName, @Cause Throwable t);
 
    @LogMessage(id = 224069, value = "Change detected in broker configuration file, but reload failed", level = LogMessage.Level.ERROR)
    void configurationReloadFailed(@Cause Throwable t);
@@ -1445,7 +1445,7 @@ public interface ActiveMQServerLogger {
    void journalUseMAPPED();
 
    @LogMessage(id = 224074, value = "Failed to purge queue {} on no consumers", level = LogMessage.Level.ERROR)
-   void failedToPurgeQueue(@Cause Exception e, SimpleString bindingName);
+   void failedToPurgeQueue(SimpleString bindingName, @Cause Exception e);
 
    @LogMessage(id = 224075, value = "Cannot find pageTX id = {}", level = LogMessage.Level.ERROR)
    void journalCannotFindPageTX(Long id);
@@ -1478,7 +1478,7 @@ public interface ActiveMQServerLogger {
    void failedToOpenContext(@Cause Exception e);
 
    @LogMessage(id = 224085, value = "Failed to load property {}, reason: {}", level = LogMessage.Level.ERROR)
-   void failedToLoadProperty(@Cause Exception e, String key, String reason);
+   void failedToLoadProperty(String key, String reason, @Cause Exception e);
 
    @LogMessage(id = 224086, value = "Caught unexpected exception", level = LogMessage.Level.ERROR)
    void caughtUnexpectedException(@Cause NamingException e);
@@ -1541,7 +1541,7 @@ public interface ActiveMQServerLogger {
    void failedConnectingToCluster(@Cause Exception e);
 
    @LogMessage(id = 224106, value = "failed to remove transaction, xid:{}", level = LogMessage.Level.ERROR)
-   void errorRemovingTX(@Cause Exception e, Xid xid);
+   void errorRemovingTX(Xid xid, @Cause Exception e);
 
    @LogMessage(id = 224107, value = "The Critical Analyzer detected slow paths on the broker.  It is recommended that you enable trace logs on org.apache.activemq.artemis.utils.critical while you troubleshoot this issue. You should disable the trace logs when you have finished troubleshooting.", level = LogMessage.Level.INFO)
    void enableTraceForCriticalAnalyzer();
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ClusterManager.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ClusterManager.java
index 319bbd7546..debe5be9bf 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ClusterManager.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ClusterManager.java
@@ -264,7 +264,7 @@ public class ClusterManager implements ActiveMQComponent {
          try {
             group.start();
          } catch (Exception e) {
-            ActiveMQServerLogger.LOGGER.unableToStartBroadcastGroup(e, group.getName());
+            ActiveMQServerLogger.LOGGER.unableToStartBroadcastGroup(group.getName(), e);
          }
       }
 
@@ -272,7 +272,7 @@ public class ClusterManager implements ActiveMQComponent {
          try {
             conn.start();
          } catch (Exception e) {
-            ActiveMQServerLogger.LOGGER.unableToStartClusterConnection(e, conn.getName());
+            ActiveMQServerLogger.LOGGER.unableToStartClusterConnection(conn.getName(), e);
          }
       }
 
@@ -282,7 +282,7 @@ public class ClusterManager implements ActiveMQComponent {
          try {
             bridge.start();
          } catch (Exception e) {
-            ActiveMQServerLogger.LOGGER.unableToStartBridge(e, bridge.getName());
+            ActiveMQServerLogger.LOGGER.unableToStartBridge(bridge.getName(), e);
          }
       }
 
@@ -333,7 +333,7 @@ public class ClusterManager implements ActiveMQComponent {
          try {
             clusterLocator.close();
          } catch (Exception e) {
-            ActiveMQServerLogger.LOGGER.errorClosingServerLocator(e, clusterLocator);
+            ActiveMQServerLogger.LOGGER.errorClosingServerLocator(clusterLocator, e);
          }
       }
       clusterLocators.clear();
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/BridgeImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/BridgeImpl.java
index 23377b7aa3..bb13fc7982 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/BridgeImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/BridgeImpl.java
@@ -304,7 +304,7 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled
             refqueue.cancel(ref, timeBase);
          } catch (Exception e) {
             // There isn't much we can do besides log an error
-            ActiveMQServerLogger.LOGGER.errorCancellingRefOnBridge(e, ref);
+            ActiveMQServerLogger.LOGGER.errorCancellingRefOnBridge(ref, e);
          }
       }
    }
@@ -730,7 +730,7 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled
                }
             } catch (final ActiveMQException e) {
                unsetLargeMessageDelivery();
-               ActiveMQServerLogger.LOGGER.bridgeUnableToSendMessage(e, ref);
+               ActiveMQServerLogger.LOGGER.bridgeUnableToSendMessage(ref, e);
 
                connectionFailed(e, false);
             }
@@ -756,7 +756,7 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled
       try {
          producer.send(dest, message);
       } catch (final ActiveMQException e) {
-         ActiveMQServerLogger.LOGGER.bridgeUnableToSendMessage(e, ref);
+         ActiveMQServerLogger.LOGGER.bridgeUnableToSendMessage(ref, e);
 
          synchronized (refs) {
             // We remove this reference as we are returning busy which means the reference will never leave the Queue.
@@ -946,7 +946,7 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled
                try {
                   query = session.addressQuery(SimpleString.toSimpleString(configuration.getForwardingAddress()));
                } catch (Throwable e) {
-                  ActiveMQServerLogger.LOGGER.errorQueryingBridge(e, configuration.getName());
+                  ActiveMQServerLogger.LOGGER.errorQueryingBridge(configuration.getName(), e);
                   // This was an issue during startup, we will not count this retry
                   retryCount--;
 
@@ -1001,9 +1001,9 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled
                scheduleRetryConnect();
             }
          } catch (ActiveMQInterruptedException | InterruptedException e) {
-            ActiveMQServerLogger.LOGGER.errorConnectingBridge(e, this);
+            ActiveMQServerLogger.LOGGER.errorConnectingBridge(this, e);
          } catch (Exception e) {
-            ActiveMQServerLogger.LOGGER.errorConnectingBridge(e, this);
+            ActiveMQServerLogger.LOGGER.errorConnectingBridge(this, e);
             if (csf != null) {
                try {
                   csf.close();
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/federation/AbstractFederationStream.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/federation/AbstractFederationStream.java
index 23e9040158..0066c14a0c 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/federation/AbstractFederationStream.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/federation/AbstractFederationStream.java
@@ -123,7 +123,7 @@ public abstract class AbstractFederationStream implements FederationStream {
          try {
             server.callBrokerFederationPlugins(plugin -> plugin.federationStreamStarted(this));
          } catch (ActiveMQException t) {
-            ActiveMQServerLogger.LOGGER.federationPluginExecutionError(t, "federationStreamStarted");
+            ActiveMQServerLogger.LOGGER.federationPluginExecutionError("federationStreamStarted", t);
             throw new IllegalStateException(t.getMessage(), t.getCause());
          }
       }
@@ -134,7 +134,7 @@ public abstract class AbstractFederationStream implements FederationStream {
          try {
             server.callBrokerFederationPlugins(plugin -> plugin.federationStreamStopped(this));
          } catch (ActiveMQException t) {
-            ActiveMQServerLogger.LOGGER.federationPluginExecutionError(t, "federationStreamStopped");
+            ActiveMQServerLogger.LOGGER.federationPluginExecutionError("federationStreamStopped", t);
             throw new IllegalStateException(t.getMessage(), t.getCause());
          }
       }
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/federation/FederatedAbstract.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/federation/FederatedAbstract.java
index 9bff8801eb..6023a002df 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/federation/FederatedAbstract.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/federation/FederatedAbstract.java
@@ -115,7 +115,7 @@ public abstract class FederatedAbstract implements ActiveMQServerBasePlugin {
                try {
                   server.callBrokerFederationPlugins(plugin -> plugin.beforeCreateFederatedQueueConsumer(key));
                } catch (ActiveMQException t) {
-                  ActiveMQServerLogger.LOGGER.federationPluginExecutionError(t, "beforeCreateFederatedQueueConsumer");
+                  ActiveMQServerLogger.LOGGER.federationPluginExecutionError("beforeCreateFederatedQueueConsumer", t);
                   throw new IllegalStateException(t.getMessage(), t.getCause());
                }
             }
@@ -128,7 +128,7 @@ public abstract class FederatedAbstract implements ActiveMQServerBasePlugin {
                   final FederatedQueueConsumer finalConsumer = remoteQueueConsumer;
                   server.callBrokerFederationPlugins(plugin -> plugin.afterCreateFederatedQueueConsumer(finalConsumer));
                } catch (ActiveMQException t) {
-                  ActiveMQServerLogger.LOGGER.federationPluginExecutionError(t, "afterCreateFederatedQueueConsumer");
+                  ActiveMQServerLogger.LOGGER.federationPluginExecutionError("afterCreateFederatedQueueConsumer", t);
                   throw new IllegalStateException(t.getMessage(), t.getCause());
                }
             }
@@ -145,7 +145,7 @@ public abstract class FederatedAbstract implements ActiveMQServerBasePlugin {
             try {
                server.callBrokerFederationPlugins(plugin -> plugin.beforeCloseFederatedQueueConsumer(remoteQueueConsumer));
             } catch (ActiveMQException t) {
-               ActiveMQServerLogger.LOGGER.federationPluginExecutionError(t, "beforeCloseFederatedQueueConsumer");
+               ActiveMQServerLogger.LOGGER.federationPluginExecutionError("beforeCloseFederatedQueueConsumer", t);
                throw new IllegalStateException(t.getMessage(), t.getCause());
             }
          }
@@ -157,7 +157,7 @@ public abstract class FederatedAbstract implements ActiveMQServerBasePlugin {
             try {
                server.callBrokerFederationPlugins(plugin -> plugin.afterCloseFederatedQueueConsumer(remoteQueueConsumer));
             } catch (ActiveMQException t) {
-               ActiveMQServerLogger.LOGGER.federationPluginExecutionError(t, "afterCloseFederatedQueueConsumer");
+               ActiveMQServerLogger.LOGGER.federationPluginExecutionError("afterCloseFederatedQueueConsumer", t);
                throw new IllegalStateException(t.getMessage(), t.getCause());
             }
          }
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/federation/FederatedQueueConsumerImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/federation/FederatedQueueConsumerImpl.java
index aefa889c33..115215f7d5 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/federation/FederatedQueueConsumerImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/federation/FederatedQueueConsumerImpl.java
@@ -202,7 +202,7 @@ public class FederatedQueueConsumerImpl implements FederatedQueueConsumer, Sessi
             try {
                server.callBrokerFederationPlugins(plugin -> plugin.beforeFederatedQueueConsumerMessageHandled(this, clientMessage));
             } catch (ActiveMQException t) {
-               ActiveMQServerLogger.LOGGER.federationPluginExecutionError(t, "beforeFederatedQueueConsumerMessageHandled");
+               ActiveMQServerLogger.LOGGER.federationPluginExecutionError("beforeFederatedQueueConsumerMessageHandled", t);
                throw new IllegalStateException(t.getMessage(), t.getCause());
             }
          }
@@ -217,12 +217,12 @@ public class FederatedQueueConsumerImpl implements FederatedQueueConsumer, Sessi
             try {
                server.callBrokerFederationPlugins(plugin -> plugin.afterFederatedQueueConsumerMessageHandled(this, clientMessage));
             } catch (ActiveMQException t) {
-               ActiveMQServerLogger.LOGGER.federationPluginExecutionError(t, "afterFederatedQueueConsumerMessageHandled");
+               ActiveMQServerLogger.LOGGER.federationPluginExecutionError("afterFederatedQueueConsumerMessageHandled", t);
                throw new IllegalStateException(t.getMessage(), t.getCause());
             }
          }
       } catch (Exception e) {
-         ActiveMQServerLogger.LOGGER.federationDispatchError(e, clientMessage.toString());
+         ActiveMQServerLogger.LOGGER.federationDispatchError(clientMessage.toString(), e);
          try {
             clientSession.rollback();
          } catch (ActiveMQException e1) {
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/federation/address/FederatedAddress.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/federation/address/FederatedAddress.java
index a7218edb9e..2d75acb9ed 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/federation/address/FederatedAddress.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/federation/address/FederatedAddress.java
@@ -124,7 +124,7 @@ public class FederatedAddress extends FederatedAbstract implements ActiveMQServe
                conditionalCreate.set(conditionalCreate.get() && plugin.federatedAddressConditionalCreateConsumer(queue));
             });
          } catch (ActiveMQException t) {
-            ActiveMQServerLogger.LOGGER.federationPluginExecutionError(t, "federatedAddressConditionalCreateConsumer");
+            ActiveMQServerLogger.LOGGER.federationPluginExecutionError("federatedAddressConditionalCreateConsumer", t);
             throw new IllegalStateException(t.getMessage(), t.getCause());
          }
          if (!conditionalCreate.get()) {
@@ -145,7 +145,7 @@ public class FederatedAddress extends FederatedAbstract implements ActiveMQServe
                .stream().filter(binding -> binding instanceof DivertBinding)
                .forEach(this::afterAddBinding);
          } catch (Exception e) {
-            ActiveMQServerLogger.LOGGER.federationBindingsLookupError(e, addressInfo.getName());
+            ActiveMQServerLogger.LOGGER.federationBindingsLookupError(addressInfo.getName(), e);
          }
       }
    }
@@ -184,7 +184,7 @@ public class FederatedAddress extends FederatedAbstract implements ActiveMQServe
                      .stream().filter(b -> b instanceof QueueBinding).map(b -> (QueueBinding) b)
                      .forEach(queueBinding -> conditionalCreateRemoteConsumer(divertBinding, matchingQueues, queueBinding));
                } catch (Exception e) {
-                  ActiveMQServerLogger.LOGGER.federationBindingsLookupError(e, forwardAddress);
+                  ActiveMQServerLogger.LOGGER.federationBindingsLookupError(forwardAddress, e);
                }
             }
          }
@@ -199,7 +199,7 @@ public class FederatedAddress extends FederatedAbstract implements ActiveMQServe
                conditionalCreate.set(conditionalCreate.get() && plugin.federatedAddressConditionalCreateDivertConsumer(divertBinding, queueBinding));
             });
          } catch (ActiveMQException t) {
-            ActiveMQServerLogger.LOGGER.federationPluginExecutionError(t, "federatedAddressConditionalCreateDivertConsumer");
+            ActiveMQServerLogger.LOGGER.federationPluginExecutionError("federatedAddressConditionalCreateDivertConsumer", t);
             throw new IllegalStateException(t.getMessage(), t.getCause());
          }
          if (!conditionalCreate.get()) {
@@ -266,7 +266,7 @@ public class FederatedAddress extends FederatedAbstract implements ActiveMQServe
                         .forEach(queueBinding -> removeRemoteConsumer(getKey(addressInfo)));
                   }
                } catch (Exception e) {
-                  ActiveMQServerLogger.LOGGER.federationBindingsLookupError(e, forwardAddress);
+                  ActiveMQServerLogger.LOGGER.federationBindingsLookupError(forwardAddress, e);
                }
             }
          }
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/federation/queue/FederatedQueue.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/federation/queue/FederatedQueue.java
index 22e03a3bb4..3bc58f4bee 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/federation/queue/FederatedQueue.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/federation/queue/FederatedQueue.java
@@ -122,7 +122,7 @@ public class FederatedQueue extends FederatedAbstract implements ActiveMQServerC
                conditionalCreate.set(conditionalCreate.get() && plugin.federatedQueueConditionalCreateConsumer(consumer));
             });
          } catch (ActiveMQException t) {
-            ActiveMQServerLogger.LOGGER.federationPluginExecutionError(t, "federatedQueueConditionalCreateConsumer");
+            ActiveMQServerLogger.LOGGER.federationPluginExecutionError("federatedQueueConditionalCreateConsumer", t);
             throw new IllegalStateException(t.getMessage(), t.getCause());
          }
          if (!conditionalCreate.get()) {
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/group/impl/LocalGroupingHandler.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/group/impl/LocalGroupingHandler.java
index 211347ad84..d64105133e 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/group/impl/LocalGroupingHandler.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/group/impl/LocalGroupingHandler.java
@@ -372,7 +372,7 @@ public final class LocalGroupingHandler extends GroupHandlingAbstract {
                         }
                         storageManager.deleteGrouping(txID, val);
                      } catch (Exception e) {
-                        ActiveMQServerLogger.LOGGER.unableToDeleteGroupBindings(e, val.getGroupId());
+                        ActiveMQServerLogger.LOGGER.unableToDeleteGroupBindings(val.getGroupId(), e);
                      }
                   }
                }
@@ -381,7 +381,7 @@ public final class LocalGroupingHandler extends GroupHandlingAbstract {
                   try {
                      storageManager.commitBindings(txID);
                   } catch (Exception e) {
-                     ActiveMQServerLogger.LOGGER.unableToDeleteGroupBindings(e, SimpleString.toSimpleString("TX:" + txID));
+                     ActiveMQServerLogger.LOGGER.unableToDeleteGroupBindings(SimpleString.toSimpleString("TX:" + txID), e);
                   }
                }
             }
@@ -436,7 +436,7 @@ public final class LocalGroupingHandler extends GroupHandlingAbstract {
                         txID = -1;
                      }
                   } catch (Exception e) {
-                     ActiveMQServerLogger.LOGGER.unableToDeleteGroupBindings(e, groupBinding.getGroupId());
+                     ActiveMQServerLogger.LOGGER.unableToDeleteGroupBindings(groupBinding.getGroupId(), e);
                   }
                }
             }
@@ -445,7 +445,7 @@ public final class LocalGroupingHandler extends GroupHandlingAbstract {
                try {
                   storageManager.commitBindings(txID);
                } catch (Exception e) {
-                  ActiveMQServerLogger.LOGGER.unableToDeleteGroupBindings(e, SimpleString.toSimpleString("TX:" + txID));
+                  ActiveMQServerLogger.LOGGER.unableToDeleteGroupBindings(SimpleString.toSimpleString("TX:" + txID), e);
                }
             }
          }
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
index a1a2450fc8..e4e3eb1be5 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
@@ -1303,7 +1303,7 @@ public class ActiveMQServerImpl implements ActiveMQServer {
          try {
             activation.preStorageClose();
          } catch (Throwable t) {
-            ActiveMQServerLogger.LOGGER.errorStoppingComponent(t, activation.getClass().getName());
+            ActiveMQServerLogger.LOGGER.errorStoppingComponent(activation.getClass().getName(), t);
          }
       }
 
@@ -1313,7 +1313,7 @@ public class ActiveMQServerImpl implements ActiveMQServer {
          try {
             storageManager.stop(criticalIOError, failoverOnServerShutdown);
          } catch (Throwable t) {
-            ActiveMQServerLogger.LOGGER.errorStoppingComponent(t, storageManager.getClass().getName());
+            ActiveMQServerLogger.LOGGER.errorStoppingComponent(storageManager.getClass().getName(), t);
          }
 
       // We stop remotingService before otherwise we may lock the system in case of a critical IO
@@ -1323,7 +1323,7 @@ public class ActiveMQServerImpl implements ActiveMQServer {
          try {
             remotingService.stop(criticalIOError);
          } catch (Throwable t) {
-            ActiveMQServerLogger.LOGGER.errorStoppingComponent(t, remotingService.getClass().getName());
+            ActiveMQServerLogger.LOGGER.errorStoppingComponent(remotingService.getClass().getName(), t);
          }
 
       // Stop the management service after the remoting service to ensure all acceptors are deregistered with JMX
@@ -1332,7 +1332,7 @@ public class ActiveMQServerImpl implements ActiveMQServer {
          try {
             managementService.unregisterServer();
          } catch (Throwable t) {
-            ActiveMQServerLogger.LOGGER.errorStoppingComponent(t, managementService.getClass().getName());
+            ActiveMQServerLogger.LOGGER.errorStoppingComponent(managementService.getClass().getName(), t);
          }
 
       stopComponent(managementService);
@@ -1361,7 +1361,7 @@ public class ActiveMQServerImpl implements ActiveMQServer {
          try {
             securityStore.stop();
          } catch (Throwable t) {
-            ActiveMQServerLogger.LOGGER.errorStoppingComponent(t, securityStore.getClass().getName());
+            ActiveMQServerLogger.LOGGER.errorStoppingComponent(securityStore.getClass().getName(), t);
          }
       }
 
@@ -1390,7 +1390,7 @@ public class ActiveMQServerImpl implements ActiveMQServer {
          try {
             activation.close(failoverOnServerShutdown, restarting);
          } catch (Throwable t) {
-            ActiveMQServerLogger.LOGGER.errorStoppingComponent(t, activation.getClass().getName());
+            ActiveMQServerLogger.LOGGER.errorStoppingComponent(activation.getClass().getName(), t);
          }
       }
 
@@ -1529,7 +1529,7 @@ public class ActiveMQServerImpl implements ActiveMQServer {
             component.stop();
          }
       } catch (Throwable t) {
-         ActiveMQServerLogger.LOGGER.errorStoppingComponent(t, component.getClass().getName());
+         ActiveMQServerLogger.LOGGER.errorStoppingComponent(component.getClass().getName(), t);
       }
    }
 
@@ -4453,7 +4453,7 @@ public class ActiveMQServerImpl implements ActiveMQServer {
                   externalComponent.stop();
                }
             } catch (Exception e) {
-               ActiveMQServerLogger.LOGGER.errorStoppingComponent(e, externalComponent.getClass().getName());
+               ActiveMQServerLogger.LOGGER.errorStoppingComponent(externalComponent.getClass().getName(), e);
             }
          }
       }
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ConnectorsService.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ConnectorsService.java
index 897d27cdce..c9fb20060a 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ConnectorsService.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ConnectorsService.java
@@ -79,7 +79,7 @@ public final class ConnectorsService implements ActiveMQComponent {
          try {
             createService(pair.getB(), pair.getA());
          } catch (Throwable e) {
-            ActiveMQServerLogger.LOGGER.errorStartingConnectorService(e, pair.getB().getConnectorName());
+            ActiveMQServerLogger.LOGGER.errorStartingConnectorService(pair.getB().getConnectorName(), e);
          }
       }
 
@@ -126,7 +126,7 @@ public final class ConnectorsService implements ActiveMQComponent {
          try {
             connector.getValue().stop();
          } catch (Throwable e) {
-            ActiveMQServerLogger.LOGGER.errorStoppingConnectorService(e, connector.getKey());
+            ActiveMQServerLogger.LOGGER.errorStoppingConnectorService(connector.getKey(), e);
          }
       }
       connectors.clear();
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/FileBasedNodeManager.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/FileBasedNodeManager.java
index ec2eefebd6..d33f9b4f09 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/FileBasedNodeManager.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/FileBasedNodeManager.java
@@ -146,7 +146,7 @@ public abstract class FileBasedNodeManager extends NodeManager {
          try {
             fileCreated = serverLockFile.createNewFile();
          } catch (RuntimeException e) {
-            ActiveMQServerLogger.LOGGER.nodeManagerCantOpenFile(e, serverLockFile);
+            ActiveMQServerLogger.LOGGER.nodeManagerCantOpenFile(serverLockFile, e);
             throw e;
          } catch (IOException e) {
             /*
@@ -160,7 +160,7 @@ public abstract class FileBasedNodeManager extends NodeManager {
                count++;
                continue;
             }
-            ActiveMQServerLogger.LOGGER.nodeManagerCantOpenFile(e, serverLockFile);
+            ActiveMQServerLogger.LOGGER.nodeManagerCantOpenFile(serverLockFile, e);
             throw e;
          }
       }
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/PostOfficeJournalLoader.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/PostOfficeJournalLoader.java
index e884e1525b..0ca2af03f5 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/PostOfficeJournalLoader.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/PostOfficeJournalLoader.java
@@ -258,7 +258,7 @@ public class PostOfficeJournalLoader implements JournalLoader {
             try {
                storageManager.deleteMessage(msg.getMessageID());
             } catch (Exception ignored) {
-               ActiveMQServerLogger.LOGGER.journalErrorDeletingMessage(ignored, msg.getMessageID());
+               ActiveMQServerLogger.LOGGER.journalErrorDeletingMessage(msg.getMessageID(), ignored);
             }
          }
       }
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java
index 1362c33fa2..c121f607a3 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java
@@ -2488,7 +2488,7 @@ public class QueueImpl extends CriticalComponentImpl implements Queue {
                   expire(tx, ref, true);
                   refRemoved(ref);
                } catch (Exception e) {
-                  ActiveMQServerLogger.LOGGER.errorExpiringReferencesOnQueue(e, ref);
+                  ActiveMQServerLogger.LOGGER.errorExpiringReferencesOnQueue(ref, e);
                }
             }
 
@@ -3854,7 +3854,7 @@ public class QueueImpl extends CriticalComponentImpl implements Queue {
 
    private void internalErrorProcessing(Consumer consumer, Throwable t, MessageReference reference) {
       synchronized (this) {
-         ActiveMQServerLogger.LOGGER.removingBadConsumer(t, consumer, reference);
+         ActiveMQServerLogger.LOGGER.removingBadConsumer(consumer, reference, t);
          // If the consumer throws an exception we remove the consumer
          try {
             removeConsumer(consumer);
@@ -3896,7 +3896,7 @@ public class QueueImpl extends CriticalComponentImpl implements Queue {
       try {
          status = consumer.handle(reference);
       } catch (Throwable t) {
-         ActiveMQServerLogger.LOGGER.removingBadConsumer(t, consumer, reference);
+         ActiveMQServerLogger.LOGGER.removingBadConsumer(consumer, reference, t);
 
          // If the consumer throws an exception we remove the consumer
          try {
@@ -3988,7 +3988,7 @@ public class QueueImpl extends CriticalComponentImpl implements Queue {
                try {
                   storageManager.deleteMessage(message.getMessageID());
                } catch (Exception e) {
-                  ActiveMQServerLogger.LOGGER.cannotFindMessageOnJournal(e, message.getMessageID());
+                  ActiveMQServerLogger.LOGGER.cannotFindMessageOnJournal(message.getMessageID(), e);
                }
             }
          }
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueManagerImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueManagerImpl.java
index 93e204621e..89dfc3490b 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueManagerImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueManagerImpl.java
@@ -59,7 +59,7 @@ public class QueueManagerImpl extends ReferenceCounterUtil implements QueueManag
       try {
          queue.deleteMatchingReferences(QueueImpl.DEFAULT_FLUSH_LIMIT, null, AckReason.KILLED);
       } catch (Exception e) {
-         ActiveMQServerLogger.LOGGER.failedToPurgeQueue(e, queue.getName());
+         ActiveMQServerLogger.LOGGER.failedToPurgeQueue(queue.getName(), e);
       }
    }
 
@@ -75,7 +75,7 @@ public class QueueManagerImpl extends ReferenceCounterUtil implements QueueManag
       try {
          server.destroyQueue(queueName, null, true, false, false, true);
       } catch (Exception e) {
-         ActiveMQServerLogger.LOGGER.errorRemovingAutoCreatedDestination(e, "queue", queueName);
+         ActiveMQServerLogger.LOGGER.errorRemovingAutoCreatedDestination("queue", queueName, e);
       }
    }
 
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ReplicationBackupActivation.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ReplicationBackupActivation.java
index e8d064ecfa..c31c5d3866 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ReplicationBackupActivation.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ReplicationBackupActivation.java
@@ -483,7 +483,7 @@ public final class ReplicationBackupActivation extends Activation implements Dis
                   }
                } catch (Exception e) {
                   if (restart) {
-                     ActiveMQServerLogger.LOGGER.errorRestartingBackupServer(e, server);
+                     ActiveMQServerLogger.LOGGER.errorRestartingBackupServer(server, e);
                   } else {
                      ActiveMQServerLogger.LOGGER.errorStoppingServer(e);
                   }
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ReplicationPrimaryActivation.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ReplicationPrimaryActivation.java
index 895c2a17e1..e1a09f6e95 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ReplicationPrimaryActivation.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ReplicationPrimaryActivation.java
@@ -342,7 +342,7 @@ public class ReplicationPrimaryActivation extends LiveActivation implements Dist
             try {
                activeMQServer.stop();
             } catch (Exception e) {
-               ActiveMQServerLogger.LOGGER.errorRestartingBackupServer(e, activeMQServer);
+               ActiveMQServerLogger.LOGGER.errorRestartingBackupServer(activeMQServer, e);
             }
          }).start();
       }
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerConsumerImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerConsumerImpl.java
index 8277948d2a..53cf40d80d 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerConsumerImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerConsumerImpl.java
@@ -700,7 +700,7 @@ public class ServerConsumerImpl implements ServerConsumer, ReadyListener {
             pendingLargeMessageDeliverer.finish();
          }
       } catch (Throwable e) {
-         ActiveMQServerLogger.LOGGER.errorResttingLargeMessage(e, largeMessageDeliverer);
+         ActiveMQServerLogger.LOGGER.errorResttingLargeMessage(largeMessageDeliverer, e);
       } finally {
          largeMessageDeliverer = null;
       }
@@ -1454,7 +1454,7 @@ public class ServerConsumerImpl implements ServerConsumer, ReadyListener {
 
                current = null;
             } catch (Exception e) {
-               ActiveMQServerLogger.LOGGER.errorBrowserHandlingMessage(e, current);
+               ActiveMQServerLogger.LOGGER.errorBrowserHandlingMessage(current, e);
                return;
             }
          }
@@ -1488,7 +1488,7 @@ public class ServerConsumerImpl implements ServerConsumer, ReadyListener {
                   break;
                }
             } catch (Exception e) {
-               ActiveMQServerLogger.LOGGER.errorBrowserHandlingMessage(e, ref);
+               ActiveMQServerLogger.LOGGER.errorBrowserHandlingMessage(ref, e);
                break;
             }
          }
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerSessionImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerSessionImpl.java
index 6a4d6d1dfd..a79edc339b 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerSessionImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerSessionImpl.java
@@ -1139,7 +1139,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener {
                logger.debug(e.getMessage(), e);
             }
          } catch (Exception e) {
-            ActiveMQServerLogger.LOGGER.errorRemovingTempQueue(e, bindingName);
+            ActiveMQServerLogger.LOGGER.errorRemovingTempQueue(bindingName, e);
          }
       }
 
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServiceRegistryImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServiceRegistryImpl.java
index 1597e08061..f1325fc950 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServiceRegistryImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServiceRegistryImpl.java
@@ -253,7 +253,7 @@ public class ServiceRegistryImpl implements ServiceRegistry {
             transformer = new RegisteredTransformer(loadClass(transformerConfiguration.getClassName()));
             transformer.init(Collections.unmodifiableMap(transformerConfiguration.getProperties()));
          } catch (Exception e) {
-            throw ActiveMQMessageBundle.BUNDLE.errorCreatingTransformerClass(e, transformerConfiguration.getClassName());
+            throw ActiveMQMessageBundle.BUNDLE.errorCreatingTransformerClass(transformerConfiguration.getClassName(), e);
          }
       }
       return transformer;
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/SharedNothingBackupActivation.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/SharedNothingBackupActivation.java
index cb008da862..0584dbae1c 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/SharedNothingBackupActivation.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/SharedNothingBackupActivation.java
@@ -274,7 +274,7 @@ public final class SharedNothingBackupActivation extends Activation implements R
                            }
                         }
                      } catch (Exception e) {
-                        ActiveMQServerLogger.LOGGER.errorRestartingBackupServer(e, activeMQServer);
+                        ActiveMQServerLogger.LOGGER.errorRestartingBackupServer(activeMQServer, e);
                      }
                   }
                });
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/SharedNothingLiveActivation.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/SharedNothingLiveActivation.java
index 24ed76f354..90145e9dd1 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/SharedNothingLiveActivation.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/SharedNothingLiveActivation.java
@@ -276,7 +276,7 @@ public class SharedNothingLiveActivation extends LiveActivation {
                                           }
                                           activeMQServer.stop();
                                        } catch (Exception e) {
-                                          ActiveMQServerLogger.LOGGER.errorRestartingBackupServer(e, activeMQServer);
+                                          ActiveMQServerLogger.LOGGER.errorRestartingBackupServer(activeMQServer, e);
                                        }
                                     }
                                  });
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/TransientQueueManagerImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/TransientQueueManagerImpl.java
index b982145b62..f03660cde8 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/TransientQueueManagerImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/TransientQueueManagerImpl.java
@@ -48,7 +48,7 @@ public class TransientQueueManagerImpl extends ReferenceCounterUtil implements T
             ActiveMQServerLogger.LOGGER.errorOnDeletingQueue(queueName.toString(), e);
          }
       } catch (Exception e) {
-         ActiveMQServerLogger.LOGGER.errorRemovingTempQueue(e, queueName);
+         ActiveMQServerLogger.LOGGER.errorRemovingTempQueue(queueName, e);
       }
    }
 
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/management/impl/ManagementServiceImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/management/impl/ManagementServiceImpl.java
index f3e36a5182..3c7cda555e 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/management/impl/ManagementServiceImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/management/impl/ManagementServiceImpl.java
@@ -554,7 +554,7 @@ public class ManagementServiceImpl implements ManagementService {
 
             reply.putBooleanProperty(ManagementHelper.HDR_OPERATION_SUCCEEDED, true);
          } catch (Exception e) {
-            ActiveMQServerLogger.LOGGER.managementOperationError(e, operation, resourceName);
+            ActiveMQServerLogger.LOGGER.managementOperationError(operation, resourceName, e);
             reply.putBooleanProperty(ManagementHelper.HDR_OPERATION_SUCCEEDED, false);
             String exceptionMessage;
             if (e instanceof InvocationTargetException) {
@@ -575,7 +575,7 @@ public class ManagementServiceImpl implements ManagementService {
 
                reply.putBooleanProperty(ManagementHelper.HDR_OPERATION_SUCCEEDED, true);
             } catch (Exception e) {
-               ActiveMQServerLogger.LOGGER.managementAttributeError(e, attribute, resourceName);
+               ActiveMQServerLogger.LOGGER.managementAttributeError(attribute, resourceName, e);
                reply.putBooleanProperty(ManagementHelper.HDR_OPERATION_SUCCEEDED, false);
                String exceptionMessage;
                if (e instanceof InvocationTargetException) {
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/transaction/impl/ResourceManagerImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/transaction/impl/ResourceManagerImpl.java
index bba335adaa..3ba9a189a7 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/transaction/impl/ResourceManagerImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/transaction/impl/ResourceManagerImpl.java
@@ -240,7 +240,7 @@ public class ResourceManagerImpl implements ResourceManager {
                try {
                   removedTX = removeTransaction(tx.getXid(), null);
                } catch (ActiveMQException e) {
-                  ActiveMQServerLogger.LOGGER.errorRemovingTX(e, tx.getXid());
+                  ActiveMQServerLogger.LOGGER.errorRemovingTX(tx.getXid(), e);
                }
                if (removedTX != null) {
                   ActiveMQServerLogger.LOGGER.timedOutXID(removedTX.getXid());
@@ -253,7 +253,7 @@ public class ResourceManagerImpl implements ResourceManager {
             try {
                failedTransaction.rollback();
             } catch (Exception e) {
-               ActiveMQServerLogger.LOGGER.errorTimingOutTX(e, failedTransaction.getXid());
+               ActiveMQServerLogger.LOGGER.errorTimingOutTX(failedTransaction.getXid(), e);
             }
          }
       }
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/ActiveMQBasicSecurityManager.java b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/ActiveMQBasicSecurityManager.java
index 47b1ed0e9e..a5b71bfb60 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/ActiveMQBasicSecurityManager.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/ActiveMQBasicSecurityManager.java
@@ -205,7 +205,7 @@ public class ActiveMQBasicSecurityManager implements ActiveMQSecurityManager5, U
             addNewUser(user, password, roles);
          }
       } catch (Exception e) {
-         ActiveMQServerLogger.LOGGER.failedToCreateBootstrapCredentials(e, user);
+         ActiveMQServerLogger.LOGGER.failedToCreateBootstrapCredentials(user, e);
       }
    }
 
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/ReloadableProperties.java b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/ReloadableProperties.java
index 220ca26fb4..a861eabddb 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/ReloadableProperties.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/ReloadableProperties.java
@@ -67,7 +67,7 @@ public class ReloadableProperties {
                logger.debug("Load of: " + key);
             }
          } catch (IOException e) {
-            ActiveMQServerLogger.LOGGER.failedToLoadProperty(e, key.toString(), e.getLocalizedMessage());
+            ActiveMQServerLogger.LOGGER.failedToLoadProperty(key.toString(), e.getLocalizedMessage(), e);
             if (key.isDebug()) {
                logger.debug("Load of: " + key + ", failure exception" + e);
             }
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 a2349c7d01..e9c7d87c27 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
@@ -49,7 +49,7 @@ public interface ActiveMQXARecoveryLogger {
    void recoveryConnectFailed(String s);
 
    @LogMessage(id = 172011, value = "error unbinding {} from JNDI", level = LogMessage.Level.WARN)
-   void jndiUnbindError(@Cause Exception e, String key);
+   void jndiUnbindError(String key, @Cause Exception e);
 
    @LogMessage(id = 172012, value = "JMS Server Manager error", level = LogMessage.Level.WARN)
    void jmsServerError(@Cause Exception e);
@@ -59,18 +59,18 @@ public interface ActiveMQXARecoveryLogger {
 
    @LogMessage(id = 172014, value = "Notified of connection failure in xa recovery connectionFactory for provider {} will attempt reconnect on next pass",
       level = LogMessage.Level.WARN)
-   void xaRecoverConnectionError(@Cause Exception e, ClientSessionFactory csf);
+   void xaRecoverConnectionError(ClientSessionFactory csf, @Cause Exception e);
 
    @LogMessage(id = 172015, value = "Can not connect to {} on auto-generated resource recovery",
       level = LogMessage.Level.WARN)
-   void xaRecoverAutoConnectionError(@Cause Throwable e, XARecoveryConfig csf);
+   void xaRecoverAutoConnectionError(XARecoveryConfig csf, @Cause Throwable e);
 
    @LogMessage(id = 172016, value = "Error in XA Recovery", level = LogMessage.Level.DEBUG)
    void xaRecoveryError(@Cause Exception e);
 
    @LogMessage(id = 172017, value = "Tried to correct invalid \"host\" value \"0.0.0.0\" for \"{}\" connector, but received an exception.",
       level = LogMessage.Level.WARN)
-   void failedToCorrectHost(@Cause Exception e, String name);
+   void failedToCorrectHost(String name, @Cause Exception e);
 
    @LogMessage(id = 172018, value = "Could not start recovery discovery on {}, we will retry every recovery scan until the server is available",
       level = LogMessage.Level.WARN)
diff --git a/artemis-service-extensions/src/main/java/org/apache/activemq/artemis/service/extensions/xa/recovery/ActiveMQXAResourceWrapper.java b/artemis-service-extensions/src/main/java/org/apache/activemq/artemis/service/extensions/xa/recovery/ActiveMQXAResourceWrapper.java
index 28fa5145d4..3e49012344 100644
--- a/artemis-service-extensions/src/main/java/org/apache/activemq/artemis/service/extensions/xa/recovery/ActiveMQXAResourceWrapper.java
+++ b/artemis-service-extensions/src/main/java/org/apache/activemq/artemis/service/extensions/xa/recovery/ActiveMQXAResourceWrapper.java
@@ -216,7 +216,7 @@ public class ActiveMQXAResourceWrapper implements XAResource, SessionFailureList
             logger.debug("being disconnected for server shutdown", me);
          }
       } else {
-         ActiveMQXARecoveryLogger.LOGGER.xaRecoverConnectionError(me, csf);
+         ActiveMQXARecoveryLogger.LOGGER.xaRecoverConnectionError(csf, me);
       }
       close();
    }
@@ -321,7 +321,7 @@ public class ActiveMQXAResourceWrapper implements XAResource, SessionFailureList
                cs = csf.createSession(xaRecoveryConfig.getUsername(), xaRecoveryConfig.getPassword(), true, false, false, false, 1);
             }
          } catch (Throwable e) {
-            ActiveMQXARecoveryLogger.LOGGER.xaRecoverAutoConnectionError(e, xaRecoveryConfig);
+            ActiveMQXARecoveryLogger.LOGGER.xaRecoverAutoConnectionError(xaRecoveryConfig, e);
             if (logger.isDebugEnabled()) {
                logger.debug(e.getMessage(), e);
             }