[ARTEMIS-1228] Log messages without prefixed id code in artemis-rest
This commit is contained in:
parent
59ce313bc5
commit
e6ba3fbc71
|
@ -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);
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue