diff --git a/src/logging.cpp b/src/logging.cpp index fc9f94b3b832165819a10303d6dea8479f782b52..3d56878f8161f23845ebb1e40c8e8de4dc6798e1 100644 --- a/src/logging.cpp +++ b/src/logging.cpp @@ -25,13 +25,7 @@ #include #include -#include "log4cxx/logger.h" -#include "log4cxx/consoleappender.h" -#include "log4cxx/patternlayout.h" -#include "log4cxx/propertyconfigurator.h" -#include "log4cxx/helpers/properties.h" -#include "log4cxx/helpers/fileinputstream.h" -#include "log4cxx/helpers/transcoder.h" + #include #include @@ -48,12 +42,14 @@ #endif using namespace boost::filesystem; -using namespace log4cxx; + namespace Transport { namespace Logging { +#ifdef WITH_LOG4CXX +using namespace log4cxx; static LoggerPtr root; static void initLogging(Config *config, std::string key) { @@ -143,6 +139,14 @@ void initMainLogging(Config *config) { initLogging(config, "logging.config"); } +#else /* WITH_LOG4CXX */ +void initBackendLogging(Config */*config*/) { +} + +void initMainLogging(Config */*config*/) { +} +#endif /* WITH_LOG4CXX */ + } }