activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbert...@apache.org
Subject [1/2] activemq-artemis git commit: [ARTEMIS-1225] Log messages without prefixed id code in artemis-ra
Date Mon, 12 Jun 2017 17:38:29 GMT
Repository: activemq-artemis
Updated Branches:
  refs/heads/master 67efdc34a -> 90edd572f


[ARTEMIS-1225] Log messages without prefixed id code in artemis-ra


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/d3010682
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/d3010682
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/d3010682

Branch: refs/heads/master
Commit: d3010682a4121631d4aef86a1b88008ef21995ed
Parents: 67efdc3
Author: Dmitrii Tikhomirov <dtikhomi@redhat.com>
Authored: Sun Jun 11 22:40:54 2017 +0200
Committer: Justin Bertram <jbertram@apache.org>
Committed: Mon Jun 12 12:37:39 2017 -0500

----------------------------------------------------------------------
 .../apache/activemq/artemis/ra/ActiveMQRALogger.java    | 12 ++++++++++++
 .../activemq/artemis/ra/ActiveMQResourceAdapter.java    |  2 +-
 .../activemq/artemis/ra/inflow/ActiveMQActivation.java  |  2 +-
 .../artemis/ra/inflow/ActiveMQMessageHandler.java       |  2 +-
 4 files changed, 15 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/d3010682/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRALogger.java
----------------------------------------------------------------------
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 32316f0..4da4b6c 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
@@ -77,6 +77,10 @@ public interface ActiveMQRALogger extends BasicLogger {
    @Message(id = 151006, value = "Cluster topology change detected. Re-balancing connections
on even {0}.", format = Message.Format.MESSAGE_FORMAT)
    void rebalancingConnections(String event);
 
+   @LogMessage(level = Logger.Level.INFO)
+   @Message(id = 151007, value = "Resource adaptor started", format = Message.Format.MESSAGE_FORMAT)
+   void resourceAdaptorStarted();
+
    @LogMessage(level = Logger.Level.WARN)
    @Message(id = 152001, value = "problem resetting xa session after failure", format = Message.Format.MESSAGE_FORMAT)
    void problemResettingXASession(@Cause Throwable t);
@@ -113,6 +117,14 @@ public interface ActiveMQRALogger extends BasicLogger {
    @Message(id = 152009, value = "Unable to validate properties", format = Message.Format.MESSAGE_FORMAT)
    void unableToValidateProperties(@Cause Exception e);
 
+   @LogMessage(level = Logger.Level.WARN)
+   @Message(id = 152010, value = "Unable to clear the transaction", format = Message.Format.MESSAGE_FORMAT)
+   void unableToClearTheTransaction(@Cause Exception e);
+
+   @LogMessage(level = Logger.Level.WARN)
+   @Message(id = 152011, value = "Unable to close the factory", format = Message.Format.MESSAGE_FORMAT)
+   void unableToCloseFactory(@Cause Throwable e);
+
    @LogMessage(level = Logger.Level.ERROR)
    @Message(id = 154000, value = "Error while creating object Reference.", format = Message.Format.MESSAGE_FORMAT)
    void errorCreatingReference(@Cause Exception e);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/d3010682/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQResourceAdapter.java
----------------------------------------------------------------------
diff --git a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQResourceAdapter.java
b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQResourceAdapter.java
index 36eabeb..a85234e 100644
--- a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQResourceAdapter.java
+++ b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQResourceAdapter.java
@@ -251,7 +251,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable
{
          }
       }
 
-      ActiveMQRALogger.LOGGER.info("Resource adaptor started");
+      ActiveMQRALogger.LOGGER.resourceAdaptorStarted();
    }
 
    /**

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/d3010682/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQActivation.java
----------------------------------------------------------------------
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 2c42779..cb8472a 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
@@ -421,7 +421,7 @@ public class ActiveMQActivation {
             // closing the factory will help making sure pending threads are closed
             factory.close();
          } catch (Throwable e) {
-            ActiveMQRALogger.LOGGER.warn(e);
+            ActiveMQRALogger.LOGGER.unableToCloseFactory(e);
          }
 
          factory = null;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/d3010682/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQMessageHandler.java
----------------------------------------------------------------------
diff --git a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQMessageHandler.java
b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQMessageHandler.java
index 018206c..4ff6357 100644
--- a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQMessageHandler.java
+++ b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQMessageHandler.java
@@ -342,7 +342,7 @@ public class ActiveMQMessageHandler implements MessageHandler, FailoverEventList
                      tx.setRollbackOnly();
                   }
                } catch (Exception e1) {
-                  ActiveMQRALogger.LOGGER.warn("unable to clear the transaction", e1);
+                  ActiveMQRALogger.LOGGER.unableToClearTheTransaction(e1);
                }
             }
 


Mime
View raw message