Convert logging to log4shib via compile time switch.
[shibboleth/opensaml2.git] / saml / saml2 / metadata / impl / XMLMetadataProvider.cpp
index 49f8c2c..d0d3ad2 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  Copyright 2001-2006 Internet2
+ *  Copyright 2001-2007 Internet2
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 #include "internal.h"
 #include "saml2/metadata/Metadata.h"
+#include "saml2/metadata/MetadataFilter.h"
 #include "saml2/metadata/AbstractMetadataProvider.h"
 
-#include <log4cpp/Category.hh>
 #include <xmltooling/util/NDC.h>
 #include <xmltooling/util/ReloadableXMLFile.h>
 
 using namespace opensaml::saml2md;
+using namespace xmltooling::logging;
 using namespace xmltooling;
-using namespace log4cpp;
 using namespace std;
 
 #if defined (_MSC_VER)
@@ -44,7 +44,10 @@ namespace opensaml {
         class SAML_DLLLOCAL XMLMetadataProvider : public AbstractMetadataProvider, public ReloadableXMLFile
         {
         public:
-            XMLMetadataProvider(const DOMElement* e) : AbstractMetadataProvider(e), ReloadableXMLFile(e), m_object(NULL) {}
+            XMLMetadataProvider(const DOMElement* e)
+                : AbstractMetadataProvider(e), ReloadableXMLFile(e, Category::getInstance(SAML_LOGCAT".MetadataProvider")),
+                    m_object(NULL) {
+            }
             virtual ~XMLMetadataProvider() {
                 delete m_object;
             }
@@ -60,12 +63,8 @@ namespace opensaml {
         protected:
             pair<bool,DOMElement*> load();
 
-            bool isValid() const {
-                const TimeBoundSAMLObject* bound=dynamic_cast<const TimeBoundSAMLObject*>(m_object);
-                return bound ? bound->isValid() : false;
-            }
-
         private:
+            using AbstractMetadataProvider::index;
             void index();
         
             XMLObject* m_object;