From 9fddf9054c76de6239295b98a559fcc75453effc Mon Sep 17 00:00:00 2001 From: cantor Date: Tue, 31 Jul 2007 17:53:45 +0000 Subject: [PATCH] Convert logging to log4shib via compile time switch. git-svn-id: https://svn.middleware.georgetown.edu/cpp-opensaml2/trunk@288 fb386ef7-a10c-0410-8ebf-fd3f8e989ab0 --- config_win32.h | 27 +++++----- configure.ac | 60 +++++++++++++++------- saml/SAMLConfig.cpp | 17 +++++- saml/binding/impl/ArtifactMap.cpp | 4 +- saml/binding/impl/ClientCertAuthRule.cpp | 4 +- saml/binding/impl/MessageFlowRule.cpp | 4 +- saml/binding/impl/NullSecurityRule.cpp | 4 +- saml/binding/impl/SimpleSigningRule.cpp | 4 +- saml/binding/impl/XMLSigningRule.cpp | 4 +- saml/saml.vcproj | 4 +- saml/saml1/binding/impl/SAML1ArtifactDecoder.cpp | 4 +- saml/saml1/binding/impl/SAML1ArtifactEncoder.cpp | 4 +- saml/saml1/binding/impl/SAML1MessageRule.cpp | 4 +- saml/saml1/binding/impl/SAML1POSTDecoder.cpp | 4 +- saml/saml1/binding/impl/SAML1POSTEncoder.cpp | 4 +- saml/saml1/binding/impl/SAML1SOAPClient.cpp | 4 +- saml/saml1/binding/impl/SAML1SOAPDecoder.cpp | 4 +- saml/saml1/binding/impl/SAML1SOAPEncoder.cpp | 4 +- saml/saml1/profile/AssertionValidator.cpp | 4 +- saml/saml1/profile/BrowserSSOProfileValidator.cpp | 4 +- saml/saml2/binding/impl/SAML2ArtifactDecoder.cpp | 4 +- saml/saml2/binding/impl/SAML2ArtifactEncoder.cpp | 4 +- saml/saml2/binding/impl/SAML2MessageRule.cpp | 4 +- saml/saml2/binding/impl/SAML2POSTDecoder.cpp | 4 +- saml/saml2/binding/impl/SAML2POSTEncoder.cpp | 4 +- saml/saml2/binding/impl/SAML2Redirect.cpp | 4 +- saml/saml2/binding/impl/SAML2RedirectDecoder.cpp | 4 +- saml/saml2/binding/impl/SAML2RedirectEncoder.cpp | 4 +- saml/saml2/binding/impl/SAML2SOAPClient.cpp | 4 +- saml/saml2/binding/impl/SAML2SOAPDecoder.cpp | 4 +- saml/saml2/binding/impl/SAML2SOAPEncoder.cpp | 4 +- saml/saml2/core/impl/Assertions.cpp | 4 +- .../metadata/impl/BlacklistMetadataFilter.cpp | 4 +- .../metadata/impl/ChainingMetadataProvider.cpp | 7 +-- saml/saml2/metadata/impl/MetadataProvider.cpp | 4 +- .../metadata/impl/SignatureMetadataFilter.cpp | 5 +- .../metadata/impl/WhitelistMetadataFilter.cpp | 4 +- saml/saml2/metadata/impl/XMLMetadataProvider.cpp | 2 +- saml/saml2/profile/Assertion20Validator.cpp | 4 +- .../saml2/profile/BrowserSSOProfile20Validator.cpp | 4 +- 40 files changed, 145 insertions(+), 109 deletions(-) diff --git a/config_win32.h b/config_win32.h index b992639..c2b7f51 100644 --- a/config_win32.h +++ b/config_win32.h @@ -1,8 +1,7 @@ /* config_win32.h. Copied from a ./configure on Unix */ -/* Define to 1 if you have the header file. -#define HAVE_DLFCN_H 1 -*/ +/* Define to 1 if you have the header file. */ +/* #undef HAVE_DLFCN_H */ /* Define to 1 if you have the `gmtime_r' function. */ /* #undef HAVE_GMTIME_R */ @@ -11,12 +10,14 @@ specialization. */ #define HAVE_GOOD_STL 1 -/* Define to 1 if you have the header file. -#define HAVE_INTTYPES_H 1 -*/ +/* Define to 1 if you have the header file. */ +/* #undef HAVE_INTTYPES_H */ -/* Define if log4cpp library was found */ -#define HAVE_LIBLOG4CPP 1 +/* Define if log4shib library is used. */ +#define OPENSAML_LOG4SHIB 1 + +/* Define if log4cpp library is used. */ +/* #undef OPENSAML_LOG4CPP */ /* Define if Xerces-C library was found */ #define HAVE_LIBXERCESC 1 @@ -39,9 +40,8 @@ /* Define to 1 if you have the `strdup' function. */ #define HAVE_STRDUP 1 -/* Define to 1 if you have the header file. -#define HAVE_STRINGS_H 1 -*/ +/* Define to 1 if you have the header file. */ +/* #undef HAVE_STRINGS_H */ /* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 @@ -55,9 +55,8 @@ /* Define to 1 if you have the header file. */ #define HAVE_SYS_TYPES_H 1 -/* Define to 1 if you have the header file. -#define HAVE_UNISTD_H 1 -*/ +/* Define to 1 if you have the header file. */ +/* #undef HAVE_UNISTD_H */ /* Name of package */ #define PACKAGE "opensaml" diff --git a/configure.ac b/configure.ac index bc7bc9b..bfd90ee 100644 --- a/configure.ac +++ b/configure.ac @@ -122,30 +122,54 @@ AC_LANG(C++) AC_CXX_REQUIRE_STL AC_CXX_NAMESPACES -# log4cpp settings -AC_PATH_PROG(LOG4CPP_CONFIG,log4cpp-config) -AC_ARG_WITH(log4cpp, - AC_HELP_STRING([--with-log4cpp=PATH], [where log4cpp-config is installed]), +# log4shib settings (favor this version over the log4cpp code) +AC_PATH_PROG(LOG4SHIB_CONFIG,log4shib-config) +AC_ARG_WITH(log4shib, + AC_HELP_STRING([--with-log4shib=PATH], [where log4shib-config is installed]), [ - LOG4CPP_CONFIG="${with_log4cpp}" - if ! test -f "${LOG4CPP_CONFIG}" ; then - LOG4CPP_CONFIG="${with_log4cpp}/bin/log4cpp-config" + LOG4SHIB_CONFIG="${with_log4shib}" + if ! test -f "${LOG4SHIB_CONFIG}" ; then + LOG4SHIB_CONFIG="${with_log4shib}/bin/log4shib-config" fi ]) -if test -f "${LOG4CPP_CONFIG}"; then - LDFLAGS="`${LOG4CPP_CONFIG} --libs` $LDFLAGS" - CPPFLAGS="`${LOG4CPP_CONFIG} --cflags` $CPPFLAGS" +if test -f "${LOG4SHIB_CONFIG}"; then + LDFLAGS="`${LOG4SHIB_CONFIG} --libs` $LDFLAGS" + CPPFLAGS="`${LOG4SHIB_CONFIG} --cflags` $CPPFLAGS" else - AC_MSG_ERROR([log4cpp-config not found, may need to use --with-log4cpp option]) - LIBS="-llog4cpp $LIBS" + AC_MSG_WARN([log4shib-config not found, may need to use --with-log4shib option]) + AC_MSG_WARN([will look for original log4cpp library]) + + # log4cpp settings + AC_PATH_PROG(LOG4CPP_CONFIG,log4cpp-config) + AC_ARG_WITH(log4cpp, + AC_HELP_STRING([--with-log4cpp=PATH], [where log4cpp-config is installed]), + [ + LOG4CPP_CONFIG="${with_log4cpp}" + if ! test -f "${LOG4CPP_CONFIG}" ; then + LOG4CPP_CONFIG="${with_log4cpp}/bin/log4cpp-config" + fi + ]) + if test -f "${LOG4CPP_CONFIG}"; then + AC_MSG_WARN([will try to use log4cpp, note that most non-Internet2 supplied versions are not thread-safe]) + LDFLAGS="`${LOG4CPP_CONFIG} --libs` $LDFLAGS" + CPPFLAGS="`${LOG4CPP_CONFIG} --cflags` $CPPFLAGS" + else + AC_MSG_ERROR([log4cpp-config not found, may need to use --with-log4cpp option]) + fi + AC_CHECK_HEADER([log4cpp/Category.hh],,AC_MSG_ERROR([unable to find log4cpp header files])) + AC_CHECK_HEADER([log4cpp/PropertyConfigurator.hh],,AC_MSG_ERROR([you need at least log4cpp 0.3.x])) + AC_TRY_LINK( + [#include ], + [log4cpp::Category::getInstance("foo")], + [AC_DEFINE(OPENSAML_LOG4CPP,1,[Define if log4cpp library is used.])], + [AC_MSG_ERROR([unable to link with log4cpp])]) fi -AC_CHECK_HEADER([log4cpp/Category.hh],,AC_MSG_ERROR([unable to find log4cpp header files])) -AC_CHECK_HEADER([log4cpp/PropertyConfigurator.hh],,AC_MSG_ERROR([you need at least log4cpp 0.3.x])) +AC_CHECK_HEADER([log4shib/Category.hh],,AC_MSG_ERROR([unable to find log4shib header files])) AC_TRY_LINK( - [#include ], - [log4cpp::Category::getInstance("foo")], - [AC_DEFINE(HAVE_LIBLOG4CPP,1,[Define if log4cpp library was found])], - [AC_MSG_ERROR([unable to link with log4cpp])]) + [#include ], + [log4shib::Category::getInstance("foo")], + [AC_DEFINE(OPENSAML_LOG4SHIB,1,[Define if log4shib library is used.])], + [AC_MSG_ERROR([unable to link with log4shib])]) # Xerces settings AC_ARG_WITH(xerces, diff --git a/saml/SAMLConfig.cpp b/saml/SAMLConfig.cpp index 88aa180..6328b84 100644 --- a/saml/SAMLConfig.cpp +++ b/saml/SAMLConfig.cpp @@ -22,6 +22,19 @@ */ #include "internal.h" + +#if defined(XMLTOOLING_LOG4SHIB) +# ifndef OPENSAML_LOG4SHIB +# error "Logging library mismatch (XMLTooling is using log4shib)." +# endif +#elif defined(XMLTOOLING_LOG4CPP) +# ifndef OPENSAML_LOG4CPP +# error "Logging library mismatch (XMLTooling is using log4cpp)." +# endif +#else +# error "No supported logging library." +#endif + #include "exceptions.h" #include "SAMLConfig.h" #include "binding/ArtifactMap.h" @@ -37,19 +50,19 @@ #include "saml2/metadata/MetadataProvider.h" #include "util/SAMLConstants.h" +#include #include #include #include -#include #include #include #include using namespace opensaml; using namespace xmlsignature; +using namespace xmltooling::logging; using namespace xmltooling; -using namespace log4cpp; using namespace std; // Expose entry points when used as an extension library diff --git a/saml/binding/impl/ArtifactMap.cpp b/saml/binding/impl/ArtifactMap.cpp index 2028ac0..19c92a1 100644 --- a/saml/binding/impl/ArtifactMap.cpp +++ b/saml/binding/impl/ArtifactMap.cpp @@ -25,15 +25,15 @@ #include "binding/ArtifactMap.h" #include "binding/SAMLArtifact.h" -#include #include +#include #include #include #include using namespace opensaml; +using namespace xmltooling::logging; using namespace xmltooling; -using namespace log4cpp; using namespace std; namespace opensaml { diff --git a/saml/binding/impl/ClientCertAuthRule.cpp b/saml/binding/impl/ClientCertAuthRule.cpp index 072761b..b3ad352 100644 --- a/saml/binding/impl/ClientCertAuthRule.cpp +++ b/saml/binding/impl/ClientCertAuthRule.cpp @@ -27,14 +27,14 @@ #include "saml2/metadata/MetadataCredentialCriteria.h" #include "saml2/metadata/MetadataProvider.h" +#include #include #include -#include using namespace opensaml::saml2md; using namespace opensaml; +using namespace xmltooling::logging; using namespace xmltooling; -using namespace log4cpp; using namespace std; namespace opensaml { diff --git a/saml/binding/impl/MessageFlowRule.cpp b/saml/binding/impl/MessageFlowRule.cpp index 1b19ae1..af43c8e 100644 --- a/saml/binding/impl/MessageFlowRule.cpp +++ b/saml/binding/impl/MessageFlowRule.cpp @@ -24,13 +24,13 @@ #include "exceptions.h" #include "binding/SecurityPolicyRule.h" -#include +#include #include #include using namespace opensaml; +using namespace xmltooling::logging; using namespace xmltooling; -using namespace log4cpp; using namespace std; namespace opensaml { diff --git a/saml/binding/impl/NullSecurityRule.cpp b/saml/binding/impl/NullSecurityRule.cpp index e861072..f113234 100644 --- a/saml/binding/impl/NullSecurityRule.cpp +++ b/saml/binding/impl/NullSecurityRule.cpp @@ -23,11 +23,11 @@ #include "internal.h" #include "binding/SecurityPolicyRule.h" -#include +#include using namespace opensaml; +using namespace xmltooling::logging; using namespace xmltooling; -using namespace log4cpp; using namespace std; namespace opensaml { diff --git a/saml/binding/impl/SimpleSigningRule.cpp b/saml/binding/impl/SimpleSigningRule.cpp index 5d52df9..32ef466 100644 --- a/saml/binding/impl/SimpleSigningRule.cpp +++ b/saml/binding/impl/SimpleSigningRule.cpp @@ -28,15 +28,15 @@ #include "saml2/metadata/MetadataCredentialCriteria.h" #include "saml2/metadata/MetadataProvider.h" -#include #include +#include #include #include using namespace opensaml::saml2md; using namespace opensaml; +using namespace xmltooling::logging; using namespace xmltooling; -using namespace log4cpp; using namespace std; using xmlsignature::KeyInfo; diff --git a/saml/binding/impl/XMLSigningRule.cpp b/saml/binding/impl/XMLSigningRule.cpp index 3cb3daf..f5a3027 100644 --- a/saml/binding/impl/XMLSigningRule.cpp +++ b/saml/binding/impl/XMLSigningRule.cpp @@ -29,13 +29,13 @@ #include "saml2/metadata/MetadataProvider.h" #include "signature/SignatureProfileValidator.h" -#include +#include #include using namespace opensaml::saml2md; using namespace opensaml; +using namespace xmltooling::logging; using namespace xmltooling; -using namespace log4cpp; using namespace std; using xmlsignature::SignatureException; diff --git a/saml/saml.vcproj b/saml/saml.vcproj index 665cdd8..1314ae8 100644 --- a/saml/saml.vcproj +++ b/saml/saml.vcproj @@ -61,7 +61,7 @@ /> +#include #include #include #include @@ -36,8 +36,8 @@ using namespace opensaml::saml2md; using namespace opensaml::saml1p; using namespace opensaml; +using namespace xmltooling::logging; using namespace xmltooling; -using namespace log4cpp; using namespace std; namespace opensaml { diff --git a/saml/saml1/binding/impl/SAML1ArtifactEncoder.cpp b/saml/saml1/binding/impl/SAML1ArtifactEncoder.cpp index 9ae3790..b592b7b 100644 --- a/saml/saml1/binding/impl/SAML1ArtifactEncoder.cpp +++ b/saml/saml1/binding/impl/SAML1ArtifactEncoder.cpp @@ -29,7 +29,7 @@ #include "saml1/core/Protocols.h" #include "saml2/metadata/Metadata.h" -#include +#include #include #include #include @@ -40,8 +40,8 @@ using namespace opensaml::saml1p; 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 { diff --git a/saml/saml1/binding/impl/SAML1MessageRule.cpp b/saml/saml1/binding/impl/SAML1MessageRule.cpp index e7897f5..665b912 100644 --- a/saml/saml1/binding/impl/SAML1MessageRule.cpp +++ b/saml/saml1/binding/impl/SAML1MessageRule.cpp @@ -31,13 +31,13 @@ #include "saml2/metadata/MetadataProvider.h" #include "util/SAMLConstants.h" -#include +#include using namespace opensaml::saml2md; using namespace opensaml::saml1p; using namespace opensaml; +using namespace xmltooling::logging; using namespace xmltooling; -using namespace log4cpp; using namespace std; namespace opensaml { diff --git a/saml/saml1/binding/impl/SAML1POSTDecoder.cpp b/saml/saml1/binding/impl/SAML1POSTDecoder.cpp index bc00f7f..c700433 100644 --- a/saml/saml1/binding/impl/SAML1POSTDecoder.cpp +++ b/saml/saml1/binding/impl/SAML1POSTDecoder.cpp @@ -28,8 +28,8 @@ #include "saml2/metadata/Metadata.h" #include "saml2/metadata/MetadataProvider.h" -#include #include +#include #include #include #include @@ -38,8 +38,8 @@ using namespace opensaml::saml2md; using namespace opensaml::saml1p; using namespace opensaml::saml1; using namespace opensaml; +using namespace xmltooling::logging; using namespace xmltooling; -using namespace log4cpp; using namespace std; namespace opensaml { diff --git a/saml/saml1/binding/impl/SAML1POSTEncoder.cpp b/saml/saml1/binding/impl/SAML1POSTEncoder.cpp index b43afe0..3a6feae 100644 --- a/saml/saml1/binding/impl/SAML1POSTEncoder.cpp +++ b/saml/saml1/binding/impl/SAML1POSTEncoder.cpp @@ -28,8 +28,8 @@ #include #include -#include #include +#include #include #include @@ -37,8 +37,8 @@ using namespace opensaml::saml1p; 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 { diff --git a/saml/saml1/binding/impl/SAML1SOAPClient.cpp b/saml/saml1/binding/impl/SAML1SOAPClient.cpp index bcd76c1..07e4121 100644 --- a/saml/saml1/binding/impl/SAML1SOAPClient.cpp +++ b/saml/saml1/binding/impl/SAML1SOAPClient.cpp @@ -26,15 +26,15 @@ #include "saml1/core/Protocols.h" #include "saml2/metadata/Metadata.h" -#include +#include #include using namespace opensaml::saml1p; using namespace opensaml::saml2md; using namespace opensaml; using namespace soap11; +using namespace xmltooling::logging; using namespace xmltooling; -using namespace log4cpp; using namespace std; void SAML1SOAPClient::sendSAML(Request* request, MetadataCredentialCriteria& peer, const char* endpoint) diff --git a/saml/saml1/binding/impl/SAML1SOAPDecoder.cpp b/saml/saml1/binding/impl/SAML1SOAPDecoder.cpp index 7888824..47f2c60 100644 --- a/saml/saml1/binding/impl/SAML1SOAPDecoder.cpp +++ b/saml/saml1/binding/impl/SAML1SOAPDecoder.cpp @@ -25,7 +25,7 @@ #include "binding/MessageDecoder.h" #include "saml1/core/Protocols.h" -#include +#include #include #include #include @@ -33,8 +33,8 @@ using namespace opensaml::saml1p; using namespace opensaml; using namespace soap11; +using namespace xmltooling::logging; using namespace xmltooling; -using namespace log4cpp; using namespace std; namespace opensaml { diff --git a/saml/saml1/binding/impl/SAML1SOAPEncoder.cpp b/saml/saml1/binding/impl/SAML1SOAPEncoder.cpp index 1bb42b3..df00a95 100644 --- a/saml/saml1/binding/impl/SAML1SOAPEncoder.cpp +++ b/saml/saml1/binding/impl/SAML1SOAPEncoder.cpp @@ -27,7 +27,7 @@ #include "saml1/core/Protocols.h" #include -#include +#include #include #include #include @@ -37,8 +37,8 @@ using namespace opensaml::saml2md; using namespace opensaml; using namespace xmlsignature; using namespace soap11; +using namespace xmltooling::logging; using namespace xmltooling; -using namespace log4cpp; using namespace std; namespace opensaml { diff --git a/saml/saml1/profile/AssertionValidator.cpp b/saml/saml1/profile/AssertionValidator.cpp index 4d3b875..82c94e1 100644 --- a/saml/saml1/profile/AssertionValidator.cpp +++ b/saml/saml1/profile/AssertionValidator.cpp @@ -24,12 +24,12 @@ #include "saml1/core/Assertions.h" #include "saml1/profile/AssertionValidator.h" -#include +#include #include using namespace opensaml::saml1; +using namespace xmltooling::logging; using namespace xmltooling; -using namespace log4cpp; using namespace std; void AssertionValidator::validate(const xmltooling::XMLObject* xmlObject) const diff --git a/saml/saml1/profile/BrowserSSOProfileValidator.cpp b/saml/saml1/profile/BrowserSSOProfileValidator.cpp index e58068e..901fb6e 100644 --- a/saml/saml1/profile/BrowserSSOProfileValidator.cpp +++ b/saml/saml1/profile/BrowserSSOProfileValidator.cpp @@ -24,12 +24,12 @@ #include "saml1/core/Assertions.h" #include "saml1/profile/BrowserSSOProfileValidator.h" -#include +#include #include using namespace opensaml::saml1; +using namespace xmltooling::logging; using namespace xmltooling; -using namespace log4cpp; using namespace std; namespace { diff --git a/saml/saml2/binding/impl/SAML2ArtifactDecoder.cpp b/saml/saml2/binding/impl/SAML2ArtifactDecoder.cpp index c5f8c6f..553d8a5 100644 --- a/saml/saml2/binding/impl/SAML2ArtifactDecoder.cpp +++ b/saml/saml2/binding/impl/SAML2ArtifactDecoder.cpp @@ -28,7 +28,7 @@ #include "saml2/metadata/Metadata.h" #include "saml2/metadata/MetadataProvider.h" -#include +#include #include #include #include @@ -37,8 +37,8 @@ using namespace opensaml::saml2md; using namespace opensaml::saml2p; using namespace opensaml::saml2; using namespace opensaml; +using namespace xmltooling::logging; using namespace xmltooling; -using namespace log4cpp; using namespace std; namespace opensaml { diff --git a/saml/saml2/binding/impl/SAML2ArtifactEncoder.cpp b/saml/saml2/binding/impl/SAML2ArtifactEncoder.cpp index 7480aec..75401c9 100644 --- a/saml/saml2/binding/impl/SAML2ArtifactEncoder.cpp +++ b/saml/saml2/binding/impl/SAML2ArtifactEncoder.cpp @@ -30,7 +30,7 @@ #include #include -#include +#include #include #include #include @@ -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 { diff --git a/saml/saml2/binding/impl/SAML2MessageRule.cpp b/saml/saml2/binding/impl/SAML2MessageRule.cpp index 55caab5..76649b1 100644 --- a/saml/saml2/binding/impl/SAML2MessageRule.cpp +++ b/saml/saml2/binding/impl/SAML2MessageRule.cpp @@ -28,14 +28,14 @@ #include "saml2/metadata/MetadataProvider.h" #include "util/SAMLConstants.h" -#include +#include using namespace opensaml::saml2md; using namespace opensaml::saml2p; using namespace opensaml::saml2; using namespace opensaml; +using namespace xmltooling::logging; using namespace xmltooling; -using namespace log4cpp; using namespace std; namespace opensaml { diff --git a/saml/saml2/binding/impl/SAML2POSTDecoder.cpp b/saml/saml2/binding/impl/SAML2POSTDecoder.cpp index f85e0f3..cdb8060 100644 --- a/saml/saml2/binding/impl/SAML2POSTDecoder.cpp +++ b/saml/saml2/binding/impl/SAML2POSTDecoder.cpp @@ -27,7 +27,7 @@ #include "saml2/metadata/Metadata.h" #include "saml2/metadata/MetadataProvider.h" -#include +#include #include #include #include @@ -37,8 +37,8 @@ using namespace opensaml::saml2md; using namespace opensaml::saml2p; using namespace opensaml::saml2; using namespace opensaml; +using namespace xmltooling::logging; using namespace xmltooling; -using namespace log4cpp; using namespace std; namespace opensaml { diff --git a/saml/saml2/binding/impl/SAML2POSTEncoder.cpp b/saml/saml2/binding/impl/SAML2POSTEncoder.cpp index 662d52f..65ccb38 100644 --- a/saml/saml2/binding/impl/SAML2POSTEncoder.cpp +++ b/saml/saml2/binding/impl/SAML2POSTEncoder.cpp @@ -28,8 +28,8 @@ #include #include -#include #include +#include #include #include @@ -37,8 +37,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 { diff --git a/saml/saml2/binding/impl/SAML2Redirect.cpp b/saml/saml2/binding/impl/SAML2Redirect.cpp index 2bd108e..bca5866 100644 --- a/saml/saml2/binding/impl/SAML2Redirect.cpp +++ b/saml/saml2/binding/impl/SAML2Redirect.cpp @@ -24,10 +24,10 @@ #include "saml2/binding/SAML2Redirect.h" #include -#include +#include #include -using namespace log4cpp; +using namespace xmltooling::logging; using namespace std; namespace { diff --git a/saml/saml2/binding/impl/SAML2RedirectDecoder.cpp b/saml/saml2/binding/impl/SAML2RedirectDecoder.cpp index 6d9eff7..2728f9d 100644 --- a/saml/saml2/binding/impl/SAML2RedirectDecoder.cpp +++ b/saml/saml2/binding/impl/SAML2RedirectDecoder.cpp @@ -28,8 +28,8 @@ #include "saml2/metadata/Metadata.h" #include "saml2/metadata/MetadataProvider.h" -#include #include +#include #include #include #include @@ -39,8 +39,8 @@ using namespace opensaml::saml2p; using namespace opensaml::saml2; using namespace opensaml; using namespace xmlsignature; +using namespace xmltooling::logging; using namespace xmltooling; -using namespace log4cpp; using namespace std; namespace opensaml { diff --git a/saml/saml2/binding/impl/SAML2RedirectEncoder.cpp b/saml/saml2/binding/impl/SAML2RedirectEncoder.cpp index 937f8ea..d0ed6d0 100644 --- a/saml/saml2/binding/impl/SAML2RedirectEncoder.cpp +++ b/saml/saml2/binding/impl/SAML2RedirectEncoder.cpp @@ -28,8 +28,8 @@ #include #include -#include #include +#include #include #include #include @@ -38,8 +38,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 { diff --git a/saml/saml2/binding/impl/SAML2SOAPClient.cpp b/saml/saml2/binding/impl/SAML2SOAPClient.cpp index 92f835a..af55891 100644 --- a/saml/saml2/binding/impl/SAML2SOAPClient.cpp +++ b/saml/saml2/binding/impl/SAML2SOAPClient.cpp @@ -26,15 +26,15 @@ #include "saml2/core/Protocols.h" #include "saml2/metadata/Metadata.h" -#include +#include #include using namespace opensaml::saml2p; using namespace opensaml::saml2md; using namespace opensaml; using namespace soap11; +using namespace xmltooling::logging; using namespace xmltooling; -using namespace log4cpp; using namespace std; void SAML2SOAPClient::sendSAML(RequestAbstractType* request, MetadataCredentialCriteria& peer, const char* endpoint) diff --git a/saml/saml2/binding/impl/SAML2SOAPDecoder.cpp b/saml/saml2/binding/impl/SAML2SOAPDecoder.cpp index ee4695e..a0111e5 100644 --- a/saml/saml2/binding/impl/SAML2SOAPDecoder.cpp +++ b/saml/saml2/binding/impl/SAML2SOAPDecoder.cpp @@ -25,7 +25,7 @@ #include "binding/MessageDecoder.h" #include "saml2/core/Protocols.h" -#include +#include #include #include #include @@ -33,8 +33,8 @@ using namespace opensaml::saml2p; using namespace opensaml; using namespace soap11; +using namespace xmltooling::logging; using namespace xmltooling; -using namespace log4cpp; using namespace std; namespace opensaml { diff --git a/saml/saml2/binding/impl/SAML2SOAPEncoder.cpp b/saml/saml2/binding/impl/SAML2SOAPEncoder.cpp index 1924ec0..9eaac3f 100644 --- a/saml/saml2/binding/impl/SAML2SOAPEncoder.cpp +++ b/saml/saml2/binding/impl/SAML2SOAPEncoder.cpp @@ -27,7 +27,7 @@ #include "saml2/core/Protocols.h" #include -#include +#include #include #include #include @@ -37,8 +37,8 @@ using namespace opensaml::saml2md; using namespace opensaml; using namespace xmlsignature; using namespace soap11; +using namespace xmltooling::logging; using namespace xmltooling; -using namespace log4cpp; using namespace std; namespace opensaml { diff --git a/saml/saml2/core/impl/Assertions.cpp b/saml/saml2/core/impl/Assertions.cpp index dbbc6e3..d87a9db 100644 --- a/saml/saml2/core/impl/Assertions.cpp +++ b/saml/saml2/core/impl/Assertions.cpp @@ -29,7 +29,7 @@ #include "saml2/metadata/MetadataCredentialContext.h" #include "saml2/metadata/MetadataCredentialCriteria.h" -#include +#include #include #include @@ -109,7 +109,7 @@ void EncryptedElementType::encrypt( const Credential* KEK = r->first->resolve(r->second); if (!KEK) { auto_ptr_char name(dynamic_cast(r->second->getRole().getParent())->getEntityID()); - log4cpp::Category::getInstance(SAML_LOGCAT".Encryption").warn("No key encryption credential found for (%s).", name.get()); + logging::Category::getInstance(SAML_LOGCAT".Encryption").warn("No key encryption credential found for (%s).", name.get()); continue; } diff --git a/saml/saml2/metadata/impl/BlacklistMetadataFilter.cpp b/saml/saml2/metadata/impl/BlacklistMetadataFilter.cpp index 53d8f7f..1a4a834 100644 --- a/saml/saml2/metadata/impl/BlacklistMetadataFilter.cpp +++ b/saml/saml2/metadata/impl/BlacklistMetadataFilter.cpp @@ -24,12 +24,12 @@ #include "saml2/metadata/Metadata.h" #include "saml2/metadata/MetadataFilter.h" -#include +#include #include using namespace opensaml::saml2md; +using namespace xmltooling::logging; using namespace xmltooling; -using namespace log4cpp; using namespace std; namespace opensaml { diff --git a/saml/saml2/metadata/impl/ChainingMetadataProvider.cpp b/saml/saml2/metadata/impl/ChainingMetadataProvider.cpp index 11c10da..25bc3db 100644 --- a/saml/saml2/metadata/impl/ChainingMetadataProvider.cpp +++ b/saml/saml2/metadata/impl/ChainingMetadataProvider.cpp @@ -24,15 +24,16 @@ #include "exceptions.h" #include "saml2/metadata/ChainingMetadataProvider.h" -#include -#include #include +#include +#include + 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 { diff --git a/saml/saml2/metadata/impl/MetadataProvider.cpp b/saml/saml2/metadata/impl/MetadataProvider.cpp index fcc3aaf..152f994 100644 --- a/saml/saml2/metadata/impl/MetadataProvider.cpp +++ b/saml/saml2/metadata/impl/MetadataProvider.cpp @@ -24,15 +24,15 @@ #include "saml2/metadata/MetadataFilter.h" #include "saml2/metadata/MetadataProvider.h" -#include #include +#include #include #include using namespace opensaml::saml2md; using namespace opensaml; +using namespace xmltooling::logging; using namespace xmltooling; -using namespace log4cpp; using namespace std; namespace opensaml { diff --git a/saml/saml2/metadata/impl/SignatureMetadataFilter.cpp b/saml/saml2/metadata/impl/SignatureMetadataFilter.cpp index a1fca6e..b108799 100644 --- a/saml/saml2/metadata/impl/SignatureMetadataFilter.cpp +++ b/saml/saml2/metadata/impl/SignatureMetadataFilter.cpp @@ -25,8 +25,7 @@ #include "saml2/metadata/MetadataFilter.h" #include "signature/SignatureProfileValidator.h" -#include - +#include #include #include #include @@ -36,8 +35,8 @@ 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 { diff --git a/saml/saml2/metadata/impl/WhitelistMetadataFilter.cpp b/saml/saml2/metadata/impl/WhitelistMetadataFilter.cpp index 76d6de3..d351e77 100644 --- a/saml/saml2/metadata/impl/WhitelistMetadataFilter.cpp +++ b/saml/saml2/metadata/impl/WhitelistMetadataFilter.cpp @@ -24,12 +24,12 @@ #include "saml2/metadata/Metadata.h" #include "saml2/metadata/MetadataFilter.h" -#include +#include #include using namespace opensaml::saml2md; +using namespace xmltooling::logging; using namespace xmltooling; -using namespace log4cpp; using namespace std; namespace opensaml { diff --git a/saml/saml2/metadata/impl/XMLMetadataProvider.cpp b/saml/saml2/metadata/impl/XMLMetadataProvider.cpp index ffa4411..d0d3ad2 100644 --- a/saml/saml2/metadata/impl/XMLMetadataProvider.cpp +++ b/saml/saml2/metadata/impl/XMLMetadataProvider.cpp @@ -29,8 +29,8 @@ #include using namespace opensaml::saml2md; +using namespace xmltooling::logging; using namespace xmltooling; -using namespace log4cpp; using namespace std; #if defined (_MSC_VER) diff --git a/saml/saml2/profile/Assertion20Validator.cpp b/saml/saml2/profile/Assertion20Validator.cpp index bdc558b..3109ec7 100644 --- a/saml/saml2/profile/Assertion20Validator.cpp +++ b/saml/saml2/profile/Assertion20Validator.cpp @@ -24,12 +24,12 @@ #include "saml2/core/Assertions.h" #include "saml2/profile/AssertionValidator.h" -#include +#include #include using namespace opensaml::saml2; +using namespace xmltooling::logging; using namespace xmltooling; -using namespace log4cpp; using namespace std; void AssertionValidator::validate(const xmltooling::XMLObject* xmlObject) const diff --git a/saml/saml2/profile/BrowserSSOProfile20Validator.cpp b/saml/saml2/profile/BrowserSSOProfile20Validator.cpp index a05008e..a709266 100644 --- a/saml/saml2/profile/BrowserSSOProfile20Validator.cpp +++ b/saml/saml2/profile/BrowserSSOProfile20Validator.cpp @@ -24,12 +24,12 @@ #include "saml2/core/Assertions.h" #include "saml2/profile/BrowserSSOProfileValidator.h" -#include +#include #include using namespace opensaml::saml2; +using namespace xmltooling::logging; using namespace xmltooling; -using namespace log4cpp; using namespace std; void BrowserSSOProfileValidator::validateAssertion(const Assertion& assertion) const -- 2.1.4