You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by jb...@apache.org on 2017/06/12 18:02:27 UTC

[1/2] activemq-artemis git commit: This closes #1333

Repository: activemq-artemis
Updated Branches:
  refs/heads/master 59ce313bc -> 50c4039a4


This closes #1333


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

Branch: refs/heads/master
Commit: 50c4039a49cfd4fbbfa379325dc64e8e8d70d4fa
Parents: 59ce313 e6ba3fb
Author: Justin Bertram <jb...@apache.org>
Authored: Mon Jun 12 13:02:14 2017 -0500
Committer: Justin Bertram <jb...@apache.org>
Committed: Mon Jun 12 13:02:14 2017 -0500

----------------------------------------------------------------------
 .../org/apache/activemq/artemis/rest/ActiveMQRestLogger.java | 8 ++++++++
 .../apache/activemq/artemis/rest/queue/push/UriStrategy.java | 2 +-
 .../apache/activemq/artemis/rest/util/HttpMessageHelper.java | 2 +-
 3 files changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------



[2/2] activemq-artemis git commit: [ARTEMIS-1228] Log messages without prefixed id code in artemis-rest

Posted by jb...@apache.org.
[ARTEMIS-1228] Log messages without prefixed id code in artemis-rest


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

Branch: refs/heads/master
Commit: e6ba3fbc71cd9e28ba0581dc69b9940a05332466
Parents: 59ce313
Author: Dmitrii Tikhomirov <dt...@redhat.com>
Authored: Mon Jun 12 15:50:29 2017 +0200
Committer: Justin Bertram <jb...@apache.org>
Committed: Mon Jun 12 13:02:14 2017 -0500

----------------------------------------------------------------------
 .../org/apache/activemq/artemis/rest/ActiveMQRestLogger.java | 8 ++++++++
 .../apache/activemq/artemis/rest/queue/push/UriStrategy.java | 2 +-
 .../apache/activemq/artemis/rest/util/HttpMessageHelper.java | 2 +-
 3 files changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/e6ba3fbc/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/ActiveMQRestLogger.java
----------------------------------------------------------------------
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 524a9fd..dbca778 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
@@ -64,6 +64,14 @@ public interface ActiveMQRestLogger extends BasicLogger {
    @Message(id = 182001, value = "shutdown REST subscription because of timeout for: {0}", format = Message.Format.MESSAGE_FORMAT)
    void shutdownRestSubscription(String id);
 
+   @LogMessage(level = Logger.Level.WARN)
+   @Message(id = 182002, value = "Failed to push message to {0}", format = Message.Format.MESSAGE_FORMAT)
+   void failedToPushMessageToUri(String uri, @Cause Exception e);
+
+   @LogMessage(level = Logger.Level.WARN)
+   @Message(id = 182003, value = "Failed to build Message from object", format = Message.Format.MESSAGE_FORMAT)
+   void failedToBuildMessageFromObject(@Cause Exception e);
+
    @LogMessage(level = Logger.Level.ERROR)
    @Message(id = 184000, value = "Failed to load push store {0}, it is probably corrupted", format = Message.Format.MESSAGE_FORMAT)
    void errorLoadingStore(@Cause Exception e, String name);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/e6ba3fbc/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/queue/push/UriStrategy.java
----------------------------------------------------------------------
diff --git a/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/queue/push/UriStrategy.java b/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/queue/push/UriStrategy.java
index 10c01d6..591c8e2 100644
--- a/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/queue/push/UriStrategy.java
+++ b/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/queue/push/UriStrategy.java
@@ -175,7 +175,7 @@ public class UriStrategy implements PushStrategy {
                }
             }
          } catch (Exception e) {
-            ActiveMQRestLogger.LOGGER.warn("failed to push message to " + uri, e);
+            ActiveMQRestLogger.LOGGER.failedToPushMessageToUri(uri, e);
             return false;
          } finally {
             if (res != null)

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/e6ba3fbc/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/util/HttpMessageHelper.java
----------------------------------------------------------------------
diff --git a/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/util/HttpMessageHelper.java b/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/util/HttpMessageHelper.java
index a6e4c8e..b04ba37 100644
--- a/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/util/HttpMessageHelper.java
+++ b/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/util/HttpMessageHelper.java
@@ -83,7 +83,7 @@ public class HttpMessageHelper {
                ActiveMQRestLogger.LOGGER.debug("**** Building Message from object: " + obj.toString());
                request.body(contentType, obj);
             } catch (Exception e) {
-               ActiveMQRestLogger.LOGGER.warn("Building Message from object", e.getMessage(), e);
+               ActiveMQRestLogger.LOGGER.failedToBuildMessageFromObject(e);
                throw new RuntimeException(e);
             }
          }