X-Git-Url: http://wamblee.org/gitweb/?a=blobdiff_plain;f=listener%2Fsrc%2Fmain%2Fjava%2Forg%2Fwamblee%2Fxmlrouter%2Flistener%2FLoggingEventListener.java;h=2c917abdc03cda94b374e8623cc631c67cd642f7;hb=e52385618670b54a5c6a4f2fbfab381bef43a905;hp=f623b135bb28787abf865bbc8f3c3278a5f2c868;hpb=fdc1e06b2b99816e68d8fe3e8a8f823d38ee31e6;p=xmlrouter diff --git a/listener/src/main/java/org/wamblee/xmlrouter/listener/LoggingEventListener.java b/listener/src/main/java/org/wamblee/xmlrouter/listener/LoggingEventListener.java index f623b13..2c917ab 100644 --- a/listener/src/main/java/org/wamblee/xmlrouter/listener/LoggingEventListener.java +++ b/listener/src/main/java/org/wamblee/xmlrouter/listener/LoggingEventListener.java @@ -19,11 +19,6 @@ import java.util.List; 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,23 +38,23 @@ public class LoggingEventListener implements EventListener { } @Override - public void delivered(String aDocType, Id aEventId, - DOMSource aEvent, List aSequence, - Id aDestination, String aDestinationName, - boolean aSuccessFlag) { + public void delivered(EventInfo aEvent, List aSequence, + String aDestinationId, boolean aSuccessFlag) { if (LOGGER.isLoggable(level)) { - LOGGER.log(level, "event delivered: document type '" + aDocType + - "', eventId " + aEventId + ", event '" + - new XMLDocument(aEvent).print(true) + "', sequence '" + - getSequenceString(aSequence) + "', destionationId " + - aDestination + ", destinationName '" + aDestinationName + "'"); + LOGGER.log(level, "event delivered: " + aEvent + ", sequence '" + + getSequenceString(aSequence) + "', destinationId " + + aDestinationId + "'"); } } private String getSequenceString(List 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("->"); @@ -70,12 +65,9 @@ public class LoggingEventListener implements EventListener { } @Override - public void notDelivered(String aDocumentType, Id 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); } } }