Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorddunne2011-05-13 19:20:42 -0400
committerRyan D. Brooks2011-05-13 19:20:42 -0400
commita128581bcf59c07e65fe13d37d26e1d9da4bcbb6 (patch)
treef23ded5264f686bce62bb505352ea734b473a251 /plugins/org.eclipse.osee.framework.messaging.event.res
parent79c6eb098448608c1cb77132ebf906b3544680b1 (diff)
downloadorg.eclipse.osee-a128581bcf59c07e65fe13d37d26e1d9da4bcbb6.tar.gz
org.eclipse.osee-a128581bcf59c07e65fe13d37d26e1d9da4bcbb6.tar.xz
org.eclipse.osee-a128581bcf59c07e65fe13d37d26e1d9da4bcbb6.zip
refactor: Cleanup logging
Diffstat (limited to 'plugins/org.eclipse.osee.framework.messaging.event.res')
-rw-r--r--plugins/org.eclipse.osee.framework.messaging.event.res/src/org/eclipse/osee/framework/messaging/event/res/internal/OseeCoreModelEventServiceImpl.java16
1 files changed, 9 insertions, 7 deletions
diff --git a/plugins/org.eclipse.osee.framework.messaging.event.res/src/org/eclipse/osee/framework/messaging/event/res/internal/OseeCoreModelEventServiceImpl.java b/plugins/org.eclipse.osee.framework.messaging.event.res/src/org/eclipse/osee/framework/messaging/event/res/internal/OseeCoreModelEventServiceImpl.java
index 8c8b2f265b..4865592d00 100644
--- a/plugins/org.eclipse.osee.framework.messaging.event.res/src/org/eclipse/osee/framework/messaging/event/res/internal/OseeCoreModelEventServiceImpl.java
+++ b/plugins/org.eclipse.osee.framework.messaging.event.res/src/org/eclipse/osee/framework/messaging/event/res/internal/OseeCoreModelEventServiceImpl.java
@@ -15,8 +15,10 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Map.Entry;
+import java.util.logging.Level;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.type.HashCollection;
+import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.messaging.ConnectionListener;
import org.eclipse.osee.framework.messaging.ConnectionNode;
import org.eclipse.osee.framework.messaging.OseeMessagingListener;
@@ -47,18 +49,18 @@ public class OseeCoreModelEventServiceImpl implements OseeMessagingStatusCallbac
@Override
public void fail(Throwable th) {
- System.err.println(getClass().getSimpleName() + " - fail: " + th.getLocalizedMessage());
- th.printStackTrace();
+ OseeLog.log(Activator.class, Level.SEVERE, th);
+
}
@Override
public void sendRemoteEvent(RemoteEvent remoteEvent) throws OseeCoreException {
ResMessages resMessage = getResMessageType(remoteEvent);
if (resMessage == null) {
- System.out.println(String.format("ResEventManager: Unhandled remote event [%s]", remoteEvent));
+ OseeLog.log(Activator.class, Level.INFO, null, "ResEventManager: Unhandled remote event [%s]", resMessage);
} else if (connectionNode == null) {
- System.out.println(String.format(
- "ResEventManager: Connection node was null - unable to send remote event [%s] ", resMessage));
+ OseeLog.log(Activator.class, Level.INFO, null,
+ "ResEventManager: Connection node was null - unable to send remote event [%s]", resMessage);
} else {
connectionNode.send(resMessage, remoteEvent, this);
}
@@ -90,7 +92,7 @@ public class OseeCoreModelEventServiceImpl implements OseeMessagingStatusCallbac
@Override
public void addFrameworkListener(IFrameworkEventListener frameworkEventListener) {
- System.out.println("Registering Client for Remote Events\n");
+ OseeLog.log(Activator.class, Level.INFO, "Registering Client for Remote Events");
for (Entry<ResMessages, Boolean> messageEntries : messages.entrySet()) {
ResMessages resMessageID = messageEntries.getKey();
@@ -101,7 +103,7 @@ public class OseeCoreModelEventServiceImpl implements OseeMessagingStatusCallbac
@Override
public void removeFrameworkListener(IFrameworkEventListener frameworkEventListener) {
- System.out.println("De-Registering Client for Remote Events\n");
+ OseeLog.log(Activator.class, Level.INFO, "De-Registering Client for Remote Events");
HashCollection<ResMessages, OseeMessagingListener> listeners = subscriptions.get(frameworkEventListener);
if (listeners != null) {

Back to the top