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/05/11 13:50:57 UTC
[activemq-artemis] 12/23: progress
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 3e2da3222c843334e9e8ac155b1e08224d53df11
Author: Clebert Suconic <cl...@apache.org>
AuthorDate: Thu May 5 14:45:07 2022 -0400
progress
---
artemis-commons/pom.xml | 2 +-
.../activemq/artemis/logs/ActiveMQUtilBundle.java | 4 +-
.../activemq/artemis/logs/ActiveMQUtilLogger.java | 40 ++---
.../apache/activemq/artemis/logs/AuditLogger.java | 4 +-
artemis-core-client/pom.xml | 2 +-
.../artemis/core/client/ActiveMQClientLogger.java | 175 +++++++++------------
.../core/client/ActiveMQClientMessageBundle.java | 4 +-
.../core/client/impl/ClientProducerImpl.java | 4 +-
.../core/client/impl/ClientSessionImpl.java | 2 +-
.../artemis/core/cluster/DiscoveryGroup.java | 2 +-
.../protocol/core/impl/ActiveMQSessionContext.java | 8 +-
.../remoting/impl/netty/TransportConstants.java | 2 +-
.../impl/ssl/DefaultOpenSSLContextFactory.java | 4 +-
.../impl/ssl/DefaultSSLContextFactory.java | 2 +-
.../activemq/artemis/utils/AutoCreateUtil.java | 6 +-
.../artemis/utils/SoftValueLongObjectHashMap.java | 2 +-
artemis-log-processor/pom.xml | 3 +-
.../artemis/logprocessor/LogProcessor.java | 17 +-
.../{ArtemisBundle.java => LogBundle.java} | 2 +-
.../logprocessor/annotation/LogMessage.java | 7 +-
.../artemis/logprocessor/SimpleBundle.java | 10 +-
pom.xml | 2 +-
22 files changed, 142 insertions(+), 162 deletions(-)
diff --git a/artemis-commons/pom.xml b/artemis-commons/pom.xml
index c77f38add7..6938c51287 100644
--- a/artemis-commons/pom.xml
+++ b/artemis-commons/pom.xml
@@ -56,7 +56,7 @@
<groupId>org.apache.activemq</groupId>
<artifactId>artemis-log-processor</artifactId>
<version>${project.version}</version>
- <!-- <scope>provided</scope> so that it isnt picked up and run by users: it is currently being spread everywhere by artemis-commons -->
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
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 2f9a7303d9..20bf9ea5eb 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
@@ -18,7 +18,7 @@ package org.apache.activemq.artemis.logs;
import org.apache.activemq.artemis.api.core.ActiveMQIllegalStateException;
import org.apache.activemq.artemis.logprocessor.CodeFactory;
-import org.apache.activemq.artemis.logprocessor.annotation.ArtemisBundle;
+import org.apache.activemq.artemis.logprocessor.annotation.LogBundle;
import org.apache.activemq.artemis.logprocessor.annotation.Message;
/**
@@ -28,7 +28,7 @@ import org.apache.activemq.artemis.logprocessor.annotation.Message;
*
* so 209000 to 209999
*/
-@ArtemisBundle(projectCode = "AMQ")
+@LogBundle(projectCode = "AMQ")
public interface ActiveMQUtilBundle {
ActiveMQUtilBundle BUNDLE = CodeFactory.getCodeClass(ActiveMQUtilBundle.class);
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 e85bfda34f..725ce0ea8d 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
@@ -17,13 +17,13 @@
package org.apache.activemq.artemis.logs;
import org.apache.activemq.artemis.logprocessor.CodeFactory;
-import org.apache.activemq.artemis.logprocessor.annotation.ArtemisBundle;
+import org.apache.activemq.artemis.logprocessor.annotation.LogBundle;
import org.apache.activemq.artemis.logprocessor.annotation.LogMessage;
/**
* Logger Code 20
*/
-@ArtemisBundle(projectCode = "AMQ")
+@LogBundle(projectCode = "AMQ")
public interface ActiveMQUtilLogger {
ActiveMQUtilLogger LOGGER = CodeFactory.getCodeClass(ActiveMQUtilLogger.class);
@@ -31,57 +31,57 @@ public interface ActiveMQUtilLogger {
@LogMessage(id = 201000, value = "Network is healthy, starting service {0}", level = LogMessage.Level.INFO)
void startingService(String component);
- @LogMessage(id = 201001, value = "Network is unhealthy, stopping service {0}")
+ @LogMessage(id = 201001, value = "Network is unhealthy, stopping service {0}", level = LogMessage.Level.WARN)
void stoppingService(String component);
- @LogMessage(id = 202000, value = "Missing privileges to set Thread Context Class Loader on Thread Factory. Using current Thread Context Class Loader")
+ @LogMessage(id = 202000, value = "Missing privileges to set Thread Context Class Loader on Thread Factory. Using current Thread Context Class Loader", level = LogMessage.Level.WARN)
void missingPrivsForClassloader();
- @LogMessage(id = 202001, value = "{0} is a loopback address and will be discarded.")
+ @LogMessage(id = 202001, value = "{0} is a loopback address and will be discarded.", level = LogMessage.Level.WARN)
void addressloopback(String address);
- @LogMessage(id = 202002, value = "Ping Address {0} wasn't reacheable.")
+ @LogMessage(id = 202002, value = "Ping Address {0} wasn't reacheable.", level = LogMessage.Level.WARN)
void addressWasntReacheable(String address);
- @LogMessage(id = 202003, value = "Ping Url {0} wasn't reacheable.")
+ @LogMessage(id = 202003, value = "Ping Url {0} wasn't reacheable.", level = LogMessage.Level.WARN)
void urlWasntReacheable(String url);
- @LogMessage(id = 202004, value = "Error starting component {0} ")
+ @LogMessage(id = 202004, value = "Error starting component {0} ", level = LogMessage.Level.WARN)
void errorStartingComponent(Exception e, String component);
- @LogMessage(id = 202005, value = "Error stopping component {0} ")
+ @LogMessage(id = 202005, value = "Error stopping component {0} ", level = LogMessage.Level.WARN)
void errorStoppingComponent(Exception e, String component);
- @LogMessage(id = 202006, value = "Failed to check Url {0}.")
+ @LogMessage(id = 202006, value = "Failed to check Url {0}.", level = LogMessage.Level.WARN)
void failedToCheckURL(Exception e, String url);
- @LogMessage(id = 202007, value = "Failed to check Address {0}.")
+ @LogMessage(id = 202007, value = "Failed to check Address {0}.", level = LogMessage.Level.WARN)
void failedToCheckAddress(Exception e, String address);
- @LogMessage(id = 202008, value = "Failed to check Address list {0}.")
+ @LogMessage(id = 202008, value = "Failed to check Address list {0}.", level = LogMessage.Level.WARN)
void failedToParseAddressList(Exception e, String addressList);
- @LogMessage(id = 202009, value = "Failed to check Url list {0}.")
+ @LogMessage(id = 202009, value = "Failed to check Url list {0}.", level = LogMessage.Level.WARN)
void failedToParseUrlList(Exception e, String urlList);
- @LogMessage(id = 202010, value = "Failed to set NIC {0}.")
+ @LogMessage(id = 202010, value = "Failed to set NIC {0}.", level = LogMessage.Level.WARN)
void failedToSetNIC(Exception e, String nic);
- @LogMessage(id = 202011, value = "Failed to read from stream {0}.")
+ @LogMessage(id = 202011, value = "Failed to read from stream {0}.", level = LogMessage.Level.WARN)
void failedToReadFromStream(String stream);
- @LogMessage(id = 202012, value = "Object cannot be serialized.")
+ @LogMessage(id = 202012, value = "Object cannot be serialized.", level = LogMessage.Level.WARN)
void failedToSerializeObject(Exception e);
- @LogMessage(id = 202013, value = "Unable to deserialize object.")
+ @LogMessage(id = 202013, value = "Unable to deserialize object.", level = LogMessage.Level.WARN)
void failedToDeserializeObject(Exception e);
- @LogMessage(id = 202014, value = "Unable to encode byte array into Base64 notation.")
+ @LogMessage(id = 202014, value = "Unable to encode byte array into Base64 notation.", level = LogMessage.Level.WARN)
void failedToEncodeByteArrayToBase64Notation(Exception e);
- @LogMessage(id = 202015, value = "Failed to clean up file {0}")
+ @LogMessage(id = 202015, value = "Failed to clean up file {0}", level = LogMessage.Level.WARN)
void failedToCleanupFile(String file);
- @LogMessage(id = 202016, value = "Could not list files to clean up in {0}")
+ @LogMessage(id = 202016, value = "Could not list files to clean up in {0}", level = LogMessage.Level.WARN)
void failedListFilesToCleanup(String path);
}
diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/logs/AuditLogger.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/logs/AuditLogger.java
index 17de6a5130..bf3866168b 100644
--- a/artemis-commons/src/main/java/org/apache/activemq/artemis/logs/AuditLogger.java
+++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/logs/AuditLogger.java
@@ -17,7 +17,7 @@
package org.apache.activemq.artemis.logs;
import org.apache.activemq.artemis.logprocessor.CodeFactory;
-import org.apache.activemq.artemis.logprocessor.annotation.ArtemisBundle;
+import org.apache.activemq.artemis.logprocessor.annotation.LogBundle;
import org.apache.activemq.artemis.logprocessor.annotation.GetLogger;
import org.apache.activemq.artemis.logprocessor.annotation.LogMessage;
import org.slf4j.Logger;
@@ -32,7 +32,7 @@ import java.util.Set;
/**
* Logger Code 60
*/
-@ArtemisBundle(projectCode = "AMQ")
+@LogBundle(projectCode = "AMQ")
public interface AuditLogger {
AuditLogger BASE_LOGGER = CodeFactory.getCodeClass(AuditLogger.class, "org.apache.activemq.audit.base");
diff --git a/artemis-core-client/pom.xml b/artemis-core-client/pom.xml
index 6f74ef8386..0ca36f3977 100644
--- a/artemis-core-client/pom.xml
+++ b/artemis-core-client/pom.xml
@@ -37,7 +37,7 @@
<groupId>org.apache.activemq</groupId>
<artifactId>artemis-log-processor</artifactId>
<version>${project.version}</version>
- <!-- <scope>provided</scope> so that it isnt picked up and run by users: it is currently being spread everywhere by artemis-commons -->
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
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 88ee9e7df7..6c6d0cf248 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
@@ -22,14 +22,14 @@ import org.apache.activemq.artemis.api.core.ActiveMQExceptionType;
import org.apache.activemq.artemis.api.core.Interceptor;
import org.apache.activemq.artemis.core.protocol.core.Packet;
import org.apache.activemq.artemis.logprocessor.CodeFactory;
-import org.apache.activemq.artemis.logprocessor.annotation.ArtemisBundle;
+import org.apache.activemq.artemis.logprocessor.annotation.LogBundle;
import org.apache.activemq.artemis.logprocessor.annotation.LogMessage;
import org.w3c.dom.Node;
/**
* Logger Code 21
*/
-@ArtemisBundle(projectCode = "AMQ")
+@LogBundle(projectCode = "AMQ")
public interface ActiveMQClientLogger {
/**
@@ -37,151 +37,149 @@ public interface ActiveMQClientLogger {
*/
ActiveMQClientLogger LOGGER = CodeFactory.getCodeClass(ActiveMQClientLogger.class);
- @LogMessage(id = 212001, value = "Error on clearing messages")
+ @LogMessage(id = 212001, value = "Error on clearing messages", level = LogMessage.Level.WARN)
void errorClearingMessages(Throwable e);
- @LogMessage(id = 212002, value = "Timed out waiting for handler to complete processing")
+ @LogMessage(id = 212002, value = "Timed out waiting for handler to complete processing", level = LogMessage.Level.WARN)
void timeOutWaitingForProcessing();
- @LogMessage(id = 212003, value = "Unable to close session")
+ @LogMessage(id = 212003, value = "Unable to close session", level = LogMessage.Level.WARN)
void unableToCloseSession(Exception e);
- @LogMessage(id = 212004, value = "Failed to connect to server.")
+ @LogMessage(id = 212004, value = "Failed to connect to server.", level = LogMessage.Level.WARN)
void failedToConnectToServer();
- @LogMessage(id = 212005, value = "Tried {0} times to connect. Now giving up on reconnecting it.")
+ @LogMessage(id = 212005, value = "Tried {0} times to connect. Now giving up on reconnecting it.", level = LogMessage.Level.WARN)
void failedToConnectToServer(Integer reconnectAttempts);
- @LogMessage(id = 212007, value = "connector.create or connectorFactory.createConnector should never throw an exception, implementation is badly behaved, but we will deal with it anyway.")
+ @LogMessage(id = 212007, value = "connector.create or connectorFactory.createConnector should never throw an exception, implementation is badly behaved, but we will deal with it anyway.", level = LogMessage.Level.WARN)
void createConnectorException(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! {0}")
+ @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! {0}", level = LogMessage.Level.WARN)
void factoryLeftOpen(Exception e, int i);
- @LogMessage(id = 212009, value = "resetting session after failure")
+ @LogMessage(id = 212009, value = "resetting session after failure", level = LogMessage.Level.WARN)
void resettingSessionAfterFailure();
- @LogMessage(id = 212010, value = "Server is starting, retry to create the session {0}")
+ @LogMessage(id = 212010, value = "Server is starting, retry to create the session {0}", level = LogMessage.Level.WARN)
void retryCreateSessionSeverStarting(String name);
- @LogMessage(id = 212011, value = "committing transaction after failover occurred, any non persistent messages may be lost")
+ @LogMessage(id = 212011, value = "committing transaction after failover occurred, any non persistent messages may be lost", level = LogMessage.Level.WARN)
void commitAfterFailover();
- @LogMessage(id = 212012, value = "failure occurred during commit throwing XAException")
+ @LogMessage(id = 212012, value = "failure occurred during commit throwing XAException", level = LogMessage.Level.WARN)
void failoverDuringCommit();
- @LogMessage(id = 212014, value = "failover occurred during prepare rolling back")
+ @LogMessage(id = 212014, value = "failover occurred during prepare rolling back", level = LogMessage.Level.WARN)
void failoverDuringPrepareRollingBack();
- @LogMessage(id = 212015, value = "failover occurred during prepare rolling back")
+ @LogMessage(id = 212015, value = "failover occurred during prepare rolling back", level = LogMessage.Level.WARN)
void errorDuringPrepare(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! {0}")
+ @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! {0}", level = LogMessage.Level.WARN)
void clientSessionNotClosed(Exception e, int identity);
- @LogMessage(id = 212017, value = "error adding packet")
+ @LogMessage(id = 212017, value = "error adding packet", level = LogMessage.Level.WARN)
void errorAddingPacket(Exception e);
- @LogMessage(id = 212018, value = "error calling cancel")
+ @LogMessage(id = 212018, value = "error calling cancel", level = LogMessage.Level.WARN)
void errorCallingCancel(Exception e);
- @LogMessage(id = 212019, value = "error reading index")
+ @LogMessage(id = 212019, value = "error reading index", level = LogMessage.Level.WARN)
void errorReadingIndex(Exception e);
- @LogMessage(id = 212020, value = "error setting index")
+ @LogMessage(id = 212020, value = "error setting index", level = LogMessage.Level.WARN)
void errorSettingIndex(Exception e);
- @LogMessage(id = 212021, value = "error resetting index")
+ @LogMessage(id = 212021, value = "error resetting index", level = LogMessage.Level.WARN)
void errorReSettingIndex(Exception e);
- @LogMessage(id = 212022, value = "error reading LargeMessage file cache")
+ @LogMessage(id = 212022, value = "error reading LargeMessage file cache", level = LogMessage.Level.WARN)
void errorReadingCache(Exception e);
- @LogMessage(id = 212023, value = "error closing LargeMessage file cache")
+ @LogMessage(id = 212023, value = "error closing LargeMessage file cache", level = LogMessage.Level.WARN)
void errorClosingCache(Exception e);
- @LogMessage(id = 212024, value = "Exception during finalization for LargeMessage file cache")
+ @LogMessage(id = 212024, value = "Exception during finalization for LargeMessage file cache", level = LogMessage.Level.WARN)
void errorFinalisingCache(Exception e);
- @LogMessage(id = 212025, value = "did not connect the cluster connection to other nodes")
+ @LogMessage(id = 212025, value = "did not connect the cluster connection to other nodes", level = LogMessage.Level.WARN)
void errorConnectingToNodes(Exception e);
- @LogMessage(id = 212026, value = "Timed out waiting for pool to terminate")
+ @LogMessage(id = 212026, value = "Timed out waiting for pool to terminate", level = LogMessage.Level.WARN)
void timedOutWaitingForTermination();
- @LogMessage(id = 212027, value = "Timed out waiting for scheduled pool to terminate")
+ @LogMessage(id = 212027, value = "Timed out waiting for scheduled pool to terminate", level = LogMessage.Level.WARN)
void timedOutWaitingForScheduledPoolTermination();
- @LogMessage(id = 212028, value = "error starting server locator")
+ @LogMessage(id = 212028, value = "error starting server locator", level = LogMessage.Level.WARN)
void errorStartingLocator(Exception e);
- @LogMessage(id = 212029, value = "Closing a Server Locator left open. Please make sure you close all Server Locators explicitly before letting them go out of scope! {0}", level = LogMessage.Level.DEBUG)
- void deletemeserverLocatorNotClosed(Exception e, int identity);
@LogMessage(id = 212030, value = "error sending topology", level = LogMessage.Level.WARN)
void errorSendingTopology(Throwable e);
- @LogMessage(id = 212031, value = "error sending topology")
+ @LogMessage(id = 212031, value = "error sending topology", level = LogMessage.Level.WARN)
void errorSendingTopologyNodedown(Throwable e);
- @LogMessage(id = 212032, value = "Timed out waiting to stop discovery thread")
+ @LogMessage(id = 212032, value = "Timed out waiting to stop discovery thread", level = LogMessage.Level.WARN)
void timedOutStoppingDiscovery();
- @LogMessage(id = 212033, value = "unable to send notification when discovery group is stopped")
+ @LogMessage(id = 212033, value = "unable to send notification when discovery group is stopped", level = LogMessage.Level.WARN)
void errorSendingNotifOnDiscoveryStop(Throwable e);
- @LogMessage(id = 212034, value = "There are more than one servers on the network broadcasting the same node id. " + "You will see this message exactly once (per node) if a node is restarted, in which case it can be safely " + "ignored. But if it is logged continuously it means you really do have more than one node on the same network " + "active concurrently with the same node id. This could occur if you have a backup node active at the same time as " + "its live node. nodeID={0}")
+ @LogMessage(id = 212034, value = "There are more than one servers on the network broadcasting the same node id. " + "You will see this message exactly once (per node) if a node is restarted, in which case it can be safely " + "ignored. But if it is logged continuously it means you really do have more than one node on the same network " + "active concurrently with the same node id. This could occur if you have a backup node active at the same time as " + "its live node. nodeID={0}", le [...]
void multipleServersBroadcastingSameNode(String nodeId);
- @LogMessage(id = 212035, value = "error receiving packet in discovery")
+ @LogMessage(id = 212035, value = "error receiving packet in discovery", level = LogMessage.Level.WARN)
void errorReceivingPacketInDiscovery(Throwable e);
- @LogMessage(id = 212036, value = "Can not find packet to clear: {0} last received command id first stored command id {1}")
+ @LogMessage(id = 212036, value = "Can not find packet to clear: {0} last received command id first stored command id {1}", level = LogMessage.Level.WARN)
void cannotFindPacketToClear(Integer lastReceivedCommandID, Integer firstStoredCommandID);
- @LogMessage(id = 212037, value = "Connection failure to {0} has been detected: {1} [code={2}]")
+ @LogMessage(id = 212037, value = "Connection failure to {0} has been detected: {1} [code={2}]", level = LogMessage.Level.WARN)
void connectionFailureDetected(String remoteAddress, String message, ActiveMQExceptionType type);
- @LogMessage(id = 212038, value = "Failure in calling interceptor: {0}")
+ @LogMessage(id = 212038, value = "Failure in calling interceptor: {0}", level = LogMessage.Level.WARN)
void errorCallingInterceptor(Throwable e, Interceptor interceptor);
- @LogMessage(id = 212040, value = "Timed out waiting for netty ssl close future to complete")
+ @LogMessage(id = 212040, value = "Timed out waiting for netty ssl close future to complete", level = LogMessage.Level.WARN)
void timeoutClosingSSL();
- @LogMessage(id = 212041, value = "Timed out waiting for netty channel to close")
+ @LogMessage(id = 212041, value = "Timed out waiting for netty channel to close", level = LogMessage.Level.WARN)
void timeoutClosingNettyChannel();
- @LogMessage(id = 212042, value = "Timed out waiting for packet to be flushed")
+ @LogMessage(id = 212042, value = "Timed out waiting for packet to be flushed", level = LogMessage.Level.WARN)
void timeoutFlushingPacket();
- @LogMessage(id = 212043, value = "Property {0} must be an Integer, it is {1}")
+ @LogMessage(id = 212043, value = "Property {0} must be an Integer, it is {1}", level = LogMessage.Level.WARN)
void propertyNotInteger(String propName, String name);
- @LogMessage(id = 212044, value = "Property {0} must be a Long, it is {1}")
+ @LogMessage(id = 212044, value = "Property {0} must be a Long, it is {1}", level = LogMessage.Level.WARN)
void propertyNotLong(String propName, String name);
- @LogMessage(id = 212045, value = "Property {0} must be a Boolean, it is {1}")
+ @LogMessage(id = 212045, value = "Property {0} must be a Boolean, it is {1}", level = LogMessage.Level.WARN)
void propertyNotBoolean(String propName, String name);
- @LogMessage(id = 212046, value = "Cannot find activemq-version.properties on classpath: {0}")
+ @LogMessage(id = 212046, value = "Cannot find activemq-version.properties on classpath: {0}", level = LogMessage.Level.WARN)
void noVersionOnClasspath(String classpath);
- @LogMessage(id = 212047, value = "Warning: JVM allocated more data what would make results invalid {0}:{1}")
+ @LogMessage(id = 212047, value = "Warning: JVM allocated more data what would make results invalid {0}:{1}", level = LogMessage.Level.WARN)
void jvmAllocatedMoreMemory(Long totalMemory1, Long totalMemory2);
- @LogMessage(id = 212048, value = "Random address ({0}) was already in use, trying another time")
+ @LogMessage(id = 212048, value = "Random address ({0}) was already in use, trying another time", level = LogMessage.Level.WARN)
void broadcastGroupBindErrorRetry(String hostAndPort, Throwable t);
- @LogMessage(id = 212049, value = "Could not bind to {0} ({1} address); " + "make sure your discovery group-address is of the same type as the IP stack (IPv4 or IPv6)." + "\nIgnoring discovery group-address, but this may lead to cross talking.")
+ @LogMessage(id = 212049, value = "Could not bind to {0} ({1} address); " + "make sure your discovery group-address is of the same type as the IP stack (IPv4 or IPv6)." + "\nIgnoring discovery group-address, but this may lead to cross talking.", level = LogMessage.Level.WARN)
void ioDiscoveryError(String hostAddress, String s);
- @LogMessage(id = 212050, value = "Compressed large message tried to read {0} bytes from stream {1}")
+ @LogMessage(id = 212050, value = "Compressed large message tried to read {0} bytes from stream {1}", level = LogMessage.Level.WARN)
void compressedLargeMessageError(int length, int nReadBytes);
- @LogMessage(id = 212051, value = "Invalid concurrent session usage. Sessions are not supposed to be used by more than one thread concurrently.")
+ @LogMessage(id = 212051, value = "Invalid concurrent session usage. Sessions are not supposed to be used by more than one thread concurrently.", level = LogMessage.Level.WARN)
void invalidConcurrentSessionUsage(Throwable t);
- @LogMessage(id = 212052, value = "Packet {0} was answered out of sequence due to a previous server timeout and it''s being ignored")
+ @LogMessage(id = 212052, value = "Packet {0} was answered out of sequence due to a previous server timeout and it''s being ignored", level = LogMessage.Level.WARN)
void packetOutOfOrder(Object obj, Throwable t);
/**
@@ -189,85 +187,82 @@ public interface ActiveMQClientLogger {
* confirmations disabled (confirmationWindowSize=-1).
*/
- @LogMessage(id = 212053, value = "CompletionListener/SendAcknowledgementHandler used with confirmationWindowSize=-1. Enable confirmationWindowSize to receive acks from server!")
+ @LogMessage(id = 212053, value = "CompletionListener/SendAcknowledgementHandler used with confirmationWindowSize=-1. Enable confirmationWindowSize to receive acks from server!", level = LogMessage.Level.WARN)
void confirmationWindowDisabledWarning();
- @LogMessage(id = 212054, value = "Destination address={0} is blocked. If the system is configured to block make sure you consume messages on this configuration.")
+ @LogMessage(id = 212054, value = "Destination address={0} is blocked. If the system is configured to block make sure you consume messages on this configuration.", level = LogMessage.Level.WARN)
void outOfCreditOnFlowControl(String address);
- @LogMessage(id = 212055, value = "Unable to close consumer")
+ @LogMessage(id = 212055, value = "Unable to close consumer", level = LogMessage.Level.WARN)
void unableToCloseConsumer(Exception e);
- @LogMessage(id = 212056, value = "local-bind-address specified for broadcast group but no local-bind-port. Using random port for UDP Broadcast ({0})")
+ @LogMessage(id = 212056, value = "local-bind-address specified for broadcast group but no local-bind-port. Using random port for UDP Broadcast ({0})", level = LogMessage.Level.WARN)
void broadcastGroupBindError(String hostAndPort);
- @LogMessage(id = 212057, value = "Large Message Streaming is taking too long to flush on back pressure.")
+ @LogMessage(id = 212057, value = "Large Message Streaming is taking too long to flush on back pressure.", level = LogMessage.Level.WARN)
void timeoutStreamingLargeMessage();
- @LogMessage(id = 212058, value = "Unable to get a message.")
+ @LogMessage(id = 212058, value = "Unable to get a message.", level = LogMessage.Level.WARN)
void unableToGetMessage(Exception e);
- @LogMessage(id = 212059, value = "Failed to clean up: {0} ")
+ @LogMessage(id = 212059, value = "Failed to clean up: {0} ", level = LogMessage.Level.WARN)
void failedCleaningUp(String target);
- @LogMessage(id = 212060, value = "Unexpected null data received from DiscoveryEndpoint ")
+ @LogMessage(id = 212060, value = "Unexpected null data received from DiscoveryEndpoint ", level = LogMessage.Level.WARN)
void unexpectedNullDataReceived();
- @LogMessage(id = 212061, value = "Failed to perform force close ")
+ @LogMessage(id = 212061, value = "Failed to perform force close ", level = LogMessage.Level.WARN)
void failedForceClose(Throwable e);
- @LogMessage(id = 212062, value = "Failed to perform post actions on message processing ")
+ @LogMessage(id = 212062, value = "Failed to perform post actions on message processing ", level = LogMessage.Level.WARN)
void failedPerformPostActionsOnMessage(Exception e);
- @LogMessage(id = 212063, value = "Unable to handle connection failure ")
+ @LogMessage(id = 212063, value = "Unable to handle connection failure ", level = LogMessage.Level.WARN)
void unableToHandleConnectionFailure(Throwable e);
- @LogMessage(id = 212064, value = "Unable to receive cluster topology ")
+ @LogMessage(id = 212064, value = "Unable to receive cluster topology ", level = LogMessage.Level.WARN)
void unableToReceiveClusterTopology(Throwable e);
- @LogMessage(id = 212065, value = "{0} getting exception when receiving broadcasting ")
+ @LogMessage(id = 212065, value = "{0} getting exception when receiving broadcasting ", level = LogMessage.Level.WARN)
void unableToReceiveBroadcast(Exception e, String target);
- @LogMessage(id = 212066, value = "failed to parse int property ")
+ @LogMessage(id = 212066, value = "failed to parse int property ", level = LogMessage.Level.WARN)
void unableToParseValue(Throwable e);
- @LogMessage(id = 212067, value = "failed to get system property ")
+ @LogMessage(id = 212067, value = "failed to get system property ", level = LogMessage.Level.WARN)
void unableToGetProperty(Throwable e);
- @LogMessage(id = 212068, value = "Couldn't finish the client globalThreadPool in less than 10 seconds, interrupting it now ")
+ @LogMessage(id = 212068, value = "Couldn't finish the client globalThreadPool in less than 10 seconds, interrupting it now ", level = LogMessage.Level.WARN)
void unableToProcessGlobalThreadPoolIn10Sec();
- @LogMessage(id = 212069, value = "Couldn't finish the client scheduled in less than 10 seconds, interrupting it now ")
+ @LogMessage(id = 212069, value = "Couldn't finish the client scheduled in less than 10 seconds, interrupting it now ", level = LogMessage.Level.WARN)
void unableToProcessScheduledlIn10Sec();
- @LogMessage(id = 212070, value = "Unable to initialize VersionLoader ")
+ @LogMessage(id = 212070, value = "Unable to initialize VersionLoader ", level = LogMessage.Level.WARN)
void unableToInitVersionLoader(Throwable e);
- @LogMessage(id = 212071, value = "Unable to check Epoll availability ")
+ @LogMessage(id = 212071, value = "Unable to check Epoll availability ", level = LogMessage.Level.WARN)
void unableToCheckEpollAvailability(Throwable e);
- @LogMessage(id = 212072, value = "Failed to change channel state to ReadyForWriting ")
+ @LogMessage(id = 212072, value = "Failed to change channel state to ReadyForWriting ", level = LogMessage.Level.WARN)
void failedToSetChannelReadyForWriting(Throwable e);
- @LogMessage(id = 212073, value = "Unable to check KQueue availability ")
+ @LogMessage(id = 212073, value = "Unable to check KQueue availability ", level = LogMessage.Level.WARN)
void unableToCheckKQueueAvailability(Throwable e);
- @LogMessage(id = 212074, value = "SendAcknowledgementHandler will not be asynchronous without setting up confirmation window size")
- void confirmationNotSet();
-
- @LogMessage(id = 212075, value = "KQueue is not available, please add to the classpath or configure useKQueue=false to remove this warning")
+ @LogMessage(id = 212075, value = "KQueue is not available, please add to the classpath or configure useKQueue=false to remove this warning", level = LogMessage.Level.WARN)
void unableToCheckKQueueAvailabilityNoClass();
- @LogMessage(id = 212076, value = "Epoll is not available, please add to the classpath or configure useEpoll=false to remove this warning")
+ @LogMessage(id = 212076, value = "Epoll is not available, please add to the classpath or configure useEpoll=false to remove this warning", level = LogMessage.Level.WARN)
void unableToCheckEpollAvailabilitynoClass();
- @LogMessage(id = 212077, value = "Timed out waiting to receive initial broadcast from cluster. Retry {0} of {1}")
+ @LogMessage(id = 212077, value = "Timed out waiting to receive initial broadcast from cluster. Retry {0} of {1}", level = LogMessage.Level.WARN)
void broadcastTimeout(int retry, int maxretry);
- @LogMessage(id = 212079, value = "The upstream connector from the downstream federation will ignore url parameter {0}")
+ @LogMessage(id = 212079, value = "The upstream connector from the downstream federation will ignore url parameter {0}", level = LogMessage.Level.WARN)
void ignoredParameterForDownstreamFederation(String name);
- @LogMessage(id = 212080, value = "Using legacy SSL store provider value: {0}. Please use either ''keyStoreType'' or ''trustStoreType'' instead as appropriate.")
+ @LogMessage(id = 212080, value = "Using legacy SSL store provider value: {0}. Please use either ''keyStoreType'' or ''trustStoreType'' instead as appropriate.", level = LogMessage.Level.WARN)
void oldStoreProvider(String value);
@LogMessage(id = 214000, value = "Failed to call onMessage", level = LogMessage.Level.ERROR)
@@ -306,9 +301,6 @@ public interface ActiveMQClientLogger {
@LogMessage(id = 214011, value = "Failed to call discovery listener", level = LogMessage.Level.ERROR)
void failedToCallListenerInDiscovery(Throwable e);
- @LogMessage(id = 214012, value = "Unexpected error handling packet {0}", level = LogMessage.Level.ERROR)
- void errorHandlingPacket(Throwable t, Packet packet);
-
@LogMessage(id = 214013, value = "Failed to decode packet", level = LogMessage.Level.ERROR)
void errorDecodingPacket(Throwable e);
@@ -324,8 +316,6 @@ public interface ActiveMQClientLogger {
@LogMessage(id = 214017, value = "Caught unexpected Throwable", level = LogMessage.Level.ERROR)
void caughtunexpectedThrowable(Throwable t);
- @Deprecated
-
@LogMessage(id = 214018, value = "Failed to invoke getTextContent() on node {0}", level = LogMessage.Level.ERROR)
void errorOnXMLTransform(Throwable t, Node n);
@@ -341,24 +331,9 @@ public interface ActiveMQClientLogger {
@LogMessage(id = 214022, value = "Invalid protocol specified. Supported protocols are: {0}", level = LogMessage.Level.ERROR)
void invalidProtocol(String validProtocols);
- @LogMessage(id = 214023, value = "HTTP Handshake failed, received %s")
- void deletemehttpHandshakeFailed(Object msg);
-
- @LogMessage(id = 214024, value = "HTTP upgrade not supported by remote acceptor", level = LogMessage.Level.ERROR)
- void httpUpgradeNotSupportedByRemoteAcceptor();
-
@LogMessage(id = 214025, value = "Invalid type {0}, Using default connection factory at {1}", level = LogMessage.Level.ERROR)
void invalidCFType(String type, String uri);
- @LogMessage(id = 214026, value = "Failure captured on connectionID={0}, performing failover or reconnection now")
- void deletemeTracefailoverOrReconnect(Object connectionID, Throwable cause);
-
- @LogMessage(id = 214027, value = "Replaying commands for channelID={0} with lastCommandID from the server={1}")
- void deletemereplayingCommands(Object connectionID, int lastConfirmedCommandID);
-
- @LogMessage(id = 214028, value = "Couldn't reattach session {0}, performing as a failover operation now and recreating objects")
- void deletemereconnectCreatingNewSession(long id);
-
@LogMessage(id = 214029, value = "Unexpected response from HTTP server: %s", level = LogMessage.Level.ERROR)
void unexpectedResponseFromHttpServer(Object response);
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/ActiveMQClientMessageBundle.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/ActiveMQClientMessageBundle.java
index bcace3d203..6facf87205 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/ActiveMQClientMessageBundle.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/ActiveMQClientMessageBundle.java
@@ -33,7 +33,7 @@ import org.apache.activemq.artemis.api.core.ActiveMQTransactionRolledBackExcepti
import org.apache.activemq.artemis.api.core.ActiveMQUnBlockedException;
import org.apache.activemq.artemis.core.cluster.DiscoveryGroup;
import org.apache.activemq.artemis.logprocessor.CodeFactory;
-import org.apache.activemq.artemis.logprocessor.annotation.ArtemisBundle;
+import org.apache.activemq.artemis.logprocessor.annotation.LogBundle;
import org.apache.activemq.artemis.logprocessor.annotation.Message;
import org.apache.activemq.artemis.spi.core.remoting.Connection;
import org.w3c.dom.Node;
@@ -45,7 +45,7 @@ import org.w3c.dom.Node;
*
* so 219000 to 219999
*/
-@ArtemisBundle(projectCode = "AMQ")
+@LogBundle(projectCode = "AMQ")
public interface ActiveMQClientMessageBundle {
ActiveMQClientMessageBundle BUNDLE = CodeFactory.getCodeClass(ActiveMQClientMessageBundle.class);
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientProducerImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientProducerImpl.java
index 0ae590a6c6..a1232ed121 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientProducerImpl.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientProducerImpl.java
@@ -283,7 +283,7 @@ public class ClientProducerImpl implements ClientProducerInternal {
// Not the continuations, but this is ok since we are only interested in limiting the amount of
// data in *memory* and continuations go straight to the disk
- logger.tracef("sendRegularMessage::%s, Blocking=%s", msgI, sendBlocking);
+ logger.trace("sendRegularMessage::%s, Blocking=%s", msgI, sendBlocking);
int creditSize = sessionContext.getCreditsOnSendingFull(msgI);
@@ -309,7 +309,7 @@ public class ClientProducerImpl implements ClientProducerInternal {
final ICoreMessage msgI,
final ClientProducerCredits credits,
SendAcknowledgementHandler handler) throws ActiveMQException {
- logger.tracef("largeMessageSend::%s, Blocking=%s", msgI, sendBlocking);
+ logger.trace("largeMessageSend::%s, Blocking=%s", msgI, sendBlocking);
int headerSize = msgI.getHeadersAndPropertiesEncodeSize();
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionImpl.java
index a8a75f2193..813229d2a1 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionImpl.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionImpl.java
@@ -1527,7 +1527,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi
@Override
public void setAddress(final Message message, final SimpleString address) {
- logger.tracef("setAddress() Setting default address as %s", address);
+ logger.trace("setAddress() Setting default address as %s", address);
message.setAddress(address);
}
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/cluster/DiscoveryGroup.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/cluster/DiscoveryGroup.java
index 1a5db010c0..0ac12e15be 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/cluster/DiscoveryGroup.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/cluster/DiscoveryGroup.java
@@ -361,7 +361,7 @@ public final class DiscoveryGroup implements ActiveMQComponent {
if (logger.isTraceEnabled()) {
logger.trace("Connectors changed on Discovery:");
for (DiscoveryEntry connector : connectors.values()) {
- logger.trace(connector);
+ logger.trace("%s", connector);
}
}
if (logger.isDebugEnabled()) {
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ActiveMQSessionContext.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ActiveMQSessionContext.java
index bd7e43051d..33a186b187 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ActiveMQSessionContext.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ActiveMQSessionContext.java
@@ -847,14 +847,14 @@ public class ActiveMQSessionContext extends SessionContext {
ReattachSessionResponseMessage response = (ReattachSessionResponseMessage) channel1.sendBlocking(request, PacketImpl.REATTACH_SESSION_RESP);
if (response.isReattached()) {
- ActiveMQClientLogger.LOGGER.replayingCommands(sessionChannel.getID(), response.getLastConfirmedCommandID());
+ logger.debug("Replaying commands for channelID=%s with lastCommandID from the server=%s", sessionChannel.getID(), response.getLastConfirmedCommandID());
// The session was found on the server - we reattached transparently ok
sessionChannel.replayCommands(response.getLastConfirmedCommandID());
return true;
} else {
- ActiveMQClientLogger.LOGGER.reconnectCreatingNewSession(sessionChannel.getID());
+ logger.debug("Couldn't reattach session {0}, performing as a failover operation now and recreating objects", sessionChannel.getID());
sessionChannel.clearCommands();
@@ -1062,8 +1062,8 @@ public class ActiveMQSessionContext extends SessionContext {
final long elapsedMillis = TimeUnit.NANOSECONDS.toMillis(elapsedFlowControl);
ActiveMQClientLogger.LOGGER.timeoutStreamingLargeMessage();
if (logger.isDebugEnabled()) {
- logger.debugf("try to write %d bytes after blocked %d ms on a not writable connection: [%s]",
- chunkPacket.expectedEncodeSize(), elapsedMillis, connection.getID());
+ logger.debug("try to write %d bytes after blocked %d ms on a not writable connection: [%s]",
+ chunkPacket.expectedEncodeSize(), elapsedMillis, connection.getID());
}
}
if (requiresResponse) {
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/TransportConstants.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/TransportConstants.java
index 83b421da1b..db83fed081 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/TransportConstants.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/TransportConstants.java
@@ -375,7 +375,7 @@ public class TransportConstants {
return Integer.parseInt(variable);
}
} catch (Throwable ignored) {
- logger.debug(ignored);
+ logger.debug(ignored.getMessage(), ignored);
}
return defaultValue;
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/ssl/DefaultOpenSSLContextFactory.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/ssl/DefaultOpenSSLContextFactory.java
index 225a8ca8fd..1d2f8837b8 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/ssl/DefaultOpenSSLContextFactory.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/ssl/DefaultOpenSSLContextFactory.java
@@ -36,7 +36,7 @@ public class DefaultOpenSSLContextFactory implements OpenSSLContextFactory {
*/
@Override
public SslContext getClientSslContext(final SSLContextConfig config, final Map<String, Object> additionalOpts) throws Exception {
- log.debugf("Creating Client OpenSSL Context with %s", config);
+ log.debug("Creating Client OpenSSL Context with %s", config);
return new SSLSupport(config)
.setSslProvider(TransportConstants.OPENSSL_PROVIDER)
.createNettyClientContext();
@@ -49,7 +49,7 @@ public class DefaultOpenSSLContextFactory implements OpenSSLContextFactory {
*/
@Override
public SslContext getServerSslContext(final SSLContextConfig config, final Map<String, Object> additionalOpts) throws Exception {
- log.debugf("Creating Server OpenSSL Context with %s", config);
+ log.debug("Creating Server OpenSSL Context with %s", config);
return new SSLSupport(config)
.setSslProvider(TransportConstants.OPENSSL_PROVIDER)
.createNettyContext();
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/ssl/DefaultSSLContextFactory.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/ssl/DefaultSSLContextFactory.java
index 462d6d6e8d..b1df8e4473 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/ssl/DefaultSSLContextFactory.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/ssl/DefaultSSLContextFactory.java
@@ -40,7 +40,7 @@ public class DefaultSSLContextFactory implements SSLContextFactory {
return SSLContext.getDefault();
}
- log.debugf("Creating JDK SSLContext with %s", config);
+ log.debug("Creating JDK SSLContext with %s", config);
return new SSLSupport(config).createContext();
}
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/AutoCreateUtil.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/AutoCreateUtil.java
index 7badc9b6c4..6a7b3e6d51 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/AutoCreateUtil.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/AutoCreateUtil.java
@@ -26,12 +26,16 @@ import org.apache.activemq.artemis.api.core.client.ClientSession;
import org.apache.activemq.artemis.api.core.client.ClientSession.AddressQuery;
import org.apache.activemq.artemis.core.client.ActiveMQClientLogger;
import org.apache.activemq.artemis.core.protocol.core.impl.PacketImpl;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Utility class to create queues 'automatically'.
*/
public class AutoCreateUtil {
+ private static final Logger logger = LoggerFactory.getLogger(AutoCreateUtil.class);
+
public static void autoCreateQueue(ClientSession session, SimpleString destAddress, SimpleString selectorString) throws ActiveMQException {
AddressQuery response = session.addressQuery(destAddress);
/* The address query will send back exists=true even if the node only has a REMOTE binding for the destination.
@@ -47,7 +51,7 @@ public class AutoCreateUtil {
.setAddress(destAddress);
setRequiredQueueConfigurationIfNotSet(queueConfiguration,response, RoutingType.ANYCAST, selectorString, true);
session.createQueue(queueConfiguration);
- ActiveMQClientLogger.LOGGER.debug("The queue " + destAddress + " was created automatically");
+ logger.debug("The queue " + destAddress + " was created automatically");
} catch (ActiveMQQueueExistsException e) {
// The queue was created by another client/admin between the query check and send create queue packet
}
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/SoftValueLongObjectHashMap.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/SoftValueLongObjectHashMap.java
index 65b5c915d6..906372d30d 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/SoftValueLongObjectHashMap.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/SoftValueLongObjectHashMap.java
@@ -335,7 +335,7 @@ public class SoftValueLongObjectHashMap<V extends SoftValueLongObjectHashMap.Val
private void processQueue() {
AggregatedSoftReference ref;
while ((ref = (AggregatedSoftReference) this.refQueue.poll()) != null) {
- logger.tracef("Removing reference through processQueue:: %s", ref.get());
+ logger.trace("Removing reference through processQueue:: %s", ref.get());
mapDelegate.remove(ref.key);
}
}
diff --git a/artemis-log-processor/pom.xml b/artemis-log-processor/pom.xml
index 7976f143c6..aa22db6191 100644
--- a/artemis-log-processor/pom.xml
+++ b/artemis-log-processor/pom.xml
@@ -48,7 +48,8 @@
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
- <!-- License: EPL 1.0 -->
+ <!-- License: CPL 1.0 -->
+ <!-- There are newer versions of the JUnit but they break our tests -->
</dependency>
</dependencies>
diff --git a/artemis-log-processor/src/main/java/org/apache/activemq/artemis/logprocessor/LogProcessor.java b/artemis-log-processor/src/main/java/org/apache/activemq/artemis/logprocessor/LogProcessor.java
index e4e18ca54d..fee6225039 100644
--- a/artemis-log-processor/src/main/java/org/apache/activemq/artemis/logprocessor/LogProcessor.java
+++ b/artemis-log-processor/src/main/java/org/apache/activemq/artemis/logprocessor/LogProcessor.java
@@ -33,7 +33,7 @@ import java.util.HashMap;
import java.util.Iterator;
import java.util.Set;
-import org.apache.activemq.artemis.logprocessor.annotation.ArtemisBundle;
+import org.apache.activemq.artemis.logprocessor.annotation.LogBundle;
import org.apache.activemq.artemis.logprocessor.annotation.GetLogger;
import org.apache.activemq.artemis.logprocessor.annotation.LogMessage;
import org.apache.activemq.artemis.logprocessor.annotation.Message;
@@ -41,7 +41,6 @@ import org.apache.activemq.artemis.logprocessor.annotation.Message;
@SupportedAnnotationTypes({"org.apache.activemq.artemis.logprocessor.annotation.ArtemisBundle"})
@SupportedSourceVersion(SourceVersion.RELEASE_11)
public class LogProcessor extends AbstractProcessor {
- // Would be good if this was in its own module seperate from the annotations so that it isnt picked up by and thus run (to no effect) by users, which it currently would be but ideally would not be.
@Override
public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
@@ -64,7 +63,7 @@ public class LogProcessor extends AbstractProcessor {
TypeElement annotatedType = (TypeElement) annotatedTypeEl;
- ArtemisBundle bundleAnnotation = annotatedType.getAnnotation(ArtemisBundle.class);
+ LogBundle bundleAnnotation = annotatedType.getAnnotation(LogBundle.class);
String fullClassName = annotatedType.getQualifiedName() + "_impl";
String interfaceName = annotatedType.getSimpleName().toString();
@@ -146,7 +145,7 @@ public class LogProcessor extends AbstractProcessor {
return true;
}
- private void generateMessage(ArtemisBundle bundleAnnotation,
+ private void generateMessage(LogBundle bundleAnnotation,
PrintWriter writerOutput,
ExecutableElement executableMember,
Message messageAnnotation,
@@ -208,10 +207,10 @@ public class LogProcessor extends AbstractProcessor {
}
- private void generateGetLogger(ArtemisBundle bundleAnnotation,
- PrintWriter writerOutput,
- ExecutableElement executableMember,
- GetLogger loggerAnnotation) {
+ private void generateGetLogger(LogBundle bundleAnnotation,
+ PrintWriter writerOutput,
+ ExecutableElement executableMember,
+ GetLogger loggerAnnotation) {
// This is really a debug output
writerOutput.println(" // " + loggerAnnotation.toString());
@@ -220,7 +219,7 @@ public class LogProcessor extends AbstractProcessor {
}
- private void generateLogger(ArtemisBundle bundleAnnotation,
+ private void generateLogger(LogBundle bundleAnnotation,
PrintWriter writerOutput,
ExecutableElement executableMember,
LogMessage messageAnnotation,
diff --git a/artemis-log-processor/src/main/java/org/apache/activemq/artemis/logprocessor/annotation/ArtemisBundle.java b/artemis-log-processor/src/main/java/org/apache/activemq/artemis/logprocessor/annotation/LogBundle.java
similarity index 93%
rename from artemis-log-processor/src/main/java/org/apache/activemq/artemis/logprocessor/annotation/ArtemisBundle.java
rename to artemis-log-processor/src/main/java/org/apache/activemq/artemis/logprocessor/annotation/LogBundle.java
index 188382973e..8c59208723 100644
--- a/artemis-log-processor/src/main/java/org/apache/activemq/artemis/logprocessor/annotation/ArtemisBundle.java
+++ b/artemis-log-processor/src/main/java/org/apache/activemq/artemis/logprocessor/annotation/LogBundle.java
@@ -24,7 +24,7 @@ import java.lang.annotation.Target;
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.SOURCE)
-public @interface ArtemisBundle { // Maybe ArtemisLogBundle or even just LogBundle?
+public @interface LogBundle { // Maybe ArtemisLogBundle or even just LogBundle?
String projectCode();
}
diff --git a/artemis-log-processor/src/main/java/org/apache/activemq/artemis/logprocessor/annotation/LogMessage.java b/artemis-log-processor/src/main/java/org/apache/activemq/artemis/logprocessor/annotation/LogMessage.java
index 9496cd4a58..762acfa717 100644
--- a/artemis-log-processor/src/main/java/org/apache/activemq/artemis/logprocessor/annotation/LogMessage.java
+++ b/artemis-log-processor/src/main/java/org/apache/activemq/artemis/logprocessor/annotation/LogMessage.java
@@ -30,11 +30,12 @@ public @interface LogMessage {
String value();
- Level level() default Level.WARN; // Having a default for this seems less clear than just having the level specified all the time. (If null gets passed the requirement to specify a value, cant the processor detect that was given and fail?
+ Level level();
enum Level {
- FATAL, ERROR, WARN, INFO,
- @Deprecated DEBUG, @Deprecated TRACE; // Question: is the idea of this that debug stuff shouldnt have codes and so shouldnt use the annotations? Is that currently true?
+ ERROR, WARN, INFO,
+ // TODO DEBUG and TRACE will be removed.
+ @Deprecated DEBUG, @Deprecated TRACE;
private Level() {
}
diff --git a/artemis-log-processor/src/test/java/org/apache/activemq/artemis/logprocessor/SimpleBundle.java b/artemis-log-processor/src/test/java/org/apache/activemq/artemis/logprocessor/SimpleBundle.java
index 9278b54e93..6111527f8f 100644
--- a/artemis-log-processor/src/test/java/org/apache/activemq/artemis/logprocessor/SimpleBundle.java
+++ b/artemis-log-processor/src/test/java/org/apache/activemq/artemis/logprocessor/SimpleBundle.java
@@ -17,11 +17,11 @@
package org.apache.activemq.artemis.logprocessor;
-import org.apache.activemq.artemis.logprocessor.annotation.ArtemisBundle;
+import org.apache.activemq.artemis.logprocessor.annotation.LogBundle;
import org.apache.activemq.artemis.logprocessor.annotation.LogMessage;
import org.apache.activemq.artemis.logprocessor.annotation.Message;
-@ArtemisBundle(projectCode = "TST")
+@LogBundle(projectCode = "TST")
public interface SimpleBundle {
SimpleBundle MESSAGES = CodeFactory.getCodeClass(SimpleBundle.class);
@@ -38,12 +38,12 @@ public interface SimpleBundle {
@Message(id = 4, value = "EX-{0}")
Exception someExceptionParameter(String parameter);
- @LogMessage(id = 5, value = "This is a print!!!")
+ @LogMessage(id = 5, value = "This is a print!!!", level = LogMessage.Level.WARN)
void printMessage();
- @LogMessage(id = 6, value = "This is a print!!! {0}")
+ @LogMessage(id = 6, value = "This is a print!!! {0}", level = LogMessage.Level.WARN)
void printMessage(int nr);
- @LogMessage(id = 7, value = "multi\nLine\nMessage")
+ @LogMessage(id = 7, value = "multi\nLine\nMessage", level = LogMessage.Level.WARN)
void multiLines();
}
diff --git a/pom.xml b/pom.xml
index b1e84bea28..ef9c7ef0e2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -697,7 +697,7 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
- <version>${slf4j.version}</version> <!-- Change note: slf4j.version already present -->
+ <version>${slf4j.version}</version>
</dependency>
<!--needed for the rest support-->