From: cantor Date: Wed, 12 Dec 2007 21:42:12 +0000 (+0000) Subject: Add logging when unmapped attributes are skipped. X-Git-Tag: 2.4~620 X-Git-Url: http://www.project-moonshot.org/gitweb/?a=commitdiff_plain;ds=sidebyside;h=5884057f0c975ae44a465431d92fed2695fcd44a;p=shibboleth%2Fsp.git Add logging when unmapped attributes are skipped. git-svn-id: https://svn.middleware.georgetown.edu/cpp-sp/trunk@2661 cb58f699-b61c-0410-a6fe-9272a202ed29 --- diff --git a/shibsp/attribute/resolver/impl/XMLAttributeExtractor.cpp b/shibsp/attribute/resolver/impl/XMLAttributeExtractor.cpp index eb4c6ec..6ad8584 100644 --- a/shibsp/attribute/resolver/impl/XMLAttributeExtractor.cpp +++ b/shibsp/attribute/resolver/impl/XMLAttributeExtractor.cpp @@ -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(