Log outbound XML in msg encoders.
[shibboleth/opensaml2.git] / saml / saml2 / binding / impl / SAML2ArtifactEncoder.cpp
index 7480aec..e4a9cd3 100644 (file)
@@ -30,7 +30,7 @@
 
 #include <fstream>
 #include <sstream>
-#include <log4cpp/Category.hh>
+#include <xmltooling/logging.h>
 #include <xmltooling/io/HTTPResponse.h>
 #include <xmltooling/util/NDC.h>
 #include <xmltooling/util/TemplateEngine.h>
@@ -40,8 +40,8 @@ using namespace opensaml::saml2p;
 using namespace opensaml::saml2md;
 using namespace opensaml;
 using namespace xmlsignature;
+using namespace xmltooling::logging;
 using namespace xmltooling;
-using namespace log4cpp;
 using namespace std;
 
 namespace opensaml {
@@ -162,6 +162,9 @@ long SAML2ArtifactEncoder::encode(
             xmlObject->marshall((DOMDocument*)NULL,&sigs,credential);
         }
     }
+
+    if (log.isDebugEnabled())
+        log.debugStream() << "marshalled message: " << *xmlObject << logging::eol;
     
     // Store the message. Last step in storage will be to delete the XML.
     log.debug("storing artifact and content in map");