https://issues.shibboleth.net/jira/browse/CPPXT-54
[shibboleth/cpp-xmltooling.git] / xmltooling / util / NDC.cpp
index 2867a4c..ac23379 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 "logging.h"
 #include "util/NDC.h"
 
-#include <log4cpp/NDC.hh>
+#if defined(XMLTOOLING_LOG4SHIB)
+# include <log4shib/NDC.hh>
+#elif defined(XMLTOOLING_LOG4CPP)
+# include <log4cpp/NDC.hh>
+#endif
 
 using namespace xmltooling;
 
 NDC::NDC(const char* context)
 {
-    log4cpp::NDC::push(context);
+    logging::NDC::push(context);
 }
 
 NDC::NDC(const std::string& context)
 {
-    log4cpp::NDC::push(context);
+    logging::NDC::push(context);
 }
 
 NDC::~NDC()
 {
-    log4cpp::NDC::pop();
+    logging::NDC::pop();
 }