diff options
author | Ryan D. Brooks | 2011-08-02 20:05:44 +0000 |
---|---|---|
committer | Ryan D. Brooks | 2011-08-02 20:05:44 +0000 |
commit | 5618fe9dd7eb79ae3118d1e874aace2ce208bec8 (patch) | |
tree | bc6fce7bf67baca7c3ecb0279133657eb90eb66b /plugins/org.eclipse.osee.framework.messaging/src | |
parent | 38f5425454f60d085a2ad10b340b63a5c1562378 (diff) | |
download | org.eclipse.osee-5618fe9dd7eb79ae3118d1e874aace2ce208bec8.tar.gz org.eclipse.osee-5618fe9dd7eb79ae3118d1e874aace2ce208bec8.tar.xz org.eclipse.osee-5618fe9dd7eb79ae3118d1e874aace2ce208bec8.zip |
refactor: Replace OseeLog.log() calls that use String.format with OseeLog.logf
Diffstat (limited to 'plugins/org.eclipse.osee.framework.messaging/src')
5 files changed, 27 insertions, 29 deletions
diff --git a/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/MessageServiceImpl.java b/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/MessageServiceImpl.java index 4790262675e..b4cccc8688d 100644 --- a/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/MessageServiceImpl.java +++ b/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/MessageServiceImpl.java @@ -56,8 +56,8 @@ public class MessageServiceImpl implements MessageService { OseeLog.log(MessageServiceImpl.class, Level.SEVERE, ex1); } } - OseeLog.log(Activator.class, Level.FINER, - String.format("Default URI for message Service [%s]", defaultURI.toASCIIString())); + OseeLog.logf(Activator.class, Level.FINER, + "Default URI for message Service [%s]", defaultURI.toASCIIString()); return defaultURI; } @@ -86,12 +86,12 @@ public class MessageServiceImpl implements MessageService { public ConnectionNode get(NodeInfo nodeInfo) throws OseeCoreException { ConnectionNode node = connectionNodes.get(nodeInfo); if (node == null) { - OseeLog.log(Activator.class, Level.FINEST, - String.format("going to create a new Connection Node for [%s]", nodeInfo.toString())); + OseeLog.logf(Activator.class, Level.FINEST, + "going to create a new Connection Node for [%s]", nodeInfo.toString()); node = factory.create(nodeInfo); connectionNodes.put(nodeInfo, node); - OseeLog.log(Activator.class, Level.FINE, - String.format("Created a new Connection Node for [%s]", nodeInfo.toString())); + OseeLog.logf(Activator.class, Level.FINE, + "Created a new Connection Node for [%s]", nodeInfo.toString()); } return node; } diff --git a/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/activemq/ActiveMqMessageListenerWrapper.java b/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/activemq/ActiveMqMessageListenerWrapper.java index 2e39372888e..91a473e10fa 100644 --- a/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/activemq/ActiveMqMessageListenerWrapper.java +++ b/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/activemq/ActiveMqMessageListenerWrapper.java @@ -69,8 +69,8 @@ class ActiveMqMessageListenerWrapper implements MessageListener { private void process(javax.jms.Message message, ReplyConnection replyConnection) throws JMSException, OseeCoreException { Map<String, Object> headers = new HashMap<String, Object>(); listener.process(activeMqUtil.translateMessage(message, listener.getClazz()), headers, replyConnection); - OseeLog.log(Activator.class, Level.FINE, - String.format("recieved message %s - %s", message.getJMSDestination().toString(), message.toString())); + OseeLog.logf(Activator.class, Level.FINE, + "recieved message %s - %s", message.getJMSDestination().toString(), message.toString()); } } diff --git a/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/activemq/ConnectionNodeActiveMq.java b/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/activemq/ConnectionNodeActiveMq.java index 943164941c7..b276dbcc365 100644 --- a/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/activemq/ConnectionNodeActiveMq.java +++ b/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/activemq/ConnectionNodeActiveMq.java @@ -125,7 +125,6 @@ class ConnectionNodeActiveMq implements ConnectionNodeFailoverSupport, MessageLi removeProducerFromCache(messageId); sendInternal(messageId, message, properties, statusCallback); } - // OseeLog.log(Activator.class, Level.FINE, String.format("Sending message %s - %s", topic.getName(), topic.getGuid())); statusCallback.success(); } } catch (Exception ex) { @@ -172,7 +171,6 @@ class ConnectionNodeActiveMq implements ConnectionNodeFailoverSupport, MessageLi } } producer.send(msg); - // OseeLog.log(Activator.class, Level.FINE, String.format("Sending message %s - %s", topic.getName(), topic.getGuid())); statusCallback.success(); } @@ -306,7 +304,7 @@ class ConnectionNodeActiveMq implements ConnectionNodeFailoverSupport, MessageLi } catch (OseeCoreException ex) { OseeLog.log(ConnectionNodeActiveMq.class, Level.SEVERE, ex); } - OseeLog.log(Activator.class, Level.FINE, String.format("recieved reply message %s", jmsMessage.toString())); + OseeLog.logf(Activator.class, Level.FINE, "recieved reply message %s", jmsMessage); } @Override diff --git a/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/activemq/ReplyConnectionActiveMqImpl.java b/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/activemq/ReplyConnectionActiveMqImpl.java index 9872296eb63..8a39decc81d 100644 --- a/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/activemq/ReplyConnectionActiveMqImpl.java +++ b/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/activemq/ReplyConnectionActiveMqImpl.java @@ -59,7 +59,7 @@ class ReplyConnectionActiveMqImpl implements ReplyConnection { Message message = activeMqUtil.createMessage(session, clazz, body); message.setJMSCorrelationID(correlationId); producer.send(destReply, message); - OseeLog.log(Activator.class, Level.INFO, String.format("Sending Reply Message %s", message.toString())); + OseeLog.logf(Activator.class, Level.INFO, "Sending Reply Message %s", message.toString()); } catch (JMSException ex) { statusCallback.fail(ex); OseeExceptions.wrapAndThrow(ex); diff --git a/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/services/internal/ServiceLookupAndRegistrarLifeCycle.java b/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/services/internal/ServiceLookupAndRegistrarLifeCycle.java index 49d5c4499af..417873d1486 100644 --- a/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/services/internal/ServiceLookupAndRegistrarLifeCycle.java +++ b/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/services/internal/ServiceLookupAndRegistrarLifeCycle.java @@ -42,34 +42,34 @@ public class ServiceLookupAndRegistrarLifeCycle extends ServiceTracker { @Override public Object addingService(ServiceReference reference) { - OseeLog.log(Activator.class, Level.INFO, String.format("Found %s service.", MessageService.class.getName())); - OseeLog.log(Activator.class, Level.FINEST, String.format("GOING TO GET THE REF")); + OseeLog.logf(Activator.class, Level.INFO, "Found %s service.", MessageService.class.getName()); + OseeLog.logf(Activator.class, Level.FINEST, "GOING TO GET THE REF"); MessageService messageService = (MessageService) context.getService(reference); - OseeLog.log(Activator.class, Level.FINEST, String.format("got the service ref")); + OseeLog.logf(Activator.class, Level.FINEST, "got the service ref"); ScheduledExecutorService executor = Executors.newScheduledThreadPool(2); - OseeLog.log(Activator.class, Level.FINEST, String.format("got exec")); + OseeLog.logf(Activator.class, Level.FINEST, "got exec"); try { - OseeLog.log(Activator.class, Level.FINEST, String.format("set context classloader")); + OseeLog.logf(Activator.class, Level.FINEST, "set context classloader"); Thread.currentThread().setContextClassLoader(contextClassLoader); - OseeLog.log(Activator.class, Level.FINEST, String.format("done set context classloader")); + OseeLog.logf(Activator.class, Level.FINEST, "done set context classloader"); registrar = new RemoteServiceRegistrarImpl(messageService.getDefault(), executor); - OseeLog.log(Activator.class, Level.FINEST, - String.format("Getting ready to start %s.", RemoteServiceRegistrarImpl.class.getName())); + OseeLog.logf(Activator.class, Level.FINEST, + "Getting ready to start %s.", RemoteServiceRegistrarImpl.class.getName()); registrar.start(); - OseeLog.log(Activator.class, Level.FINEST, - String.format("started %s.", RemoteServiceRegistrarImpl.class.getName())); + OseeLog.logf(Activator.class, Level.FINEST, + "started %s.", RemoteServiceRegistrarImpl.class.getName()); lookup = new RemoteServiceLookupImpl(messageService.getDefault(), executor); - OseeLog.log(Activator.class, Level.FINEST, - String.format("Getting ready to start %s.", RemoteServiceLookupImpl.class.getName())); + OseeLog.logf(Activator.class, Level.FINEST, + "Getting ready to start %s.", RemoteServiceLookupImpl.class.getName()); lookup.start(); - OseeLog.log(Activator.class, Level.FINEST, - String.format("started %s.", RemoteServiceLookupImpl.class.getName())); + OseeLog.logf(Activator.class, Level.FINEST, + "started %s.", RemoteServiceLookupImpl.class.getName()); lookupRegistration = context.registerService(RemoteServiceLookup.class.getName(), lookup, null); - OseeLog.log(Activator.class, Level.INFO, String.format("Registered %s.", RemoteServiceLookup.class.getName())); + OseeLog.logf(Activator.class, Level.INFO, "Registered %s.", RemoteServiceLookup.class.getName()); registrarRegistration = context.registerService(RemoteServiceRegistrar.class.getName(), registrar, null); - OseeLog.log(Activator.class, Level.INFO, - String.format("Registered %s.", RemoteServiceRegistrar.class.getName())); + OseeLog.logf(Activator.class, Level.INFO, + "Registered %s.", RemoteServiceRegistrar.class.getName()); } catch (OseeCoreException ex) { OseeLog.log(ServiceLookupAndRegistrarLifeCycle.class, Level.SEVERE, ex); } |