Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleaup logging after upgrade: use non-deprecated annotations, remove un-... #1572

Merged
merged 1 commit into from Mar 7, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -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>
Expand Down
Expand Up @@ -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>
Expand Down Expand Up @@ -46,6 +45,6 @@ public interface HornetQUtilLogger extends BasicLogger

@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();
}
Expand Up @@ -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;

/**
Expand All @@ -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")
Expand Down Expand Up @@ -89,18 +89,16 @@ public interface HornetQClientLogger extends BasicLogger
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)
Expand All @@ -119,10 +117,6 @@ public interface HornetQClientLogger extends BasicLogger
@Message(id = 212012, value = "failover occurred during commit throwing XAException.XA_RETRY", format = Message.Format.MESSAGE_FORMAT)
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();
Expand All @@ -132,8 +126,7 @@ public interface HornetQClientLogger extends BasicLogger
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);
Expand Down Expand Up @@ -187,8 +180,7 @@ public interface HornetQClientLogger extends BasicLogger
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);
Expand All @@ -210,12 +202,13 @@ public interface HornetQClientLogger extends BasicLogger
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)
Expand All @@ -225,7 +218,7 @@ public interface HornetQClientLogger extends BasicLogger
@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)
Expand Down Expand Up @@ -271,48 +264,49 @@ public interface HornetQClientLogger extends BasicLogger

@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)
Expand Down Expand Up @@ -388,15 +382,15 @@ public interface HornetQClientLogger extends BasicLogger
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)
Expand Down
Expand Up @@ -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>
Expand Down Expand Up @@ -57,10 +56,6 @@ public interface HornetQJMSClientLogger extends BasicLogger
@Message(id = 124000, value = "Failed to call JMS exception listener" , format = Message.Format.MESSAGE_FORMAT)
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);
Expand Down
Expand Up @@ -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;

/**
Expand Down
Expand Up @@ -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>
Expand Down
Expand Up @@ -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>
Expand Down Expand Up @@ -45,13 +44,10 @@ public interface HornetQStompProtocolLogger
*/
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);
Expand Down
16 changes: 4 additions & 12 deletions hornetq-ra/src/main/java/org/hornetq/ra/HornetQRALogger.java
Expand Up @@ -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
Expand Down Expand Up @@ -100,10 +100,6 @@ public interface HornetQRALogger extends BasicLogger
@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);
Expand All @@ -112,10 +108,6 @@ public interface HornetQRALogger extends BasicLogger
@Message(id = 154001, value = "Unable to stop HornetQ resource adapter.", format = Message.Format.MESSAGE_FORMAT)
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);
Expand Down