Permalink
Browse files

Cleaup logging after upgrade: use non-deprecated annotations, remove …

…un-used logging methods, re-format
  • Loading branch information...
1 parent 84e370d commit 10d7455d52ed776fdd8874411a7897534eb95edd jbertram committed Mar 7, 2014
Showing with 107 additions and 166 deletions.
  1. +4 −4 hornetq-bootstrap/src/main/java/org/hornetq/integration/bootstrap/HornetQBootstrapLogger.java
  2. +4 −5 hornetq-commons/src/main/java/org/hornetq/utils/HornetQUtilLogger.java
  3. +40 −46 hornetq-core-client/src/main/java/org/hornetq/core/client/HornetQClientLogger.java
  4. +4 −9 hornetq-jms-client/src/main/java/org/hornetq/jms/client/HornetQJMSClientLogger.java
  5. +4 −5 hornetq-jms-server/src/main/java/org/hornetq/jms/server/HornetQJMSServerLogger.java
  6. +4 −5 hornetq-journal/src/main/java/org/hornetq/journal/HornetQJournalLogger.java
  7. +4 −8 ...netq-stomp-protocol/src/main/java/org/hornetq/core/protocol/stomp/HornetQStompProtocolLogger.java
  8. +4 −12 hornetq-ra/src/main/java/org/hornetq/ra/HornetQRALogger.java
  9. +4 −4 hornetq-rest/src/main/java/org/hornetq/rest/HornetQRestLogger.java
  10. +4 −24 hornetq-server/src/main/java/org/hornetq/core/server/HornetQServerLogger.java
  11. +1 −1 hornetq-service-sar/src/main/java/org/hornetq/service/HornetQServiceLogger.java
  12. +4 −0 hornetq-tools/pom.xml
  13. +4 −6 hornetq-tools/src/main/java/org/hornetq/tools/HornetQToolsLogger.java
  14. +3 −14 ...tq-aerogear-integration/src/main/java/org/hornetq/integration/aerogear/HornetQAeroGearLogger.java
  15. +8 −9 .../hornetq-jboss-as-integration/src/main/java/org/hornetq/integration/jboss/HornetQJBossLogger.java
  16. +1 −2 integration/hornetq-spring-integration/src/main/java/org/hornetq/spring/HornetQSpringLogger.java
  17. +4 −5 integration/hornetq-twitter-integration/src/main/java/org/hornetq/twitter/HornetQTwitterLogger.java
  18. +3 −4 ...ion/hornetq-vertx-integration/src/main/java/org/hornetq/integration/vertx/HornetQVertxLogger.java
  19. +1 −1 tests/integration-tests/src/test/java/org/hornetq/tests/integration/IntegrationTestLogger.java
  20. +1 −1 tests/jms-tests/src/test/java/org/hornetq/jms/tests/JmsTestLogger.java
  21. +1 −1 tests/unit-tests/src/test/java/org/hornetq/tests/unit/UnitTestLogger.java
@@ -14,11 +14,11 @@
package org.hornetq.integration.bootstrap;
import org.jboss.logging.BasicLogger;
-import org.jboss.logging.Cause;
-import org.jboss.logging.LogMessage;
import org.jboss.logging.Logger;
-import org.jboss.logging.Message;
-import org.jboss.logging.MessageLogger;
+import org.jboss.logging.annotations.Cause;
+import org.jboss.logging.annotations.LogMessage;
+import org.jboss.logging.annotations.Message;
+import org.jboss.logging.annotations.MessageLogger;
/**
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
@@ -10,14 +10,13 @@
* implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
-
package org.hornetq.utils;
import org.jboss.logging.BasicLogger;
-import org.jboss.logging.LogMessage;
import org.jboss.logging.Logger;
-import org.jboss.logging.Message;
-import org.jboss.logging.MessageLogger;
+import org.jboss.logging.annotations.LogMessage;
+import org.jboss.logging.annotations.Message;
+import org.jboss.logging.annotations.MessageLogger;
/**
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
@@ -46,6 +45,6 @@
@LogMessage(level = Logger.Level.WARN)
@Message(id = 202000, value = "Missing privileges to set Thread Context Class Loader on Thread Factory. Using current Thread Context Class Loader",
- format = Message.Format.MESSAGE_FORMAT)
+ format = Message.Format.MESSAGE_FORMAT)
void missingPrivsForClassloader();
}
@@ -10,18 +10,17 @@
* implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
-
package org.hornetq.core.client;
import org.hornetq.api.core.HornetQExceptionType;
import org.hornetq.api.core.Interceptor;
import org.hornetq.core.protocol.core.Packet;
import org.jboss.logging.BasicLogger;
-import org.jboss.logging.Cause;
-import org.jboss.logging.LogMessage;
import org.jboss.logging.Logger;
-import org.jboss.logging.Message;
-import org.jboss.logging.MessageLogger;
+import org.jboss.logging.annotations.Cause;
+import org.jboss.logging.annotations.LogMessage;
+import org.jboss.logging.annotations.Message;
+import org.jboss.logging.annotations.MessageLogger;
import org.w3c.dom.Node;
/**
@@ -42,6 +41,7 @@
* <p>
* Once released, methods should not be deleted as they may be referenced by knowledge base
* articles. Unused methods should be marked as deprecated.
+ *
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
*/
@MessageLogger(projectCode = "HQ")
@@ -89,18 +89,16 @@
void waitingForRetry(Long interval, Long retryInterval, Double multiplier);
@LogMessage(level = Logger.Level.WARN)
- @Message(
- id = 212007,
- value = "connector.create or connectorFactory.createConnector should never throw an exception, implementation is badly behaved, but we will deal with it anyway."
- , format = Message.Format.MESSAGE_FORMAT)
+ @Message(id = 212007,
+ value = "connector.create or connectorFactory.createConnector should never throw an exception, implementation is badly behaved, but we will deal with it anyway.",
+ format = Message.Format.MESSAGE_FORMAT)
void createConnectorException(@Cause Exception e);
@LogMessage(level = Logger.Level.WARN)
- @Message(
- id = 212008,
+ @Message(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}"
- , format = Message.Format.MESSAGE_FORMAT)
+ + "before letting them go out of scope! {0}",
+ format = Message.Format.MESSAGE_FORMAT)
void factoryLeftOpen(@Cause Exception e, int i);
@LogMessage(level = Logger.Level.WARN)
@@ -120,10 +118,6 @@
void failoverDuringCommit();
@LogMessage(level = Logger.Level.WARN)
- @Message(id = 212013, value = "failover occurred during prepare re-trying", format = Message.Format.MESSAGE_FORMAT)
- void failoverDuringPrepare();
-
- @LogMessage(level = Logger.Level.WARN)
@Message(id = 212014, value = "failover occurred during prepare rolling back", format = Message.Format.MESSAGE_FORMAT)
void failoverDuringPrepareRollingBack();
@@ -132,8 +126,7 @@
void errorDuringPrepare(@Cause Exception e);
@LogMessage(level = Logger.Level.WARN)
- @Message(
- id = 212016,
+ @Message(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}",
format = Message.Format.MESSAGE_FORMAT)
void clientSessionNotClosed(@Cause Exception e, int identity);
@@ -187,8 +180,7 @@
void errorStartingLocator(@Cause Exception e);
@LogMessage(level = Logger.Level.WARN)
- @Message(
- id = 212029,
+ @Message(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}",
format = Message.Format.MESSAGE_FORMAT)
void serverLocatorNotClosed(@Cause Exception e, int identity);
@@ -210,12 +202,13 @@
void errorSendingNotifOnDiscoveryStop(@Cause Throwable e);
@LogMessage(level = Logger.Level.WARN)
- @Message(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}",
- format = Message.Format.MESSAGE_FORMAT)
+ @Message(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}",
+ format = Message.Format.MESSAGE_FORMAT)
void multipleServersBroadcastingSameNode(String nodeId);
@LogMessage(level = Logger.Level.WARN)
@@ -225,7 +218,7 @@
@LogMessage(level = Logger.Level.WARN)
@Message(id = 212036,
value = "Can not find packet to clear: {0} last received command id first stored command id {1}",
- format = Message.Format.MESSAGE_FORMAT)
+ format = Message.Format.MESSAGE_FORMAT)
void cannotFindPacketToClear(Integer lastReceivedCommandID, Integer firstStoredCommandID);
@LogMessage(level = Logger.Level.WARN)
@@ -271,48 +264,49 @@
@LogMessage(level = Logger.Level.WARN)
@Message(id = 212048, value = "local-bind-address specified for broadcast group but no local-bind-port specified so socket will NOT be bound to a local address/port",
- format = Message.Format.MESSAGE_FORMAT)
+ format = Message.Format.MESSAGE_FORMAT)
void broadcastGroupBindError();
@LogMessage(level = Logger.Level.WARN)
- @Message(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.",
- format = Message.Format.MESSAGE_FORMAT)
+ @Message(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.",
+ format = Message.Format.MESSAGE_FORMAT)
void ioDiscoveryError(String hostAddress, String s);
@LogMessage(level = Logger.Level.WARN)
@Message(id = 212050, value = "Compressed large message tried to read {0} bytes from stream {1}",
- format = Message.Format.MESSAGE_FORMAT)
+ format = Message.Format.MESSAGE_FORMAT)
void compressedLargeMessageError(int length, int nReadBytes);
@LogMessage(level = Logger.Level.WARN)
@Message(id = 212051,
- value = "Invalid concurrent session usage. Sessions are not supposed to be used by more than one thread concurrently.",
- format = Message.Format.MESSAGE_FORMAT)
+ value = "Invalid concurrent session usage. Sessions are not supposed to be used by more than one thread concurrently.",
+ format = Message.Format.MESSAGE_FORMAT)
void invalidConcurrentSessionUsage(@Cause Throwable t);
@LogMessage(level = Logger.Level.WARN)
@Message(id = 212052,
- value = "Packet {0} was answered out of sequence due to a previous server timeout and it''s being ignored",
- format = Message.Format.MESSAGE_FORMAT)
+ value = "Packet {0} was answered out of sequence due to a previous server timeout and it''s being ignored",
+ format = Message.Format.MESSAGE_FORMAT)
void packetOutOfOrder(Object obj, @Cause Throwable t);
/**
- * Warns about usage of {@link SendAcknowledgementHandler} or JMS's {@code CompletionWindow} with
+ * Warns about usage of {@link org.hornetq.api.core.client.SendAcknowledgementHandler} or JMS's {@code CompletionWindow} with
* confirmations disabled (confirmationWindowSize=-1).
*/
@LogMessage(level = Logger.Level.WARN)
@Message(id = 212053,
- value = "CompletionListener/SendAcknowledgementHandler used with confirmationWindowSize=-1. Enable confirmationWindowSize to receive acks from server!",
- format = Message.Format.MESSAGE_FORMAT)
+ value = "CompletionListener/SendAcknowledgementHandler used with confirmationWindowSize=-1. Enable confirmationWindowSize to receive acks from server!",
+ format = Message.Format.MESSAGE_FORMAT)
void confirmationWindowDisabledWarning();
@LogMessage(level = Logger.Level.WARN)
@Message(id = 212054,
- value = "Destination address={0} is blocked. If the system is configured to block make sure you consume messages on this configuration.",
- format = Message.Format.MESSAGE_FORMAT)
+ value = "Destination address={0} is blocked. If the system is configured to block make sure you consume messages on this configuration.",
+ format = Message.Format.MESSAGE_FORMAT)
void outOfCreditOnFlowControl(String address);
@LogMessage(level = Logger.Level.WARN)
@@ -388,15 +382,15 @@
void errorCreatingNettyConnection(@Cause Throwable e);
@LogMessage(level = Logger.Level.ERROR)
- @Message(id = 214017, value = "Caught unexpected Throwable", format = Message.Format.MESSAGE_FORMAT)
+ @Message(id = 214017, value = "Caught unexpected Throwable", format = Message.Format.MESSAGE_FORMAT)
void caughtunexpectedThrowable(@Cause Throwable t);
@LogMessage(level = Logger.Level.ERROR)
- @Message(id = 214018, value = "Failed to invoke getTextContent() on node {0}", format = Message.Format.MESSAGE_FORMAT)
+ @Message(id = 214018, value = "Failed to invoke getTextContent() on node {0}", format = Message.Format.MESSAGE_FORMAT)
void errorOnXMLTransform(@Cause Throwable t, Node n);
@LogMessage(level = Logger.Level.ERROR)
- @Message(id = 214019, value = "Invalid configuration", format = Message.Format.MESSAGE_FORMAT)
+ @Message(id = 214019, value = "Invalid configuration", format = Message.Format.MESSAGE_FORMAT)
void errorOnXMLTransformInvalidConf(@Cause Throwable t);
@LogMessage(level = Logger.Level.ERROR)
@@ -10,15 +10,14 @@
* implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
-
package org.hornetq.jms.client;
import org.jboss.logging.BasicLogger;
-import org.jboss.logging.Cause;
-import org.jboss.logging.LogMessage;
import org.jboss.logging.Logger;
-import org.jboss.logging.Message;
-import org.jboss.logging.MessageLogger;
+import org.jboss.logging.annotations.Cause;
+import org.jboss.logging.annotations.LogMessage;
+import org.jboss.logging.annotations.Message;
+import org.jboss.logging.annotations.MessageLogger;
/**
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
@@ -58,10 +57,6 @@
void errorCallingExcListener(@Cause Exception e);
@LogMessage(level = Logger.Level.ERROR)
- @Message(id = 124001, value = "Consumer Failed to prepare message for delivery", format = Message.Format.MESSAGE_FORMAT)
- void errorPreparingMessage(@Cause Throwable e);
-
- @LogMessage(level = Logger.Level.ERROR)
@Message(id = 124002, value = "Queue Browser failed to create message" , format = Message.Format.MESSAGE_FORMAT)
void errorCreatingMessage(@Cause Throwable e);
@@ -10,19 +10,18 @@
* implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
-
package org.hornetq.jms.server;
import javax.management.ObjectName;
import org.hornetq.api.core.client.ClientSessionFactory;
import org.hornetq.jms.server.recovery.XARecoveryConfig;
import org.jboss.logging.BasicLogger;
-import org.jboss.logging.Cause;
-import org.jboss.logging.LogMessage;
import org.jboss.logging.Logger;
-import org.jboss.logging.Message;
-import org.jboss.logging.MessageLogger;
+import org.jboss.logging.annotations.Cause;
+import org.jboss.logging.annotations.LogMessage;
+import org.jboss.logging.annotations.Message;
+import org.jboss.logging.annotations.MessageLogger;
import org.w3c.dom.Node;
/**
@@ -10,16 +10,15 @@
* implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
-
package org.hornetq.journal;
import org.hornetq.core.journal.impl.JournalFile;
import org.jboss.logging.BasicLogger;
-import org.jboss.logging.Cause;
-import org.jboss.logging.LogMessage;
import org.jboss.logging.Logger;
-import org.jboss.logging.Message;
-import org.jboss.logging.MessageLogger;
+import org.jboss.logging.annotations.Cause;
+import org.jboss.logging.annotations.LogMessage;
+import org.jboss.logging.annotations.Message;
+import org.jboss.logging.annotations.MessageLogger;
/**
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
@@ -12,12 +12,11 @@
*/
package org.hornetq.core.protocol.stomp;
-
-import org.jboss.logging.Cause;
-import org.jboss.logging.LogMessage;
import org.jboss.logging.Logger;
-import org.jboss.logging.Message;
-import org.jboss.logging.MessageLogger;
+import org.jboss.logging.annotations.Cause;
+import org.jboss.logging.annotations.LogMessage;
+import org.jboss.logging.annotations.Message;
+import org.jboss.logging.annotations.MessageLogger;
/**
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
@@ -45,13 +44,10 @@
*/
HornetQStompProtocolLogger LOGGER = Logger.getMessageLogger(HornetQStompProtocolLogger.class, HornetQStompProtocolLogger.class.getPackage().getName());
-
@LogMessage(level = Logger.Level.WARN)
@Message(id = 222068, value = "connection closed {0}", format = Message.Format.MESSAGE_FORMAT)
void connectionClosed(StompConnection connection);
-
-
@LogMessage(level = Logger.Level.ERROR)
@Message(id = 224023, value = "Unable to send frame {0}", format = Message.Format.MESSAGE_FORMAT)
void errorSendingFrame(@Cause Exception e, StompFrame frame);
@@ -15,11 +15,11 @@
import org.hornetq.ra.inflow.HornetQActivationSpec;
import org.jboss.logging.BasicLogger;
-import org.jboss.logging.Cause;
-import org.jboss.logging.LogMessage;
import org.jboss.logging.Logger;
-import org.jboss.logging.Message;
-import org.jboss.logging.MessageLogger;
+import org.jboss.logging.annotations.Cause;
+import org.jboss.logging.annotations.LogMessage;
+import org.jboss.logging.annotations.Message;
+import org.jboss.logging.annotations.MessageLogger;
/**
* Logger Code 15
@@ -100,10 +100,6 @@
@Message(id = 152006, value = "Unable to call after delivery", format = Message.Format.MESSAGE_FORMAT)
void unableToCallAfterDelivery(@Cause Exception e);
- @LogMessage(level = Logger.Level.WARN)
- @Message(id = 152007, value = "unable to clear the transaction", format = Message.Format.MESSAGE_FORMAT)
- void unableToClearTX(@Cause Exception 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);
@@ -113,10 +109,6 @@
void errorStoppingRA(@Cause Exception e);
@LogMessage(level = Logger.Level.ERROR)
- @Message(id = 154002, value = "Could not create session", format = Message.Format.MESSAGE_FORMAT)
- void errorCreatingSession(@Cause Exception e);
-
- @LogMessage(level = Logger.Level.ERROR)
@Message(id = 154003, value = "Unable to reconnect {0}", format = Message.Format.MESSAGE_FORMAT)
void errorReconnecting(@Cause Throwable t, HornetQActivationSpec spec);
Oops, something went wrong.

0 comments on commit 10d7455

Please sign in to comment.