introduction of EventInfo.
[xmlrouter] / listener / src / main / java / org / wamblee / xmlrouter / listener / LoggingEventListener.java
index f623b135bb28787abf865bbc8f3c3278a5f2c868..189f7632ae1993ef63af0b63cdba97827c5a988c 100644 (file)
@@ -20,9 +20,7 @@ import java.util.logging.Level;
 import java.util.logging.Logger;
 
 import javax.print.attribute.standard.Destination;
-import javax.xml.transform.dom.DOMSource;
 
-import org.wamblee.xml.XMLDocument;
 import org.wamblee.xmlrouter.common.Id;
 import org.wamblee.xmlrouter.config.Transformation;
 
@@ -43,14 +41,11 @@ public class LoggingEventListener implements EventListener {
     }
 
     @Override
-    public void delivered(String aDocType, Id<DOMSource> aEventId,
-        DOMSource aEvent, List<Transformation> aSequence,
+    public void delivered(EventInfo aEvent, List<Transformation> aSequence,
         Id<Destination> aDestination, String aDestinationName,
         boolean aSuccessFlag) {
         if (LOGGER.isLoggable(level)) {
-            LOGGER.log(level, "event delivered: document type '" + aDocType +
-                "', eventId " + aEventId + ", event '" +
-                new XMLDocument(aEvent).print(true) + "', sequence '" +
+            LOGGER.log(level, "event delivered: " + aEvent + ", sequence '" +
                 getSequenceString(aSequence) + "', destionationId " +
                 aDestination + ", destinationName '" + aDestinationName + "'");
         }
@@ -70,12 +65,9 @@ public class LoggingEventListener implements EventListener {
     }
 
     @Override
-    public void notDelivered(String aDocumentType, Id<DOMSource> aEventId,
-        DOMSource aEvent) {
+    public void notDelivered(EventInfo aInfo) {
         if (LOGGER.isLoggable(level)) {
-            LOGGER.log(level, "event not delivered: document type '" +
-                aDocumentType + "', eventId " + aEventId + ", event '" +
-                new XMLDocument(aEvent).print(true) + "'");
+            LOGGER.log(level, "event not delivered: " + aInfo);
         }
     }
 }