diff options
Diffstat (limited to 'utils/src/main')
3 files changed, 17 insertions, 3 deletions
diff --git a/utils/src/main/java/at/gv/egiz/slbinding/RedirectEventFilter.java b/utils/src/main/java/at/gv/egiz/slbinding/RedirectEventFilter.java index 14c5ba48..5fe84aae 100644 --- a/utils/src/main/java/at/gv/egiz/slbinding/RedirectEventFilter.java +++ b/utils/src/main/java/at/gv/egiz/slbinding/RedirectEventFilter.java @@ -153,9 +153,6 @@ public class RedirectEventFilter implements EventFilter { private void redirectEvent(XMLEvent event) { try { - if (log.isTraceEnabled()) { - log.trace("redirecting StAX event " + event); - } redirectWriter.add(event); } catch (XMLStreamException ex) { ex.printStackTrace(); diff --git a/utils/src/main/java/at/gv/egiz/slbinding/impl/TransformsInfoType.java b/utils/src/main/java/at/gv/egiz/slbinding/impl/TransformsInfoType.java index 1180e9fa..b1de9406 100644 --- a/utils/src/main/java/at/gv/egiz/slbinding/impl/TransformsInfoType.java +++ b/utils/src/main/java/at/gv/egiz/slbinding/impl/TransformsInfoType.java @@ -22,6 +22,7 @@ package at.gv.egiz.slbinding.impl; import at.gv.egiz.slbinding.*; import java.io.ByteArrayOutputStream; +import java.io.UnsupportedEncodingException; import java.util.HashSet; import java.util.Set; import javax.xml.bind.annotation.XmlTransient; @@ -62,6 +63,13 @@ public class TransformsInfoType extends at.buergerkarte.namespaces.securitylayer log.debug("disabling event redirection for TransformsInfoType"); filter.flushRedirectStream(); filter.setRedirectStream(null); + if (log.isDebugEnabled()) { + try { + log.debug("redirected events (UTF-8): " + redirectOS.toString("UTF-8")); + } catch (UnsupportedEncodingException ex) { + log.debug("failed to log redirected events", ex); + } + } } @Override diff --git a/utils/src/main/java/at/gv/egiz/slbinding/impl/XMLContentType.java b/utils/src/main/java/at/gv/egiz/slbinding/impl/XMLContentType.java index eb147f88..fd52e378 100644 --- a/utils/src/main/java/at/gv/egiz/slbinding/impl/XMLContentType.java +++ b/utils/src/main/java/at/gv/egiz/slbinding/impl/XMLContentType.java @@ -23,6 +23,8 @@ package at.gv.egiz.slbinding.impl; import at.gv.egiz.slbinding.RedirectCallback; import at.gv.egiz.slbinding.RedirectEventFilter; import java.io.ByteArrayOutputStream; +import java.io.UnsupportedEncodingException; + import javax.xml.bind.annotation.XmlTransient; import javax.xml.stream.XMLStreamException; import org.apache.commons.logging.Log; @@ -51,6 +53,13 @@ public class XMLContentType extends at.buergerkarte.namespaces.securitylayer._1. log.debug("disabling event redirection for XMLContentType"); filter.flushRedirectStream(); filter.setRedirectStream(null); + if (log.isDebugEnabled()) { + try { + log.debug("redirected events (UTF-8): " + redirectOS.toString("UTF-8")); + } catch (UnsupportedEncodingException ex) { + log.debug("failed to log redirected events", ex); + } + } } @Override |