First version after introduction of meaningful ids and Identifiable interface.
[xmlrouter] / listener / src / main / java / org / wamblee / xmlrouter / listener / LoggingEventListener.java
index 189f7632ae1993ef63af0b63cdba97827c5a988c..2c917abdc03cda94b374e8623cc631c67cd642f7 100644 (file)
@@ -19,9 +19,6 @@ import java.util.List;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
-import javax.print.attribute.standard.Destination;
-
-import org.wamblee.xmlrouter.common.Id;
 import org.wamblee.xmlrouter.config.Transformation;
 
 /**
@@ -42,19 +39,22 @@ public class LoggingEventListener implements EventListener {
 
     @Override
     public void delivered(EventInfo aEvent, List<Transformation> aSequence,
-        Id<Destination> aDestination, String aDestinationName,
-        boolean aSuccessFlag) {
+        String aDestinationId, boolean aSuccessFlag) {
         if (LOGGER.isLoggable(level)) {
             LOGGER.log(level, "event delivered: " + aEvent + ", sequence '" +
-                getSequenceString(aSequence) + "', destionationId " +
-                aDestination + ", destinationName '" + aDestinationName + "'");
+                getSequenceString(aSequence) + "', destinationId " +
+                aDestinationId + "'");
         }
     }
 
     private String getSequenceString(List<Transformation> aSequence) {
         StringBuffer buf = new StringBuffer();
-        for (Transformation transformation : aSequence) {
-            buf.append(transformation.getName());
+        for (int i = 0; i < aSequence.size(); i++) {
+            if (i > 0) {
+                buf.append(", ");
+            }
+            Transformation transformation = aSequence.get(i);
+            buf.append(transformation.getId());
             buf.append("(");
             buf.append(transformation.getFromType());
             buf.append("->");