ARTEMIS-104 missing i18n warns
This commit is contained in:
parent
6babfee36a
commit
bf9f6d213b
|
@ -405,7 +405,7 @@ public final class XmlDataImporter implements Action
|
||||||
File tempFile = new File(tempFileName);
|
File tempFile = new File(tempFileName);
|
||||||
if (!tempFile.delete())
|
if (!tempFile.delete())
|
||||||
{
|
{
|
||||||
ActiveMQServerLogger.LOGGER.warn("Could not delete: " + tempFileName);
|
ActiveMQServerLogger.LOGGER.couldNotDeleteTempFile(tempFileName);
|
||||||
}
|
}
|
||||||
tempFileName = "";
|
tempFileName = "";
|
||||||
}
|
}
|
||||||
|
|
|
@ -95,6 +95,12 @@ public interface ActiveMQJMSServerLogger extends BasicLogger
|
||||||
format = Message.Format.MESSAGE_FORMAT)
|
format = Message.Format.MESSAGE_FORMAT)
|
||||||
void failedToCorrectHost(@Cause Exception e, String name);
|
void failedToCorrectHost(@Cause Exception e, String name);
|
||||||
|
|
||||||
|
@LogMessage(level = Logger.Level.WARN)
|
||||||
|
@Message(id = 122018,
|
||||||
|
value = "Failed to send notification: {0}",
|
||||||
|
format = Message.Format.MESSAGE_FORMAT)
|
||||||
|
void failedToSendNotification(String notification);
|
||||||
|
|
||||||
@LogMessage(level = Logger.Level.ERROR)
|
@LogMessage(level = Logger.Level.ERROR)
|
||||||
@Message(id = 124000, value = "key attribute missing for JMS configuration {0}" , format = Message.Format.MESSAGE_FORMAT)
|
@Message(id = 124000, value = "key attribute missing for JMS configuration {0}" , format = Message.Format.MESSAGE_FORMAT)
|
||||||
void jmsConfigMissingKey(Node e);
|
void jmsConfigMissingKey(Node e);
|
||||||
|
|
|
@ -1200,7 +1200,7 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
ActiveMQJMSServerLogger.LOGGER.warn("Failed to send notification : " + notif);
|
ActiveMQJMSServerLogger.LOGGER.failedToSendNotification(notif.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -595,10 +595,7 @@ public class AMQSession implements SessionCallback
|
||||||
long now = System.currentTimeMillis();
|
long now = System.currentTimeMillis();
|
||||||
if (now >= nextWarn)
|
if (now >= nextWarn)
|
||||||
{
|
{
|
||||||
ActiveMQServerLogger.LOGGER.warn("Memory Limit reached. Producer (" + producerId + ") stopped to prevent flooding "
|
ActiveMQServerLogger.LOGGER.memoryLimitReached(producerId.toString(), result.getBlockingAddress().toString(), ((now - start) / 1000));
|
||||||
+ result.getBlockingAddress()
|
|
||||||
+ " See http://activemq.apache.org/producer-flow-control.html for more info"
|
|
||||||
+ " (blocking for " + ((now - start) / 1000) + "s");
|
|
||||||
nextWarn = now + blockedProducerWarningInterval;
|
nextWarn = now + blockedProducerWarningInterval;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -97,6 +97,14 @@ public interface ActiveMQRALogger extends BasicLogger
|
||||||
@Message(id = 152006, value = "Unable to call after delivery", format = Message.Format.MESSAGE_FORMAT)
|
@Message(id = 152006, value = "Unable to call after delivery", format = Message.Format.MESSAGE_FORMAT)
|
||||||
void unableToCallAfterDelivery(@Cause Exception e);
|
void unableToCallAfterDelivery(@Cause Exception e);
|
||||||
|
|
||||||
|
@LogMessage(level = Logger.Level.WARN)
|
||||||
|
@Message(id = 152007, value = "Thread {0} could not be finished", format = Message.Format.MESSAGE_FORMAT)
|
||||||
|
void threadCouldNotFinish(String thread);
|
||||||
|
|
||||||
|
@LogMessage(level = Logger.Level.WARN)
|
||||||
|
@Message(id = 152008, value = "Error interrupting handler on endpoint {0} handler = {1}", format = Message.Format.MESSAGE_FORMAT)
|
||||||
|
void errorInterruptingHandler(String endpoint, String handler, @Cause Throwable cause);
|
||||||
|
|
||||||
@LogMessage(level = Logger.Level.ERROR)
|
@LogMessage(level = Logger.Level.ERROR)
|
||||||
@Message(id = 154000, value = "Error while creating object Reference.", format = Message.Format.MESSAGE_FORMAT)
|
@Message(id = 154000, value = "Error while creating object Reference.", format = Message.Format.MESSAGE_FORMAT)
|
||||||
void errorCreatingReference(@Cause Exception e);
|
void errorCreatingReference(@Cause Exception e);
|
||||||
|
|
|
@ -477,7 +477,7 @@ public class ActiveMQActivation
|
||||||
|
|
||||||
if (threadTearDown.isAlive())
|
if (threadTearDown.isAlive())
|
||||||
{
|
{
|
||||||
ActiveMQRALogger.LOGGER.warn("Thread " + threadTearDown + " couldn't be finished");
|
ActiveMQRALogger.LOGGER.threadCouldNotFinish(threadTearDown.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -228,7 +228,7 @@ public class ActiveMQMessageHandler implements MessageHandler
|
||||||
}
|
}
|
||||||
catch (Throwable e)
|
catch (Throwable e)
|
||||||
{
|
{
|
||||||
ActiveMQRALogger.LOGGER.warn("Error interrupting handler on endpoint " + endpoint + " handler=" + consumer);
|
ActiveMQRALogger.LOGGER.errorInterruptingHandler(endpoint.toString(), consumer.toString(), e);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -923,7 +923,7 @@ final class PageSubscriptionImpl implements PageSubscription
|
||||||
{
|
{
|
||||||
// This could become null if the page file was deleted, or if the queue was removed maybe?
|
// This could become null if the page file was deleted, or if the queue was removed maybe?
|
||||||
// it's better to diagnose it (based on support tickets) instead of NPE
|
// it's better to diagnose it (based on support tickets) instead of NPE
|
||||||
ActiveMQServerLogger.LOGGER.warn("PageCursorInfo == null on address " + this.getPagingStore().getAddress() + ", pos = " + pos + ", queue = " + cursorId);
|
ActiveMQServerLogger.LOGGER.nullPageCursorInfo(this.getPagingStore().getAddress().toString(), pos.toString(), cursorId);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -2765,8 +2765,7 @@ public class JournalStorageManager implements StorageManager
|
||||||
long messageID = buff.readLong();
|
long messageID = buff.readLong();
|
||||||
if (!pendingLargeMessages.remove(new Pair<Long, Long>(recordDeleted.id, messageID)))
|
if (!pendingLargeMessages.remove(new Pair<Long, Long>(recordDeleted.id, messageID)))
|
||||||
{
|
{
|
||||||
// TODO: Logging
|
ActiveMQServerLogger.LOGGER.largeMessageNotFound(recordDeleted.id);
|
||||||
ActiveMQServerLogger.LOGGER.warn("Large message " + recordDeleted.id + " wasn't found when dealing with add pending large message");
|
|
||||||
}
|
}
|
||||||
installLargeMessageConfirmationOnTX(tx, recordDeleted.id);
|
installLargeMessageConfirmationOnTX(tx, recordDeleted.id);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -686,7 +686,7 @@ public final class BindingsImpl implements Bindings
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ActiveMQServerLogger.LOGGER.warn("Couldn't find binding with id=" + bindingID + " on routeFromCluster for message=" + message + " binding = " + this);
|
ActiveMQServerLogger.LOGGER.bindingNotFound(bindingID, message.toString(), this.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -649,10 +649,10 @@ public final class ReplicationManager implements ActiveMQComponent
|
||||||
*/
|
*/
|
||||||
public OperationContext sendLiveIsStopping(final LiveStopping finalMessage)
|
public OperationContext sendLiveIsStopping(final LiveStopping finalMessage)
|
||||||
{
|
{
|
||||||
ActiveMQServerLogger.LOGGER.warn("LIVE IS STOPPING?!? message=" + finalMessage + " enabled=" + enabled);
|
ActiveMQServerLogger.LOGGER.debug("LIVE IS STOPPING?!? message=" + finalMessage + " enabled=" + enabled);
|
||||||
if (enabled)
|
if (enabled)
|
||||||
{
|
{
|
||||||
ActiveMQServerLogger.LOGGER.warn("LIVE IS STOPPING?!? message=" + finalMessage + " " + enabled);
|
ActiveMQServerLogger.LOGGER.debug("LIVE IS STOPPING?!? message=" + finalMessage + " " + enabled);
|
||||||
return sendReplicatePacket(new ReplicationLiveIsStoppingMessage(finalMessage));
|
return sendReplicatePacket(new ReplicationLiveIsStoppingMessage(finalMessage));
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -60,8 +60,8 @@ public interface ActiveMQMessageBundle
|
||||||
@Message(id = 119000, value = "Activation for server {0}", format = Message.Format.MESSAGE_FORMAT)
|
@Message(id = 119000, value = "Activation for server {0}", format = Message.Format.MESSAGE_FORMAT)
|
||||||
String activationForServer(ActiveMQServer server);
|
String activationForServer(ActiveMQServer server);
|
||||||
|
|
||||||
@Message(id = 119001, value = "Generating thread dump because - {0}", format = Message.Format.MESSAGE_FORMAT)
|
@Message(id = 119001, value = "Generating thread dump", format = Message.Format.MESSAGE_FORMAT)
|
||||||
String generatingThreadDump(String reason);
|
String generatingThreadDump();
|
||||||
|
|
||||||
@Message(id = 119002, value = "Thread {0} name = {1} id = {2} group = {3}", format = Message.Format.MESSAGE_FORMAT)
|
@Message(id = 119002, value = "Thread {0} name = {1} id = {2} group = {3}", format = Message.Format.MESSAGE_FORMAT)
|
||||||
String threadDump(Thread key, String name, Long id, ThreadGroup threadGroup);
|
String threadDump(Thread key, String name, Long id, ThreadGroup threadGroup);
|
||||||
|
|
|
@ -248,7 +248,7 @@ public interface ActiveMQServer extends ActiveMQComponent
|
||||||
|
|
||||||
ServerSession getSessionByID(String sessionID);
|
ServerSession getSessionByID(String sessionID);
|
||||||
|
|
||||||
void threadDump(String reason);
|
void threadDump();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* return true if there is a binding for this address (i.e. if there is a created queue)
|
* return true if there is a binding for this address (i.e. if there is a created queue)
|
||||||
|
|
|
@ -356,10 +356,6 @@ public interface ActiveMQServerLogger extends BasicLogger
|
||||||
@Message(id = 222014, value = "Error when trying to stop replication", format = Message.Format.MESSAGE_FORMAT)
|
@Message(id = 222014, value = "Error when trying to stop replication", format = Message.Format.MESSAGE_FORMAT)
|
||||||
void errorStoppingReplication(@Cause Exception e);
|
void errorStoppingReplication(@Cause Exception e);
|
||||||
|
|
||||||
@LogMessage(level = Logger.Level.WARN)
|
|
||||||
@Message(id = 222015, value = "{0}", format = Message.Format.MESSAGE_FORMAT)
|
|
||||||
void warn(String message);
|
|
||||||
|
|
||||||
@LogMessage(level = Logger.Level.WARN)
|
@LogMessage(level = Logger.Level.WARN)
|
||||||
@Message(id = 222016, value = "Cannot deploy a connector with no name specified.", format = Message.Format.MESSAGE_FORMAT)
|
@Message(id = 222016, value = "Cannot deploy a connector with no name specified.", format = Message.Format.MESSAGE_FORMAT)
|
||||||
void connectorWithNoName();
|
void connectorWithNoName();
|
||||||
|
@ -1110,6 +1106,65 @@ public interface ActiveMQServerLogger extends BasicLogger
|
||||||
format = Message.Format.MESSAGE_FORMAT)
|
format = Message.Format.MESSAGE_FORMAT)
|
||||||
void cannotFindRoleForUser(String user);
|
void cannotFindRoleForUser(String user);
|
||||||
|
|
||||||
|
@LogMessage(level = Logger.Level.WARN)
|
||||||
|
@Message(id = 222192,
|
||||||
|
value = "Could not delete: {0}",
|
||||||
|
format = Message.Format.MESSAGE_FORMAT)
|
||||||
|
void couldNotDeleteTempFile(String tempFileName);
|
||||||
|
|
||||||
|
@LogMessage(level = Logger.Level.WARN)
|
||||||
|
@Message(id = 222193,
|
||||||
|
value = "Memory Limit reached. Producer ({0}) stopped to prevent flooding {1} (blocking for {2}s). See http://activemq.apache.org/producer-flow-control.html for more info.",
|
||||||
|
format = Message.Format.MESSAGE_FORMAT)
|
||||||
|
void memoryLimitReached(String producerID, String address, long duration);
|
||||||
|
|
||||||
|
@LogMessage(level = Logger.Level.WARN)
|
||||||
|
@Message(id = 222194,
|
||||||
|
value = "PageCursorInfo == null on address {0}, pos = {1}, queue = {2}.",
|
||||||
|
format = Message.Format.MESSAGE_FORMAT)
|
||||||
|
void nullPageCursorInfo(String address, String position, long id);
|
||||||
|
|
||||||
|
@LogMessage(level = Logger.Level.WARN)
|
||||||
|
@Message(id = 222195,
|
||||||
|
value = "Large message {0} wasn't found when dealing with add pending large message",
|
||||||
|
format = Message.Format.MESSAGE_FORMAT)
|
||||||
|
void largeMessageNotFound(long id);
|
||||||
|
|
||||||
|
@LogMessage(level = Logger.Level.WARN)
|
||||||
|
@Message(id = 222196,
|
||||||
|
value = "Couldn't find binding with id={0} on routeFromCluster for message={1} binding = {2}",
|
||||||
|
format = Message.Format.MESSAGE_FORMAT)
|
||||||
|
void bindingNotFound(long id, String message, String binding);
|
||||||
|
|
||||||
|
@LogMessage(level = Logger.Level.WARN)
|
||||||
|
@Message(id = 222197,
|
||||||
|
value = "Internal error! Delivery logic has identified a non delivery and still handled a consumer!",
|
||||||
|
format = Message.Format.MESSAGE_FORMAT)
|
||||||
|
void nonDeliveryHandled();
|
||||||
|
|
||||||
|
@LogMessage(level = Logger.Level.WARN)
|
||||||
|
@Message(id = 222198,
|
||||||
|
value = "Couldn't flush ClusterManager executor ({0}) in 10 seconds, verify your thread pool size",
|
||||||
|
format = Message.Format.MESSAGE_FORMAT)
|
||||||
|
void couldNotFlushClusterManager(String manager);
|
||||||
|
|
||||||
|
@LogMessage(level = Logger.Level.WARN)
|
||||||
|
@Message(id = 222199,
|
||||||
|
value = "Thread dump: {0}",
|
||||||
|
format = Message.Format.MESSAGE_FORMAT)
|
||||||
|
void threadDump(String manager);
|
||||||
|
|
||||||
|
@LogMessage(level = Logger.Level.WARN)
|
||||||
|
@Message(id = 222200,
|
||||||
|
value = "Couldn't finish executor on {0}",
|
||||||
|
format = Message.Format.MESSAGE_FORMAT)
|
||||||
|
void couldNotFinishExecutor(String clusterConnection);
|
||||||
|
|
||||||
|
@LogMessage(level = Logger.Level.WARN)
|
||||||
|
@Message(id = 222201,
|
||||||
|
value = "Timed out waiting for backup activation to exit",
|
||||||
|
format = Message.Format.MESSAGE_FORMAT)
|
||||||
|
void backupActivationTimeout();
|
||||||
|
|
||||||
@LogMessage(level = Logger.Level.ERROR)
|
@LogMessage(level = Logger.Level.ERROR)
|
||||||
@Message(id = 224000, value = "Failure in initialisation", format = Message.Format.MESSAGE_FORMAT)
|
@Message(id = 224000, value = "Failure in initialisation", format = Message.Format.MESSAGE_FORMAT)
|
||||||
|
|
|
@ -391,8 +391,8 @@ public final class ClusterManager implements ActiveMQComponent
|
||||||
executor.execute(future);
|
executor.execute(future);
|
||||||
if (!future.await(10000))
|
if (!future.await(10000))
|
||||||
{
|
{
|
||||||
server.threadDump("Couldn't flush ClusterManager executor (" + this +
|
ActiveMQServerLogger.LOGGER.couldNotFlushClusterManager(this.toString());
|
||||||
") in 10 seconds, verify your thread pool size");
|
server.threadDump();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -386,7 +386,8 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn
|
||||||
executor.execute(future);
|
executor.execute(future);
|
||||||
if (!future.await(10000))
|
if (!future.await(10000))
|
||||||
{
|
{
|
||||||
server.threadDump("Couldn't finish executor on " + this);
|
ActiveMQServerLogger.LOGGER.couldNotFinishExecutor(this.toString());
|
||||||
|
server.threadDump();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -491,7 +491,8 @@ public class ActiveMQServerImpl implements ActiveMQServer
|
||||||
|
|
||||||
if (System.currentTimeMillis() - start >= timeout)
|
if (System.currentTimeMillis() - start >= timeout)
|
||||||
{
|
{
|
||||||
threadDump("Timed out waiting for backup activation to exit");
|
ActiveMQServerLogger.LOGGER.backupActivationTimeout();
|
||||||
|
threadDump();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -576,14 +577,14 @@ public class ActiveMQServerImpl implements ActiveMQServer
|
||||||
return postOffice.isAddressBound(SimpleString.toSimpleString(address));
|
return postOffice.isAddressBound(SimpleString.toSimpleString(address));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void threadDump(final String reason)
|
public void threadDump()
|
||||||
{
|
{
|
||||||
StringWriter str = new StringWriter();
|
StringWriter str = new StringWriter();
|
||||||
PrintWriter out = new PrintWriter(str);
|
PrintWriter out = new PrintWriter(str);
|
||||||
|
|
||||||
Map<Thread, StackTraceElement[]> stackTrace = Thread.getAllStackTraces();
|
Map<Thread, StackTraceElement[]> stackTrace = Thread.getAllStackTraces();
|
||||||
|
|
||||||
out.println(ActiveMQMessageBundle.BUNDLE.generatingThreadDump(reason));
|
out.println(ActiveMQMessageBundle.BUNDLE.generatingThreadDump());
|
||||||
out.println("*******************************************************************************");
|
out.println("*******************************************************************************");
|
||||||
|
|
||||||
for (Map.Entry<Thread, StackTraceElement[]> el : stackTrace.entrySet())
|
for (Map.Entry<Thread, StackTraceElement[]> el : stackTrace.entrySet())
|
||||||
|
@ -601,7 +602,7 @@ public class ActiveMQServerImpl implements ActiveMQServer
|
||||||
out.println(ActiveMQMessageBundle.BUNDLE.endThreadDump());
|
out.println(ActiveMQMessageBundle.BUNDLE.endThreadDump());
|
||||||
out.println("*******************************************************************************");
|
out.println("*******************************************************************************");
|
||||||
|
|
||||||
ActiveMQServerLogger.LOGGER.warn(str.toString());
|
ActiveMQServerLogger.LOGGER.threadDump(str.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
public final void stop(boolean failoverOnServerShutdown) throws Exception
|
public final void stop(boolean failoverOnServerShutdown) throws Exception
|
||||||
|
|
|
@ -2182,7 +2182,7 @@ public class QueueImpl implements Queue
|
||||||
{
|
{
|
||||||
// this shouldn't really happen,
|
// this shouldn't really happen,
|
||||||
// however I'm keeping this as an assertion case future developers ever change the logic here on this class
|
// however I'm keeping this as an assertion case future developers ever change the logic here on this class
|
||||||
ActiveMQServerLogger.LOGGER.warn("Internal error! Delivery logic has identified a non delivery and still handled a consumer!");
|
ActiveMQServerLogger.LOGGER.nonDeliveryHandled();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue