[shibboleth-sp2] 36/119: Backport logging changes.
Ferenc Wágner
wferi-guest at moszumanska.debian.org
Tue Jan 26 21:29:48 UTC 2016
This is an automated email from the git hooks/post-receive script.
wferi-guest pushed a commit to annotated tag 1.3.1
in repository shibboleth-sp2.
commit 38b114edd91647486bb41f7d425f55f6f12f55af
Author: Scott Cantor <cantor.2 at osu.edu>
Date: Wed Aug 8 03:10:11 2007 +0000
Backport logging changes.
---
.cproject | 32 +++++++++++++++++
adfs/adfs.cpp | 3 +-
adfs/adfs.dsp | 4 +--
adfs/handlers.cpp | 2 +-
adfs/internal.h | 23 +++++++++++-
adfs/listener.cpp | 3 +-
apache/mod_shib13.dsp | 4 +--
apache/mod_shib20.dsp | 4 +--
apache/mod_shib22.dsp | 4 +--
config_win32.h | 7 ++--
configure.ac | 62 ++++++++++++++++++++++++---------
isapi_shib/isapi_shib.dsp | 4 +--
nsapi_shib/nsapi_shib.dsp | 4 +--
shar/shar-utils.cpp | 3 +-
shar/shar-utils.h | 14 ++++++++
shar/shar.cpp | 4 +--
shar/shar.dsp | 4 +--
shar/shibrpc-server.cpp | 5 +--
shib-mysql-ccache/shib-mysql-ccache.cpp | 19 ++++++++--
shib-mysql-ccache/shib_mysql_ccache.dsp | 4 +--
shib-target/ArtifactMapper.cpp | 2 +-
shib-target/MemoryListener.cpp | 2 +-
shib-target/RPCListener.cpp | 2 +-
shib-target/ShibHTTPHook.cpp | 4 +--
shib-target/XMLRequestMapper.cpp | 4 +--
shib-target/internal.h | 27 ++++++++++----
shib-target/shib-ccache.cpp | 5 ++-
shib-target/shib-config.cpp | 10 ++++--
shib-target/shib-handlers.cpp | 2 +-
shib-target/shib-ini.cpp | 11 ++++--
shib-target/shib-mlp.cpp | 7 ++--
shib-target/shib-sock.cpp | 2 +-
shib-target/shib-target.cpp | 2 +-
shib-target/shibtarget.dsp | 4 +--
shib/BasicTrust.cpp | 2 +-
shib/Metadata.cpp | 2 +-
shib/ReloadableXMLFile.cpp | 2 +-
shib/ScopedAttribute.cpp | 3 +-
shib/ShibBrowserProfile.cpp | 2 +-
shib/ShibConfig.cpp | 4 +--
shib/ShibbolethTrust.cpp | 2 +-
shib/internal.h | 16 ++++++++-
shib/shib.dsp | 4 +--
siterefresh/siterefresh.cpp | 26 ++++++++++++--
siterefresh/siterefresh.dsp | 4 +--
xmlproviders/CredResolvers.cpp | 5 ++-
xmlproviders/XMLAAP.cpp | 4 +--
xmlproviders/XMLAccessControl.cpp | 4 +--
xmlproviders/XMLCredentials.cpp | 4 +--
xmlproviders/XMLMetadata.cpp | 3 +-
xmlproviders/XMLProviders.cpp | 5 ++-
xmlproviders/XMLTrust.cpp | 3 +-
xmlproviders/internal.h | 23 ++++++++++++
xmlproviders/xmlproviders.dsp | 4 +--
54 files changed, 297 insertions(+), 118 deletions(-)
diff --git a/.cproject b/.cproject
new file mode 100644
index 0000000..db53fd1
--- /dev/null
+++ b/.cproject
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?fileVersion 4.0.0?>
+
+<cproject>
+<storageModule moduleId="org.eclipse.cdt.core.settings">
+<cconfiguration id="converted.config.1765078528">
+<storageModule moduleId="org.eclipse.cdt.core.pathentry">
+<pathentry exclude="rpc" kind="src" path="oncrpc"/>
+<pathentry kind="src" path="oncrpc/rpc"/>
+<pathentry kind="src" path="shib"/>
+<pathentry kind="src" path="shib-target"/>
+<pathentry kind="src" path="shar"/>
+<pathentry kind="src" path="xmlproviders"/>
+<pathentry kind="src" path="adfs"/>
+<pathentry kind="src" path="apache"/>
+<pathentry kind="src" path="isapi_shib"/>
+<pathentry kind="src" path="nsapi_shib"/>
+<pathentry kind="src" path="shib-mysql-ccache"/>
+<pathentry kind="src" path="siterefresh"/>
+<pathentry kind="src" path="test"/>
+<pathentry kind="out" path=""/>
+</storageModule>
+<storageModule buildSystemId="org.eclipse.cdt.core.defaultConfigDataProvider" id="converted.config.1765078528" moduleId="org.eclipse.cdt.core.settings" name="convertedConfig">
+<externalSettings/>
+<extensions>
+<extension id="org.eclipse.cdt.core.originalsourceindexer" point="org.eclipse.cdt.core.CIndexer"/>
+<extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>
+</extensions>
+</storageModule>
+</cconfiguration>
+</storageModule>
+</cproject>
diff --git a/adfs/adfs.cpp b/adfs/adfs.cpp
index 4baaf51..d0b776c 100644
--- a/adfs/adfs.cpp
+++ b/adfs/adfs.cpp
@@ -36,7 +36,8 @@ using namespace saml;
using namespace shibboleth;
using namespace shibtarget;
using namespace adfs;
-using namespace log4cpp;
+using namespace adfs::logging;
+
// Plugin Factories
PlugManager::Factory ADFSListenerFactory;
diff --git a/adfs/adfs.dsp b/adfs/adfs.dsp
index b485d0c..2d807ab 100644
--- a/adfs/adfs.dsp
+++ b/adfs/adfs.dsp
@@ -53,7 +53,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
-# ADD LINK32 log4cpp.lib xerces-c_2.lib saml_5.lib /nologo /dll /machine:I386 /out:"Release/adfs.so" /libpath:"..\..\cpp-opensaml1\saml\Release"
+# ADD LINK32 xerces-c_2.lib log4shib1.lib saml_5.lib /nologo /dll /machine:I386 /out:"Release/adfs.so" /libpath:"..\..\cpp-opensaml1\saml\Release"
!ELSEIF "$(CFG)" == "adfs - Win32 Debug"
@@ -79,7 +79,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 log4cppD.lib xerces-c_2D.lib saml_5D.lib /nologo /dll /debug /machine:I386 /out:"Debug/adfs.so" /pdbtype:sept /libpath:"..\..\cpp-opensaml1\saml\Debug"
+# ADD LINK32 xerces-c_2D.lib log4shib1D.lib saml_5D.lib /nologo /dll /debug /machine:I386 /out:"Debug/adfs.so" /pdbtype:sept /libpath:"..\..\cpp-opensaml1\saml\Debug"
!ENDIF
diff --git a/adfs/handlers.cpp b/adfs/handlers.cpp
index 5d4c7b1..fc69ce3 100644
--- a/adfs/handlers.cpp
+++ b/adfs/handlers.cpp
@@ -32,7 +32,7 @@ using namespace saml;
using namespace shibboleth;
using namespace shibtarget;
using namespace adfs;
-using namespace log4cpp;
+using namespace adfs::logging;
namespace {
diff --git a/adfs/internal.h b/adfs/internal.h
index 8b5249a..7781353 100644
--- a/adfs/internal.h
+++ b/adfs/internal.h
@@ -30,7 +30,28 @@
#include <shib-target/shib-target.h>
#include <shib-target/hresult.h>
-#include <log4cpp/Category.hh>
+#if defined (_MSC_VER) || defined(__BORLANDC__)
+# include "config_win32.h"
+#else
+# include "config.h"
+#endif
+
+#if defined(HAVE_LOG4SHIB)
+# include <log4shib/Category.hh>
+# include <log4shib/FixedContextCategory.hh>
+namespace adfs {
+ namespace logging = log4shib;
+};
+#elif defined(HAVE_LOG4CPP)
+# include <log4cpp/Category.hh>
+# include <log4cpp/FixedContextCategory.hh>
+namespace adfs {
+ namespace logging = log4cpp;
+};
+#else
+# error "Supported logging library not available."
+#endif
+
#define ADFS_LOGCAT "shibtarget"
#define SHIBTRAN_LOGCAT "Shibboleth-TRANSACTION"
diff --git a/adfs/listener.cpp b/adfs/listener.cpp
index 561bd62..9e10c04 100644
--- a/adfs/listener.cpp
+++ b/adfs/listener.cpp
@@ -24,15 +24,14 @@
#include "internal.h"
-#include <log4cpp/FixedContextCategory.hh>
#include <xercesc/framework/MemBufInputSource.hpp>
using namespace std;
-using namespace log4cpp;
using namespace saml;
using namespace shibboleth;
using namespace shibtarget;
using namespace adfs;
+using namespace adfs::logging;
namespace {
class ADFSListener : public virtual IListener
diff --git a/apache/mod_shib13.dsp b/apache/mod_shib13.dsp
index 3ea6187..9ddf8ef 100644
--- a/apache/mod_shib13.dsp
+++ b/apache/mod_shib13.dsp
@@ -53,7 +53,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
-# ADD LINK32 log4cpp.lib xerces-c_2.lib ApacheCore.lib saml_5.lib /nologo /dll /machine:I386 /out:"Release/mod_shib_13.so" /libpath:"\Apache\libexec" /libpath:"..\..\cpp-opensaml1\saml\Release"
+# ADD LINK32 xerces-c_2.lib ApacheCore.lib saml_5.lib /nologo /dll /machine:I386 /out:"Release/mod_shib_13.so" /libpath:"\Apache\libexec" /libpath:"..\..\cpp-opensaml1\saml\Release"
!ELSEIF "$(CFG)" == "mod_shib13 - Win32 Debug"
@@ -79,7 +79,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 log4cppD.lib xerces-c_2D.lib ApacheCore.lib saml_5D.lib /nologo /dll /debug /machine:I386 /out:"Debug/mod_shib_13.so" /pdbtype:sept /libpath:"\Apache\libexec" /libpath:"..\..\cpp-opensaml1\saml\Debug"
+# ADD LINK32 xerces-c_2D.lib ApacheCore.lib saml_5D.lib /nologo /dll /debug /machine:I386 /out:"Debug/mod_shib_13.so" /pdbtype:sept /libpath:"\Apache\libexec" /libpath:"..\..\cpp-opensaml1\saml\Debug"
!ENDIF
diff --git a/apache/mod_shib20.dsp b/apache/mod_shib20.dsp
index 02dca9a..8a6a7cf 100644
--- a/apache/mod_shib20.dsp
+++ b/apache/mod_shib20.dsp
@@ -53,7 +53,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
-# ADD LINK32 log4cpp.lib xerces-c_2.lib libapr.lib libaprutil.lib libhttpd.lib saml_5.lib /nologo /dll /machine:I386 /out:"mod_shib20___Win32_Release/mod_shib_20.so" /libpath:"\Apache2\lib" /libpath:"..\..\cpp-opensaml1\saml\Release"
+# ADD LINK32 libapr.lib libaprutil.lib xerces-c_2.lib saml_5.lib libhttpd.lib /nologo /dll /machine:I386 /out:"mod_shib20___Win32_Release/mod_shib_20.so" /libpath:"\Apache2\lib" /libpath:"..\..\cpp-opensaml1\saml\Release"
!ELSEIF "$(CFG)" == "mod_shib20 - Win32 Debug"
@@ -79,7 +79,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 log4cppD.lib xerces-c_2D.lib libapr.lib libaprutil.lib libhttpd.lib saml_5D.lib /nologo /dll /debug /machine:I386 /out:"mod_shib20___Win32_Debug/mod_shib_20.so" /pdbtype:sept /libpath:"\Apache2\lib" /libpath:"..\..\cpp-opensaml1\saml\Debug"
+# ADD LINK32 libapr.lib libaprutil.lib xerces-c_2D.lib saml_5D.lib libhttpd.lib /nologo /dll /debug /machine:I386 /out:"mod_shib20___Win32_Debug/mod_shib_20.so" /pdbtype:sept /libpath:"\Apache2\lib" /libpath:"..\..\cpp-opensaml1\saml\Debug"
!ENDIF
diff --git a/apache/mod_shib22.dsp b/apache/mod_shib22.dsp
index 1eaa5d6..0f47c4b 100644
--- a/apache/mod_shib22.dsp
+++ b/apache/mod_shib22.dsp
@@ -53,7 +53,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
-# ADD LINK32 log4cpp.lib xerces-c_2.lib saml_5.lib libapr-1.lib libaprutil-1.lib libhttpd.lib /nologo /dll /machine:I386 /out:"mod_shib22___Win32_Release/mod_shib_22.so" /libpath:"\Apache2.2\lib" /libpath:"..\..\cpp-opensaml1\saml\Release"
+# ADD LINK32 libapr-1.lib libaprutil-1.lib xerces-c_2.lib saml_5.lib libhttpd.lib /nologo /dll /machine:I386 /out:"mod_shib22___Win32_Release/mod_shib_22.so" /libpath:"\Apache2.2\lib" /libpath:"..\..\cpp-opensaml1\saml\Release"
!ELSEIF "$(CFG)" == "mod_shib22 - Win32 Debug"
@@ -79,7 +79,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 log4cppD.lib xerces-c_2D.lib saml_5D.lib libapr-1.lib libaprutil-1.lib libhttpd.lib /nologo /dll /debug /machine:I386 /out:"mod_shib22___Win32_Debug/mod_shib_22.so" /pdbtype:sept /libpath:"\Apache2.2\lib" /libpath:"..\..\cpp-opensaml1\saml\Debug"
+# ADD LINK32 libapr-1.lib libaprutil-1.lib xerces-c_2D.lib saml_5D.lib libhttpd.lib /nologo /dll /debug /machine:I386 /out:"mod_shib22___Win32_Debug/mod_shib_22.so" /pdbtype:sept /libpath:"\Apache2.2\lib" /libpath:"..\..\cpp-opensaml1\saml\Debug"
!ENDIF
diff --git a/config_win32.h b/config_win32.h
index d22c581..155f520 100644
--- a/config_win32.h
+++ b/config_win32.h
@@ -31,8 +31,11 @@
/* Define to 1 if you have the `dmallocxx' library (-ldmallocxx). */
/* #undef HAVE_LIBDMALLOCXX */
-/* Define if log4cpp library was found */
-#define HAVE_LIBLOG4CPP 1
+/* Define if log4shib library is used. */
+#define HAVE_LOG4SHIB 1
+
+/* Define if log4cpp library is used. */
+/* #undef HAVE_LOG4CPP */
/* Define to 1 if you have the `ssl' library (-lssl). */
#define HAVE_LIBSSL 1
diff --git a/configure.ac b/configure.ac
index 2b56600..12c063f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -154,24 +154,54 @@ AC_MSG_RESULT(yes)
AC_LANG(C++)
-# log4cpp settings
-AC_PATH_PROG(LOG4CPP_CONFIG,log4cpp-config)
-AC_ARG_WITH(log4cpp,
- AC_HELP_STRING([--with-log4cpp=PATH], [where log4cpp is installed]),
- [LOG4CPP_CONFIG="${with_log4cpp}/bin/log4cpp-config"])
-if test -f "${LOG4CPP_CONFIG}"; then
- LDFLAGS="`${LOG4CPP_CONFIG} --libs` $LDFLAGS"
- CPPFLAGS="`${LOG4CPP_CONFIG} --cflags` $CPPFLAGS"
+# 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]),
+ [
+ LOG4SHIB_CONFIG="${with_log4shib}"
+ if ! test -f "${LOG4SHIB_CONFIG}" ; then
+ LOG4SHIB_CONFIG="${with_log4shib}/bin/log4shib-config"
+ fi
+ ])
+if test -f "${LOG4SHIB_CONFIG}"; then
+ LDFLAGS="`${LOG4SHIB_CONFIG} --libs` $LDFLAGS"
+ CPPFLAGS="`${LOG4SHIB_CONFIG} --cflags` $CPPFLAGS"
+ AC_CHECK_HEADER([log4shib/Category.hh],,AC_MSG_ERROR([unable to find log4shib header files]))
+ AC_TRY_LINK(
+ [#include <log4shib/Category.hh>],
+ [log4shib::Category::getInstance("foo")],
+ [AC_DEFINE(HAVE_LOG4SHIB,1,[Define if log4shib library is used.])],
+ [AC_MSG_ERROR([unable to link with log4shib])])
else
- AC_MSG_WARN([log4cpp-config not found, guessing at log4cpp build settings])
- 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"
+ 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.hh>],
+ [log4cpp::Category::getInstance("foo")],
+ [AC_DEFINE(HAVE_LOG4CPP,1,[Define if log4cpp library is used.])],
+ [AC_MSG_ERROR([unable to link with log4cpp])])
+ else
+ AC_MSG_ERROR([log4cpp-config not found, may need to use --with-log4cpp option])
+ fi
fi
-AC_CHECK_HEADER([log4cpp/Category.hh],,AC_MSG_ERROR([unable to find log4cpp header files]))
-AC_TRY_LINK(
- [#include <log4cpp/Category.hh>],
- [log4cpp::Category::getInstance("foo")],
- [AC_DEFINE(HAVE_LIBLOG4CPP,1,[Define if log4cpp library was found])],
- [AC_MSG_ERROR([unable to link with log4cpp])])
# Xerces settings
AC_ARG_WITH(xerces,
diff --git a/isapi_shib/isapi_shib.dsp b/isapi_shib/isapi_shib.dsp
index 53cf3a4..022986e 100644
--- a/isapi_shib/isapi_shib.dsp
+++ b/isapi_shib/isapi_shib.dsp
@@ -53,7 +53,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
-# ADD LINK32 log4cpp.lib xerces-c_2.lib advapi32.lib kernel32.lib saml_5.lib /nologo /dll /machine:I386 /libpath:"..\..\cpp-opensaml1\saml\Release" /export:GetExtensionVersion /export:GetFilterVersion /export:TerminateExtension /export:TerminateFilter /export:HttpFilterProc /export:HttpExtensionProc
+# ADD LINK32 xerces-c_2.lib advapi32.lib kernel32.lib saml_5.lib /nologo /dll /machine:I386 /libpath:"..\..\cpp-opensaml1\saml\Release" /export:GetExtensionVersion /export:GetFilterVersion /export:TerminateExtension /export:TerminateFilter /export:HttpFilterProc /export:HttpExtensionProc
# SUBTRACT LINK32 /pdb:none
!ELSEIF "$(CFG)" == "isapi_shib - Win32 Debug"
@@ -80,7 +80,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 log4cppD.lib xerces-c_2D.lib advapi32.lib kernel32.lib saml_5D.lib /nologo /dll /debug /machine:I386 /pdbtype:sept /libpath:"..\..\cpp-opensaml1\saml\Debug" /export:GetExtensionVersion /export:GetFilterVersion /export:TerminateExtension /export:TerminateFilter /export:HttpFilterProc /export:HttpExtensionProc
+# ADD LINK32 xerces-c_2D.lib advapi32.lib kernel32.lib saml_5D.lib /nologo /dll /debug /machine:I386 /pdbtype:sept /libpath:"..\..\cpp-opensaml1\saml\Debug" /export:GetExtensionVersion /export:GetFilterVersion /export:TerminateExtension /export:TerminateFilter /export:HttpFilterProc /export:HttpExtensionProc
# SUBTRACT LINK32 /pdb:none
!ENDIF
diff --git a/nsapi_shib/nsapi_shib.dsp b/nsapi_shib/nsapi_shib.dsp
index 1cc82b9..cbaa8e2 100644
--- a/nsapi_shib/nsapi_shib.dsp
+++ b/nsapi_shib/nsapi_shib.dsp
@@ -53,7 +53,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
-# ADD LINK32 log4cpp.lib xerces-c_2.lib saml_5.lib ns-httpd30.lib /nologo /dll /machine:I386 /libpath:"\\KRAMER\iPlanet\plugins\lib" /libpath:"..\..\cpp-opensaml1\saml\Release"
+# ADD LINK32 xerces-c_2.lib saml_5.lib ns-httpd30.lib /nologo /dll /machine:I386 /libpath:"\\KRAMER\iPlanet\plugins\lib" /libpath:"..\..\cpp-opensaml1\saml\Release"
!ELSEIF "$(CFG)" == "nsapi_shib - Win32 Debug"
@@ -79,7 +79,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 log4cppD.lib xerces-c_2D.lib saml_5D.lib ns-httpd30.lib /nologo /dll /debug /machine:I386 /pdbtype:sept /libpath:"\\KRAMER\iPlanet\plugins\lib" /libpath:"..\..\cpp-opensaml1\saml\Debug"
+# ADD LINK32 xerces-c_2D.lib saml_5D.lib ns-httpd30.lib /nologo /dll /debug /machine:I386 /pdbtype:sept /libpath:"\\KRAMER\iPlanet\plugins\lib" /libpath:"..\..\cpp-opensaml1\saml\Debug"
!ENDIF
diff --git a/shar/shar-utils.cpp b/shar/shar-utils.cpp
index 8b8ea00..9d0a3b6 100644
--- a/shar/shar-utils.cpp
+++ b/shar/shar-utils.cpp
@@ -45,7 +45,6 @@
#include "shar-utils.h"
#include <shib/shib-threads.h>
-#include <log4cpp/Category.hh>
// Deal with inadequate Sun RPC libraries
@@ -66,7 +65,7 @@ using namespace std;
using namespace saml;
using namespace shibboleth;
using namespace shibtarget;
-using namespace log4cpp;
+using namespace shibd::logging;
namespace {
map<IListener::ShibSocket,Thread*> children;
diff --git a/shar/shar-utils.h b/shar/shar-utils.h
index c4b44f4..9b9cc7c 100644
--- a/shar/shar-utils.h
+++ b/shar/shar-utils.h
@@ -29,6 +29,20 @@
#include <shib-target/shibrpc.h>
#include <shib-target/shib-target.h>
+#if defined(HAVE_LOG4SHIB)
+# include <log4shib/Category.hh>
+namespace shibd {
+ namespace logging = log4shib;
+};
+#elif defined(HAVE_LOG4CPP)
+# include <log4cpp/Category.hh>
+namespace shibd {
+ namespace logging = log4cpp;
+};
+#else
+# error "Supported logging library not available."
+#endif
+
extern "C" {
typedef void (*dispatch_fn)(struct svc_req* rqstp, register SVCXPRT* transp);
}
diff --git a/shar/shar.cpp b/shar/shar.cpp
index 66c17ef..58c9042 100644
--- a/shar/shar.cpp
+++ b/shar/shar.cpp
@@ -39,14 +39,12 @@
#include <signal.h>
#include "shar-utils.h"
-#include <log4cpp/Category.hh>
-
using namespace std;
using namespace saml;
using namespace shibboleth;
using namespace shibtarget;
-using namespace log4cpp;
+using namespace shibd::logging;
#ifndef FD_SETSIZE
# define FD_SETSIZE 1024
diff --git a/shar/shar.dsp b/shar/shar.dsp
index dae18c0..bdeae44 100644
--- a/shar/shar.dsp
+++ b/shar/shar.dsp
@@ -50,7 +50,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 wsock32.lib advapi32.lib log4cpp.lib saml_5.lib /nologo /subsystem:console /machine:I386 /out:"Release/shibd.exe" /libpath:"..\..\cpp-opensaml1\saml\Release"
+# ADD LINK32 wsock32.lib advapi32.lib log4shib1.lib saml_5.lib /nologo /subsystem:console /machine:I386 /out:"Release/shibd.exe" /libpath:"..\..\cpp-opensaml1\saml\Release"
!ELSEIF "$(CFG)" == "shar - Win32 Debug"
@@ -74,7 +74,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 wsock32.lib advapi32.lib log4cppD.lib saml_5D.lib /nologo /subsystem:console /debug /machine:I386 /out:"Debug/shibd.exe" /pdbtype:sept /libpath:"..\..\cpp-opensaml1\saml\Debug"
+# ADD LINK32 wsock32.lib advapi32.lib log4shib1D.lib saml_5D.lib /nologo /subsystem:console /debug /machine:I386 /out:"Debug/shibd.exe" /pdbtype:sept /libpath:"..\..\cpp-opensaml1\saml\Debug"
!ENDIF
diff --git a/shar/shibrpc-server.cpp b/shar/shibrpc-server.cpp
index d278be6..1fb1bb1 100644
--- a/shar/shibrpc-server.cpp
+++ b/shar/shibrpc-server.cpp
@@ -41,13 +41,14 @@
#endif
#include <sstream>
-#include <log4cpp/Category.hh>
+
+#include "shar-utils.h"
using namespace std;
-using namespace log4cpp;
using namespace saml;
using namespace shibboleth;
using namespace shibtarget;
+using namespace shibd::logging;
extern IListener* g_MemoryListener;
diff --git a/shib-mysql-ccache/shib-mysql-ccache.cpp b/shib-mysql-ccache/shib-mysql-ccache.cpp
index 729abfb..46d3041 100644
--- a/shib-mysql-ccache/shib-mysql-ccache.cpp
+++ b/shib-mysql-ccache/shib-mysql-ccache.cpp
@@ -49,7 +49,20 @@
#include <shib-target/shib-target.h>
#include <shib/shib-threads.h>
-#include <log4cpp/Category.hh>
+
+#if defined(HAVE_LOG4SHIB)
+# include <log4shib/Category.hh>
+namespace shibmysql {
+ namespace logging = log4shib;
+};
+#elif defined(HAVE_LOG4CPP)
+# include <log4cpp/Category.hh>
+namespace shibmysql {
+ namespace logging = log4cpp;
+};
+#else
+# error "Supported logging library not available."
+#endif
#include <sstream>
#include <stdexcept>
@@ -67,7 +80,7 @@ using namespace std;
using namespace saml;
using namespace shibboleth;
using namespace shibtarget;
-using namespace log4cpp;
+using namespace shibmysql::logging;
#define PLUGIN_VER_MAJOR 2
#define PLUGIN_VER_MINOR 0
@@ -114,7 +127,7 @@ public:
MYSQL* getMYSQL() const;
bool repairTable(MYSQL*&, const char* table);
- log4cpp::Category* log;
+ Category* log;
protected:
ThreadKey* m_mysql;
diff --git a/shib-mysql-ccache/shib_mysql_ccache.dsp b/shib-mysql-ccache/shib_mysql_ccache.dsp
index 758a1f8..7330e70 100644
--- a/shib-mysql-ccache/shib_mysql_ccache.dsp
+++ b/shib-mysql-ccache/shib_mysql_ccache.dsp
@@ -53,7 +53,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
-# ADD LINK32 log4cpp.lib libmysqld.lib xerces-c_2.lib saml_5.lib /nologo /dll /machine:I386 /out:"Release/shib-mysql-ccache.so" /libpath:"\mysql-4.1.12\lib_release" /libpath:"..\..\cpp-opensaml1\saml\Release"
+# ADD LINK32 libmysqld.lib xerces-c_2.lib log4shib1.lib saml_5.lib /nologo /dll /machine:I386 /out:"Release/shib-mysql-ccache.so" /libpath:"\mysql-4.1.12\lib_release" /libpath:"..\..\cpp-opensaml1\saml\Release"
!ELSEIF "$(CFG)" == "shib_mysql_ccache - Win32 Debug"
@@ -79,7 +79,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 log4cppD.lib libmysqld.lib xerces-c_2D.lib saml_5D.lib /nologo /dll /debug /machine:I386 /out:"Debug/shib-mysql-ccache.so" /pdbtype:sept /libpath:"\mysql-4.1.12\lib_debug" /libpath:"..\..\cpp-opensaml1\saml\Debug"
+# ADD LINK32 libmysqld.lib xerces-c_2D.lib log4shib1D.lib saml_5D.lib /nologo /dll /debug /machine:I386 /out:"Debug/shib-mysql-ccache.so" /pdbtype:sept /libpath:"\mysql-4.1.12\lib_debug" /libpath:"..\..\cpp-opensaml1\saml\Debug"
!ENDIF
diff --git a/shib-target/ArtifactMapper.cpp b/shib-target/ArtifactMapper.cpp
index da34742..d51989b 100644
--- a/shib-target/ArtifactMapper.cpp
+++ b/shib-target/ArtifactMapper.cpp
@@ -25,10 +25,10 @@
#include "internal.h"
using namespace std;
-using namespace log4cpp;
using namespace saml;
using namespace shibboleth;
using namespace shibtarget;
+using namespace shibtarget::logging;
SAMLResponse* STArtifactMapper::resolve(SAMLRequest* request)
{
diff --git a/shib-target/MemoryListener.cpp b/shib-target/MemoryListener.cpp
index 44a20af..cd2fe2e 100644
--- a/shib-target/MemoryListener.cpp
+++ b/shib-target/MemoryListener.cpp
@@ -25,10 +25,10 @@
#include "internal.h"
using namespace std;
-using namespace log4cpp;
using namespace saml;
using namespace shibboleth;
using namespace shibtarget;
+using namespace shibtarget::logging;
namespace {
class MemoryListener : public virtual IListener
diff --git a/shib-target/RPCListener.cpp b/shib-target/RPCListener.cpp
index 1692b6c..1efffcd 100644
--- a/shib-target/RPCListener.cpp
+++ b/shib-target/RPCListener.cpp
@@ -31,10 +31,10 @@
#endif
using namespace std;
-using namespace log4cpp;
using namespace saml;
using namespace shibboleth;
using namespace shibtarget;
+using namespace shibtarget::logging;
namespace shibtarget {
// Wraps the actual RPC connection
diff --git a/shib-target/ShibHTTPHook.cpp b/shib-target/ShibHTTPHook.cpp
index 5857f0a..f7b1437 100644
--- a/shib-target/ShibHTTPHook.cpp
+++ b/shib-target/ShibHTTPHook.cpp
@@ -28,11 +28,11 @@
#include <openssl/ssl.h>
#include <openssl/x509_vfy.h>
-using namespace std;
-using namespace log4cpp;
+using namespace shibtarget::logging;
using namespace shibtarget;
using namespace shibboleth;
using namespace saml;
+using namespace std;
/*
* Our verifier callback is a front-end for invoking each trust plugin until
diff --git a/shib-target/XMLRequestMapper.cpp b/shib-target/XMLRequestMapper.cpp
index 83d4939..7e2f776 100644
--- a/shib-target/XMLRequestMapper.cpp
+++ b/shib-target/XMLRequestMapper.cpp
@@ -24,13 +24,11 @@
#include "internal.h"
-#include <log4cpp/Category.hh>
-
using namespace std;
-using namespace log4cpp;
using namespace saml;
using namespace shibboleth;
using namespace shibtarget;
+using namespace shibtarget::logging;
namespace shibtarget {
diff --git a/shib-target/internal.h b/shib-target/internal.h
index a5406d3..5638bb5 100644
--- a/shib-target/internal.h
+++ b/shib-target/internal.h
@@ -39,8 +39,23 @@
#include "shib-target.h"
#include "hresult.h"
-#include <log4cpp/Category.hh>
-#include <log4cpp/FixedContextCategory.hh>
+#if defined(HAVE_LOG4SHIB)
+# include <log4shib/Category.hh>
+# include <log4shib/CategoryStream.hh>
+# include <log4shib/FixedContextCategory.hh>
+namespace shibtarget {
+ namespace logging = log4shib;
+};
+#elif defined(HAVE_LOG4CPP)
+# include <log4cpp/Category.hh>
+# include <log4cpp/CategoryStream.hh>
+# include <log4cpp/FixedContextCategory.hh>
+namespace shibtarget {
+ namespace logging = log4cpp;
+};
+#else
+# error "Supported logging library not available."
+#endif
#define SHIBT_L(s) shibtarget::XML::Literals::s
#define SHIBT_L_QNAME(p,s) shibtarget::XML::Literals::p##_##s
@@ -89,7 +104,7 @@ namespace shibtarget {
virtual void* getClientHandle(ShibSocket& s, u_long program, u_long version) const=0;
protected:
- log4cpp::Category* log;
+ logging::Category* log;
private:
mutable RPCHandlePool* m_rpcpool;
@@ -120,7 +135,7 @@ namespace shibtarget {
void load(
const DOMElement* e, // root element of property set
- log4cpp::Category& log, // log object for tracing
+ logging::Category& log, // log object for tracing
DOMNodeFilter* filter, // control what subelements to include
const std::map<std::string,std::string>* remapper=NULL // on the fly property renaming for legacy support
);
@@ -190,10 +205,10 @@ namespace shibtarget {
bool load(const char* config);
void shutdown();
- log4cpp::Category& getTransactionLog() { m_tranLogLock->lock(); return *m_tranLog; }
+ logging::Category& getTransactionLog() { m_tranLogLock->lock(); return *m_tranLog; }
void releaseTransactionLog() { m_tranLogLock->unlock();}
private:
- log4cpp::FixedContextCategory* m_tranLog;
+ logging::FixedContextCategory* m_tranLog;
shibboleth::Mutex* m_tranLogLock;
static IConfig* ShibTargetConfigFactory(const DOMElement* e);
};
diff --git a/shib-target/shib-ccache.cpp b/shib-target/shib-ccache.cpp
index 6bb4394..c328579 100644
--- a/shib-target/shib-ccache.cpp
+++ b/shib-target/shib-ccache.cpp
@@ -31,7 +31,6 @@
#include <shib/shib-threads.h>
-#include <log4cpp/Category.hh>
#include <sstream>
#include <stdexcept>
@@ -41,10 +40,10 @@
#endif
using namespace std;
-using namespace log4cpp;
using namespace saml;
using namespace shibboleth;
using namespace shibtarget;
+using namespace shibtarget::logging;
static const XMLCh cleanupInterval[] =
{ chLatin_c, chLatin_l, chLatin_e, chLatin_a, chLatin_n, chLatin_u, chLatin_p,
@@ -169,7 +168,7 @@ private:
RWLock *lock;
map<string,InternalCCacheEntry*> m_hashtable;
- log4cpp::Category* log;
+ Category* log;
static void* cleanup_fcn(void*); // Assumes an InternalCCache
bool shutdown;
diff --git a/shib-target/shib-config.cpp b/shib-target/shib-config.cpp
index 49c45f3..f96af61 100644
--- a/shib-target/shib-config.cpp
+++ b/shib-target/shib-config.cpp
@@ -24,13 +24,19 @@
#include "internal.h"
-#include <log4cpp/OstreamAppender.hh>
+#if defined(HAVE_LOG4SHIB)
+# include <log4shib/OstreamAppender.hh>
+#elif defined(HAVE_LOG4CPP)
+# include <log4cpp/OstreamAppender.hh>
+#else
+# error "Supported logging library not available."
+#endif
using namespace std;
-using namespace log4cpp;
using namespace saml;
using namespace shibboleth;
using namespace shibtarget;
+using namespace shibtarget::logging;
namespace {
STConfig g_Config;
diff --git a/shib-target/shib-handlers.cpp b/shib-target/shib-handlers.cpp
index ec5b1d3..84c742d 100644
--- a/shib-target/shib-handlers.cpp
+++ b/shib-target/shib-handlers.cpp
@@ -38,7 +38,7 @@ using namespace std;
using namespace saml;
using namespace shibboleth;
using namespace shibtarget;
-using namespace log4cpp;
+using namespace shibtarget::logging;
namespace {
class CgiParse
diff --git a/shib-target/shib-ini.cpp b/shib-target/shib-ini.cpp
index a6cc3cb..3ded944 100644
--- a/shib-target/shib-ini.cpp
+++ b/shib-target/shib-ini.cpp
@@ -23,8 +23,13 @@
#include "internal.h"
#include <shib/shib-threads.h>
-#include <log4cpp/Category.hh>
-#include <log4cpp/PropertyConfigurator.hh>
+#if defined(HAVE_LOG4SHIB)
+# include <log4shib/PropertyConfigurator.hh>
+#elif defined(HAVE_LOG4CPP)
+# include <log4cpp/PropertyConfigurator.hh>
+#else
+# error "Supported logging library not available."
+#endif
#include <sys/types.h>
#include <sys/stat.h>
@@ -33,7 +38,7 @@ using namespace std;
using namespace saml;
using namespace shibboleth;
using namespace shibtarget;
-using namespace log4cpp;
+using namespace shibtarget::logging;
namespace shibtarget {
diff --git a/shib-target/shib-mlp.cpp b/shib-target/shib-mlp.cpp
index de25e65..324f934 100644
--- a/shib-target/shib-mlp.cpp
+++ b/shib-target/shib-mlp.cpp
@@ -27,19 +27,18 @@
#include <sstream>
#include <ctype.h>
#include <xercesc/util/XercesDefs.hpp>
-#include <log4cpp/Category.hh>
using namespace std;
-using namespace log4cpp;
using namespace saml;
using namespace shibboleth;
using namespace shibtarget;
+using namespace shibtarget::logging;
class shibtarget::ShibMLPPriv {
public:
ShibMLPPriv();
~ShibMLPPriv() {}
- log4cpp::Category *log;
+ Category *log;
static void html_encode(string& os, const char* start);
};
@@ -71,7 +70,7 @@ void ShibMLPPriv::html_encode(string& os, const char* start)
}
}
-ShibMLPPriv::ShibMLPPriv() : log(&(log4cpp::Category::getInstance("shibtarget.ShibMLP"))) {}
+ShibMLPPriv::ShibMLPPriv() : log(&(Category::getInstance("shibtarget.ShibMLP"))) {}
static void trimspace (string& s)
{
diff --git a/shib-target/shib-sock.cpp b/shib-target/shib-sock.cpp
index 7a726de..dcbec55 100644
--- a/shib-target/shib-sock.cpp
+++ b/shib-target/shib-sock.cpp
@@ -41,7 +41,7 @@ using namespace std;
using namespace saml;
using namespace shibboleth;
using namespace shibtarget;
-using namespace log4cpp;
+using namespace shibtarget::logging;
static const XMLCh address[] = { chLatin_a, chLatin_d, chLatin_d, chLatin_r, chLatin_e, chLatin_s, chLatin_s, chNull };
static const XMLCh port[] = { chLatin_p, chLatin_o, chLatin_r, chLatin_t, chNull };
diff --git a/shib-target/shib-target.cpp b/shib-target/shib-target.cpp
index 2b40f56..304f4a9 100644
--- a/shib-target/shib-target.cpp
+++ b/shib-target/shib-target.cpp
@@ -44,7 +44,7 @@ using namespace std;
using namespace saml;
using namespace shibboleth;
using namespace shibtarget;
-using namespace log4cpp;
+using namespace shibtarget::logging;
namespace shibtarget {
class ShibTargetPriv
diff --git a/shib-target/shibtarget.dsp b/shib-target/shibtarget.dsp
index 46a39cd..486ef5e 100644
--- a/shib-target/shibtarget.dsp
+++ b/shib-target/shibtarget.dsp
@@ -53,7 +53,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
-# ADD LINK32 wsock32.lib libeay32_0_9_8.lib ssleay32_0_9_8.lib log4cpp.lib xerces-c_2.lib saml_5.lib /nologo /dll /machine:I386 /out:"Release/shibtarget_5.dll" /libpath:"..\..\cpp-opensaml1\saml\Release"
+# ADD LINK32 wsock32.lib libeay32_0_9_8.lib ssleay32_0_9_8.lib xerces-c_2.lib log4shib1.lib saml_5.lib /nologo /dll /machine:I386 /out:"Release/shibtarget_5.dll" /libpath:"..\..\cpp-opensaml1\saml\Release"
# SUBTRACT LINK32 /pdb:none
!ELSEIF "$(CFG)" == "shibtarget - Win32 Debug"
@@ -80,7 +80,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 wsock32.lib libeay32_0_9_8D.lib ssleay32_0_9_8D.lib log4cppD.lib xerces-c_2D.lib saml_5D.lib /nologo /dll /debug /machine:I386 /out:"Debug/shibtarget_5D.dll" /pdbtype:sept /libpath:"..\..\cpp-opensaml1\saml\Debug"
+# ADD LINK32 wsock32.lib libeay32_0_9_8D.lib ssleay32_0_9_8D.lib xerces-c_2D.lib log4shib1D.lib saml_5D.lib /nologo /dll /debug /machine:I386 /out:"Debug/shibtarget_5D.dll" /pdbtype:sept /libpath:"..\..\cpp-opensaml1\saml\Debug"
# SUBTRACT LINK32 /pdb:none
!ENDIF
diff --git a/shib/BasicTrust.cpp b/shib/BasicTrust.cpp
index d560669..3de204e 100644
--- a/shib/BasicTrust.cpp
+++ b/shib/BasicTrust.cpp
@@ -27,9 +27,9 @@
#include <openssl/x509.h>
#include <xsec/enc/OpenSSL/OpenSSLCryptoX509.hpp>
+using namespace shibboleth::logging;
using namespace shibboleth;
using namespace saml;
-using namespace log4cpp;
using namespace std;
IPlugIn* BasicTrustFactory(const DOMElement* e)
diff --git a/shib/Metadata.cpp b/shib/Metadata.cpp
index 9867fbc..8371d67 100644
--- a/shib/Metadata.cpp
+++ b/shib/Metadata.cpp
@@ -185,7 +185,7 @@ void AAP::apply(const saml::Iterator<IAAP*>& aaps, saml::SAMLAssertion& assertio
#ifdef _DEBUG
saml::NDC("apply");
#endif
- log4cpp::Category& log=log4cpp::Category::getInstance(SHIB_LOGCAT".AAP");
+ logging::Category& log=logging::Category::getInstance(SHIB_LOGCAT".AAP");
// First check for no providers or AnyAttribute.
if (aaps.size()==0) {
diff --git a/shib/ReloadableXMLFile.cpp b/shib/ReloadableXMLFile.cpp
index c7dd4a2..adafef4 100644
--- a/shib/ReloadableXMLFile.cpp
+++ b/shib/ReloadableXMLFile.cpp
@@ -29,9 +29,9 @@
#include <xercesc/framework/LocalFileInputSource.hpp>
+using namespace shibboleth::logging;
using namespace shibboleth;
using namespace saml;
-using namespace log4cpp;
using namespace std;
ReloadableXMLFileImpl::ReloadableXMLFileImpl(const DOMElement* e) : m_doc(NULL), m_root(e) {}
diff --git a/shib/ScopedAttribute.cpp b/shib/ScopedAttribute.cpp
index ff13baa..96f9649 100644
--- a/shib/ScopedAttribute.cpp
+++ b/shib/ScopedAttribute.cpp
@@ -24,11 +24,10 @@
#include "internal.h"
#include <xercesc/util/regx/RegularExpression.hpp>
-#include <log4cpp/Category.hh>
+using namespace shibboleth::logging;
using namespace shibboleth;
using namespace saml;
-using namespace log4cpp;
using namespace std;
const XMLCh ScopedAttribute::Scope[] = { chLatin_S, chLatin_c, chLatin_o, chLatin_p, chLatin_e, chNull };
diff --git a/shib/ShibBrowserProfile.cpp b/shib/ShibBrowserProfile.cpp
index 3662753..3086310 100644
--- a/shib/ShibBrowserProfile.cpp
+++ b/shib/ShibBrowserProfile.cpp
@@ -28,9 +28,9 @@
#include <openssl/x509v3.h>
+using namespace shibboleth::logging;
using namespace shibboleth;
using namespace saml;
-using namespace log4cpp;
using namespace std;
ShibBrowserProfile::ShibBrowserProfile(const Iterator<IMetadata*>& metadatas, const Iterator<ITrust*>& trusts)
diff --git a/shib/ShibConfig.cpp b/shib/ShibConfig.cpp
index 40ade66..c54bd7d 100644
--- a/shib/ShibConfig.cpp
+++ b/shib/ShibConfig.cpp
@@ -33,9 +33,9 @@
#include <openssl/err.h>
-using namespace saml;
+using namespace shibboleth::logging;
using namespace shibboleth;
-using namespace log4cpp;
+using namespace saml;
using namespace std;
diff --git a/shib/ShibbolethTrust.cpp b/shib/ShibbolethTrust.cpp
index 0bfd4b6..ba24e04 100644
--- a/shib/ShibbolethTrust.cpp
+++ b/shib/ShibbolethTrust.cpp
@@ -30,9 +30,9 @@
#include <xsec/dsig/DSIGKeyInfoX509.hpp>
#include <xsec/enc/OpenSSL/OpenSSLCryptoX509.hpp>
+using namespace shibboleth::logging;
using namespace shibboleth;
using namespace saml;
-using namespace log4cpp;
using namespace std;
namespace {
diff --git a/shib/internal.h b/shib/internal.h
index d8eb9b2..aa6bc28 100644
--- a/shib/internal.h
+++ b/shib/internal.h
@@ -38,7 +38,21 @@
#include "shib.h"
-#include <log4cpp/Category.hh>
+#if defined(HAVE_LOG4SHIB)
+# include <log4shib/Category.hh>
+# include <log4shib/CategoryStream.hh>
+namespace shibboleth {
+ namespace logging = log4shib;
+};
+#elif defined(HAVE_LOG4CPP)
+# include <log4cpp/Category.hh>
+# include <log4cpp/CategoryStream.hh>
+namespace shibboleth {
+ namespace logging = log4cpp;
+};
+#else
+# error "Supported logging library not available."
+#endif
#define SHIB_LOGCAT "Shibboleth"
diff --git a/shib/shib.dsp b/shib/shib.dsp
index 1173b32..802f497 100644
--- a/shib/shib.dsp
+++ b/shib/shib.dsp
@@ -53,7 +53,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
-# ADD LINK32 xsec_1.lib libeay32_0_9_8.lib ssleay32_0_9_8.lib log4cpp.lib xerces-c_2.lib saml_5.lib /nologo /dll /machine:I386 /out:"Release/shib_6.dll" /libpath:"..\..\cpp-opensaml1\saml\Release"
+# ADD LINK32 xsec_1.lib libeay32_0_9_8.lib ssleay32_0_9_8.lib xerces-c_2.lib log4shib1.lib saml_5.lib /nologo /dll /machine:I386 /out:"Release/shib_6.dll" /libpath:"..\..\cpp-opensaml1\saml\Release"
!ELSEIF "$(CFG)" == "shib - Win32 Debug"
@@ -79,7 +79,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 xsec_1D.lib libeay32_0_9_8D.lib ssleay32_0_9_8D.lib log4cppD.lib xerces-c_2D.lib saml_5D.lib /nologo /dll /debug /machine:I386 /out:"Debug/shib_6D.dll" /pdbtype:sept /libpath:"..\..\cpp-opensaml1\saml\Debug"
+# ADD LINK32 xsec_1D.lib libeay32_0_9_8D.lib ssleay32_0_9_8D.lib xerces-c_2D.lib log4shib1D.lib saml_5D.lib /nologo /dll /debug /machine:I386 /out:"Debug/shib_6D.dll" /pdbtype:sept /libpath:"..\..\cpp-opensaml1\saml\Debug"
!ENDIF
diff --git a/siterefresh/siterefresh.cpp b/siterefresh/siterefresh.cpp
index 7dab0e3..ec229dc 100644
--- a/siterefresh/siterefresh.cpp
+++ b/siterefresh/siterefresh.cpp
@@ -24,9 +24,29 @@
#include <shib-target/shib-target.h>
+#if defined (_MSC_VER) || defined(__BORLANDC__)
+# include "config_win32.h"
+#else
+# include "config.h"
+#endif
+
+#if defined(HAVE_LOG4SHIB)
+# include <log4shib/Category.hh>
+# include <log4shib/OstreamAppender.hh>
+namespace siterefresh {
+ namespace logging = log4shib;
+};
+#elif defined(HAVE_LOG4CPP)
+# include <log4cpp/Category.hh>
+# include <log4cpp/OstreamAppender.hh>
+namespace siterefresh {
+ namespace logging = log4cpp;
+};
+#else
+# error "Supported logging library not available."
+#endif
+
#include <fstream>
-#include <log4cpp/Category.hh>
-#include <log4cpp/OstreamAppender.hh>
#include <xercesc/framework/URLInputSource.hpp>
#include <xercesc/framework/StdInInputSource.hpp>
#include <xsec/enc/XSECCryptoProvider.hpp>
@@ -43,7 +63,7 @@
using namespace std;
using namespace saml;
using namespace shibboleth;
-using namespace log4cpp;
+using namespace siterefresh::logging;
static const XMLCh TRUST_NS[] = // urn:mace:shibboleth:trust:1.0
{ chLatin_u, chLatin_r, chLatin_n, chColon, chLatin_m, chLatin_a, chLatin_c, chLatin_e, chColon,
diff --git a/siterefresh/siterefresh.dsp b/siterefresh/siterefresh.dsp
index 1c00f1d..a8e0b47 100644
--- a/siterefresh/siterefresh.dsp
+++ b/siterefresh/siterefresh.dsp
@@ -50,7 +50,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 xsec_1.lib log4cpp.lib xerces-c_2.lib saml_5.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\cpp-opensaml1\saml\Release"
+# ADD LINK32 xsec_1.lib xerces-c_2.lib log4shib1.lib saml_5.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\cpp-opensaml1\saml\Release"
!ELSEIF "$(CFG)" == "siterefresh - Win32 Debug"
@@ -74,7 +74,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 xsec_1D.lib log4cppD.lib xerces-c_2D.lib saml_5D.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\cpp-opensaml1\saml\Debug"
+# ADD LINK32 xsec_1D.lib xerces-c_2D.lib log4shib1D.lib saml_5D.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\cpp-opensaml1\saml\Debug"
!ENDIF
diff --git a/xmlproviders/CredResolvers.cpp b/xmlproviders/CredResolvers.cpp
index a68ef61..d8421c1 100644
--- a/xmlproviders/CredResolvers.cpp
+++ b/xmlproviders/CredResolvers.cpp
@@ -28,15 +28,14 @@
#include <sys/stat.h>
#include <openssl/pkcs12.h>
-#include <log4cpp/Category.hh>
#include <xsec/enc/OpenSSL/OpenSSLCryptoX509.hpp>
#include <xsec/enc/OpenSSL/OpenSSLCryptoKeyRSA.hpp>
#include <xsec/enc/OpenSSL/OpenSSLCryptoKeyDSA.hpp>
+using namespace std;
using namespace saml;
using namespace shibboleth;
-using namespace log4cpp;
-using namespace std;
+using namespace xmlproviders::logging;
// OpenSSL password callback...
static int passwd_callback(char* buf, int len, int verify, void* passwd)
diff --git a/xmlproviders/XMLAAP.cpp b/xmlproviders/XMLAAP.cpp
index 509e660..6735e61 100644
--- a/xmlproviders/XMLAAP.cpp
+++ b/xmlproviders/XMLAAP.cpp
@@ -24,11 +24,9 @@
#include "internal.h"
-#include <log4cpp/Category.hh>
-
+using namespace xmlproviders::logging;
using namespace shibboleth;
using namespace saml;
-using namespace log4cpp;
using namespace std;
#include <xercesc/util/regx/RegularExpression.hpp>
diff --git a/xmlproviders/XMLAccessControl.cpp b/xmlproviders/XMLAccessControl.cpp
index c283137..08c7a59 100644
--- a/xmlproviders/XMLAccessControl.cpp
+++ b/xmlproviders/XMLAccessControl.cpp
@@ -23,17 +23,15 @@
#include "internal.h"
#include <shib-target/shib-target.h>
-#include <log4cpp/Category.hh>
-
#ifndef HAVE_STRCASECMP
# define strcasecmp stricmp
#endif
using namespace std;
-using namespace log4cpp;
using namespace saml;
using namespace shibboleth;
using namespace shibtarget;
+using namespace xmlproviders::logging;
namespace {
struct IAuthz {
diff --git a/xmlproviders/XMLCredentials.cpp b/xmlproviders/XMLCredentials.cpp
index 79c11b2..98146b4 100644
--- a/xmlproviders/XMLCredentials.cpp
+++ b/xmlproviders/XMLCredentials.cpp
@@ -27,11 +27,9 @@
#include <sys/types.h>
#include <sys/stat.h>
-#include <log4cpp/Category.hh>
-
+using namespace xmlproviders::logging;
using namespace shibboleth;
using namespace saml;
-using namespace log4cpp;
using namespace std;
namespace {
diff --git a/xmlproviders/XMLMetadata.cpp b/xmlproviders/XMLMetadata.cpp
index d7a96c9..0b61065 100644
--- a/xmlproviders/XMLMetadata.cpp
+++ b/xmlproviders/XMLMetadata.cpp
@@ -28,7 +28,6 @@
#include <sys/types.h>
#include <sys/stat.h>
-#include <log4cpp/Category.hh>
#include <xercesc/util/XMLChar.hpp>
#include <xsec/dsig/DSIGTransformC14n.hpp>
#include <xsec/dsig/DSIGReference.hpp>
@@ -39,9 +38,9 @@
#include <xsec/framework/XSECException.hpp>
#include <xsec/framework/XSECProvider.hpp>
+using namespace xmlproviders::logging;
using namespace shibboleth;
using namespace saml;
-using namespace log4cpp;
using namespace std;
namespace {
diff --git a/xmlproviders/XMLProviders.cpp b/xmlproviders/XMLProviders.cpp
index e035624..4565b7b 100644
--- a/xmlproviders/XMLProviders.cpp
+++ b/xmlproviders/XMLProviders.cpp
@@ -30,12 +30,11 @@
#include "internal.h"
#include <shib-target/shib-target.h>
-#include <log4cpp/Category.hh>
#include <openssl/err.h>
-using namespace saml;
+using namespace xmlproviders::logging;
using namespace shibboleth;
-using namespace log4cpp;
+using namespace saml;
using namespace std;
// Metadata Factories
diff --git a/xmlproviders/XMLTrust.cpp b/xmlproviders/XMLTrust.cpp
index 441e85b..5dfa234 100644
--- a/xmlproviders/XMLTrust.cpp
+++ b/xmlproviders/XMLTrust.cpp
@@ -31,15 +31,14 @@
#include <openssl/x509v3.h>
#include <openssl/x509_vfy.h>
-#include <log4cpp/Category.hh>
#include <xercesc/framework/URLInputSource.hpp>
#include <xercesc/util/regx/RegularExpression.hpp>
#include <xsec/enc/XSECCryptoException.hpp>
#include <xsec/enc/XSECKeyInfoResolverDefault.hpp>
+using namespace xmlproviders::logging;
using namespace shibboleth;
using namespace saml;
-using namespace log4cpp;
using namespace std;
namespace {
diff --git a/xmlproviders/internal.h b/xmlproviders/internal.h
index 25817f3..0fb0c35 100644
--- a/xmlproviders/internal.h
+++ b/xmlproviders/internal.h
@@ -25,11 +25,34 @@
#ifndef __internal_h__
#define __internal_h__
+// eventually we might be able to support autoconf via cygwin...
+#if defined (_MSC_VER) || defined(__BORLANDC__)
+# include "config_win32.h"
+#else
+# include "config.h"
+#endif
+
#include <saml/saml.h>
#include <shib/shib.h>
#include <shib/shib-threads.h>
#include <openssl/ssl.h>
+#if defined(HAVE_LOG4SHIB)
+# include <log4shib/Category.hh>
+# include <log4shib/CategoryStream.hh>
+namespace xmlproviders {
+ namespace logging = log4shib;
+};
+#elif defined(HAVE_LOG4CPP)
+# include <log4cpp/Category.hh>
+# include <log4cpp/CategoryStream.hh>
+namespace xmlproviders {
+ namespace logging = log4cpp;
+};
+#else
+# error "Supported logging library not available."
+#endif
+
#define XMLPROVIDERS_LOGCAT "XMLProviders"
#define SHIB_L(s) ::XML::Literals::s
diff --git a/xmlproviders/xmlproviders.dsp b/xmlproviders/xmlproviders.dsp
index a692131..909c769 100644
--- a/xmlproviders/xmlproviders.dsp
+++ b/xmlproviders/xmlproviders.dsp
@@ -53,7 +53,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
-# ADD LINK32 xsec_1.lib libeay32_0_9_8.lib ssleay32_0_9_8.lib log4cpp.lib xerces-c_2.lib saml_5.lib /nologo /dll /machine:I386 /out:"Release/xmlproviders.so" /libpath:"..\..\cpp-opensaml1\saml\Release"
+# ADD LINK32 xsec_1.lib libeay32_0_9_8.lib ssleay32_0_9_8.lib xerces-c_2.lib log4shib1.lib saml_5.lib /nologo /dll /machine:I386 /out:"Release/xmlproviders.so" /libpath:"..\..\cpp-opensaml1\saml\Release"
!ELSEIF "$(CFG)" == "xmlproviders - Win32 Debug"
@@ -79,7 +79,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 xsec_1D.lib libeay32_0_9_8D.lib ssleay32_0_9_8D.lib log4cppD.lib xerces-c_2D.lib saml_5D.lib /nologo /dll /debug /machine:I386 /out:"Debug/xmlproviders.so" /pdbtype:sept /libpath:"..\..\cpp-opensaml1\saml\Debug"
+# ADD LINK32 xsec_1D.lib libeay32_0_9_8D.lib ssleay32_0_9_8D.lib xerces-c_2D.lib log4shib1D.lib saml_5D.lib /nologo /dll /debug /machine:I386 /out:"Debug/xmlproviders.so" /pdbtype:sept /libpath:"..\..\cpp-opensaml1\saml\Debug"
!ENDIF
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-shibboleth/shibboleth-sp2.git
More information about the Pkg-shibboleth-devel
mailing list