Add logging when unmapped attributes are skipped.
authorcantor <cantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Wed, 12 Dec 2007 21:42:12 +0000 (21:42 +0000)
committercantor <cantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Wed, 12 Dec 2007 21:42:12 +0000 (21:42 +0000)
git-svn-id: https://svn.middleware.georgetown.edu/cpp-sp/trunk@2661 cb58f699-b61c-0410-a6fe-9272a202ed29

shibsp/attribute/resolver/impl/XMLAttributeExtractor.cpp

index eb4c6ec..6ad8584 100644 (file)
@@ -281,6 +281,12 @@ void XMLExtractorImpl::extractAttributes(
         if (a)
             attributes.push_back(a);
     }
+    else if (m_log.isDebugEnabled()) {
+#ifdef HAVE_GOOD_STL
+        auto_ptr_char temp(format);
+#endif
+        m_log.debug("skipping unmapped NameIdentifier with format (%s)", temp.get());
+    }
 }
 
 void XMLExtractorImpl::extractAttributes(
@@ -306,6 +312,12 @@ void XMLExtractorImpl::extractAttributes(
         if (a)
             attributes.push_back(a);
     }
+    else if (m_log.isDebugEnabled()) {
+#ifdef HAVE_GOOD_STL
+        auto_ptr_char temp(format);
+#endif
+        m_log.debug("skipping unmapped NameID with format (%s)", temp.get());
+    }
 }
 
 void XMLExtractorImpl::extractAttributes(
@@ -335,6 +347,13 @@ void XMLExtractorImpl::extractAttributes(
         if (a)
             attributes.push_back(a);
     }
+    else if (m_log.isInfoEnabled()) {
+#ifdef HAVE_GOOD_STL
+        auto_ptr_char temp1(name);
+        auto_ptr_char temp2(format);
+#endif
+        m_log.info("skipping unmapped SAML 1.x Attribute with Name: %s%s%s", temp1.get(), *temp2.get() ? ", Namespace:" : "", temp2.get());
+    }
 }
 
 void XMLExtractorImpl::extractAttributes(
@@ -366,6 +385,13 @@ void XMLExtractorImpl::extractAttributes(
         if (a)
             attributes.push_back(a);
     }
+    else if (m_log.isInfoEnabled()) {
+#ifdef HAVE_GOOD_STL
+        auto_ptr_char temp1(name);
+        auto_ptr_char temp2(format);
+#endif
+        m_log.info("skipping unmapped SAML 2.0 Attribute with Name: %s%s%s", temp1.get(), *temp2.get() ? ", Format:" : "", temp2.get());
+    }
 }
 
 void XMLExtractorImpl::extractAttributes(