From 827f212bd4280f530de6ab30ce21391b11031798 Mon Sep 17 00:00:00 2001 From: vopl Date: Wed, 1 Nov 2023 14:20:32 +0300 Subject: [PATCH] using a logger with a custom namespace is simplified by the 'namespace log4cxx=LOG4CXX_NS' alias introduced --- src/CMakeLists.txt | 6 +- src/examples/cpp/custom-appender.cpp | 2 +- src/main/include/CMakeLists.txt | 4 ++ src/main/include/log4cxx/log4cxx.h.in | 4 ++ src/test/cpp/appenderskeletontestcase.cpp | 4 +- src/test/cpp/appenderskeletontestcase.h | 2 +- src/test/cpp/asyncappendertestcase.cpp | 16 ++--- src/test/cpp/autoconfiguretestcase.cpp | 2 +- src/test/cpp/benchmark/benchmark.cpp | 6 +- src/test/cpp/consoleappendertestcase.cpp | 6 +- src/test/cpp/customlogger/xlogger.cpp | 6 +- src/test/cpp/customlogger/xlogger.h | 8 +-- src/test/cpp/customlogger/xloggertestcase.cpp | 8 +-- src/test/cpp/db/odbcappendertestcase.cpp | 2 +- src/test/cpp/decodingtest.cpp | 4 +- src/test/cpp/defaultinit/testcase1.cpp | 2 +- src/test/cpp/defaultinit/testcase2.cpp | 2 +- src/test/cpp/defaultinit/testcase3.cpp | 2 +- src/test/cpp/defaultinit/testcase4.cpp | 2 +- src/test/cpp/encodingtest.cpp | 6 +- src/test/cpp/eventsatexittest.cpp | 2 +- src/test/cpp/fileappendertest.cpp | 4 +- src/test/cpp/fileappendertestcase.cpp | 6 +- src/test/cpp/fileappendertestcase.h | 4 +- src/test/cpp/filetestcase.cpp | 6 +- src/test/cpp/filter/andfiltertest.cpp | 8 +-- src/test/cpp/filter/denyallfiltertest.cpp | 8 +-- src/test/cpp/filter/levelmatchfiltertest.cpp | 8 +-- src/test/cpp/filter/levelrangefiltertest.cpp | 8 +-- .../cpp/filter/locationinfofiltertest.cpp | 8 +-- src/test/cpp/filter/loggermatchfiltertest.cpp | 8 +-- src/test/cpp/filter/mapfiltertest.cpp | 8 +-- src/test/cpp/filter/stringmatchfiltertest.cpp | 8 +-- src/test/cpp/fmttest.cpp | 14 ++--- .../absolutetimedateformattestcase.cpp | 4 +- .../cpp/helpers/cacheddateformattestcase.cpp | 6 +- src/test/cpp/helpers/casttestcase.cpp | 12 ++-- .../cpp/helpers/charsetdecodertestcase.cpp | 4 +- .../cpp/helpers/charsetencodertestcase.cpp | 4 +- src/test/cpp/helpers/cyclicbuffertestcase.cpp | 8 +-- .../helpers/datetimedateformattestcase.cpp | 4 +- src/test/cpp/helpers/filewatchdogtest.cpp | 4 +- src/test/cpp/helpers/inetaddresstestcase.cpp | 4 +- .../cpp/helpers/iso8601dateformattestcase.cpp | 4 +- src/test/cpp/helpers/localechanger.cpp | 2 +- src/test/cpp/helpers/messagebuffertest.cpp | 32 +++++----- .../cpp/helpers/optionconvertertestcase.cpp | 6 +- src/test/cpp/helpers/propertiestestcase.cpp | 4 +- .../relativetimedateformattestcase.cpp | 8 +-- src/test/cpp/helpers/stringhelpertestcase.cpp | 4 +- .../cpp/helpers/stringtokenizertestcase.cpp | 4 +- src/test/cpp/helpers/syslogwritertest.cpp | 4 +- .../cpp/helpers/threadutilitytestcase.cpp | 4 +- src/test/cpp/helpers/timezonetestcase.cpp | 4 +- src/test/cpp/helpers/transcodertestcase.cpp | 6 +- src/test/cpp/hexdumptestcase.cpp | 10 ++-- src/test/cpp/hierarchytest.cpp | 2 +- src/test/cpp/hierarchythresholdtestcase.cpp | 2 +- src/test/cpp/insertwide.h | 2 +- src/test/cpp/jsonlayouttest.cpp | 6 +- src/test/cpp/l7dtestcase.cpp | 6 +- src/test/cpp/leveltestcase.cpp | 4 +- src/test/cpp/locationdisabledtest.cpp | 4 +- src/test/cpp/locationtest.cpp | 4 +- src/test/cpp/loggertestcase.cpp | 6 +- src/test/cpp/logunit.cpp | 4 +- src/test/cpp/logunit.h | 4 +- src/test/cpp/mdctestcase.cpp | 2 +- src/test/cpp/minimumtestcase.cpp | 4 +- src/test/cpp/multithreadtest.cpp | 2 +- src/test/cpp/ndctestcase.cpp | 2 +- src/test/cpp/net/smtpappendertestcase.cpp | 10 ++-- src/test/cpp/net/socketappendertestcase.cpp | 16 ++--- src/test/cpp/net/socketserverstarter.cpp | 2 +- src/test/cpp/net/syslogappendertestcase.cpp | 6 +- src/test/cpp/net/telnetappendertestcase.cpp | 8 +-- .../cpp/net/xmlsocketappendertestcase.cpp | 6 +- .../cpp/nt/nteventlogappendertestcase.cpp | 10 ++-- .../colorstartpatternconvertertest.cpp | 8 +-- .../cpp/pattern/num343patternconverter.cpp | 6 +- src/test/cpp/pattern/num343patternconverter.h | 4 +- .../cpp/pattern/patternparsertestcase.cpp | 8 +-- src/test/cpp/patternlayouttest.cpp | 6 +- src/test/cpp/propertyconfiguratortest.cpp | 6 +- .../cpp/rolling/filenamepatterntestcase.cpp | 6 +- .../cpp/rolling/filterbasedrollingtest.cpp | 10 ++-- src/test/cpp/rolling/manualrollingtest.cpp | 10 ++-- .../rollingfileappenderpropertiestest.cpp | 12 ++-- src/test/cpp/rolling/sizebasedrollingtest.cpp | 10 ++-- src/test/cpp/rolling/timebasedrollingtest.cpp | 12 ++-- src/test/cpp/rollingfileappendertestcase.cpp | 6 +- src/test/cpp/streamtestcase.cpp | 38 ++++++------ .../cpp/throughput/log4cxxbenchmarker.cpp | 60 +++++++++---------- src/test/cpp/throughput/log4cxxbenchmarker.h | 6 +- src/test/cpp/throughput/throughput-main.cpp | 10 ++-- .../cpp/util/absolutedateandtimefilter.cpp | 4 +- src/test/cpp/util/absolutetimefilter.cpp | 4 +- src/test/cpp/util/binarycompare.cpp | 6 +- src/test/cpp/util/compare.cpp | 6 +- src/test/cpp/util/compare.h | 2 +- src/test/cpp/util/controlfilter.cpp | 4 +- src/test/cpp/util/filenamefilter.cpp | 4 +- src/test/cpp/util/iso8601filter.cpp | 4 +- src/test/cpp/util/linenumberfilter.cpp | 4 +- src/test/cpp/util/relativetimefilter.cpp | 4 +- src/test/cpp/util/threadfilter.cpp | 4 +- src/test/cpp/util/transformer.cpp | 16 ++--- src/test/cpp/util/transformer.h | 4 +- src/test/cpp/util/utilfilter.cpp | 4 +- src/test/cpp/util/xmlfilenamefilter.cpp | 4 +- src/test/cpp/util/xmllineattributefilter.cpp | 4 +- src/test/cpp/util/xmlthreadfilter.cpp | 4 +- src/test/cpp/util/xmltimestampfilter.cpp | 4 +- src/test/cpp/varia/errorhandlertestcase.cpp | 22 +++---- .../cpp/varia/levelmatchfiltertestcase.cpp | 6 +- .../cpp/varia/levelrangefiltertestcase.cpp | 6 +- src/test/cpp/vectorappender.cpp | 4 +- src/test/cpp/vectorappender.h | 2 +- src/test/cpp/writerappendertestcase.cpp | 4 +- src/test/cpp/writerappendertestcase.h | 4 +- src/test/cpp/xml/customleveltestcase.cpp | 6 +- src/test/cpp/xml/domtestcase.cpp | 6 +- src/test/cpp/xml/xlevel.cpp | 4 +- src/test/cpp/xml/xmllayouttest.cpp | 8 +-- src/test/cpp/xml/xmllayouttestcase.cpp | 6 +- 125 files changed, 417 insertions(+), 413 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 041811583..5c94d1a3c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -37,11 +37,7 @@ endif() option(BUILD_EXAMPLES "Build log4cxx examples" ${BUILD_TESTING}) if(BUILD_EXAMPLES) - if("log4cxx" STREQUAL "${LOG4CXX_NS}") - add_subdirectory(examples/cpp) - else() - message(FATAL_ERROR "Examples can only be build if LOG4CXX_NS=log4cxx, but LOG4CXX_NS=${LOG4CXX_NS}.") - endif() + add_subdirectory(examples/cpp) endif() add_subdirectory(site) diff --git a/src/examples/cpp/custom-appender.cpp b/src/examples/cpp/custom-appender.cpp index 807dff93c..38ff63cd0 100644 --- a/src/examples/cpp/custom-appender.cpp +++ b/src/examples/cpp/custom-appender.cpp @@ -20,7 +20,7 @@ #include #include -namespace log4cxx { +namespace LOG4CXX_NS { class NullWriterAppender : public log4cxx::AppenderSkeleton { public: diff --git a/src/main/include/CMakeLists.txt b/src/main/include/CMakeLists.txt index 4b9136aaa..ed32316cc 100644 --- a/src/main/include/CMakeLists.txt +++ b/src/main/include/CMakeLists.txt @@ -88,6 +88,10 @@ else() endif() set(LOG4CXX_NS "log4cxx" CACHE STRING "Root namespace name") +set(LOG4CXX_DECLARE_DEFAULT_NS_ALIAS 0) +if(NOT "log4cxx" STREQUAL "${LOG4CXX_NS}") + set(LOG4CXX_DECLARE_DEFAULT_NS_ALIAS 1) +endif() # Configure log4cxx_private.h set(LOG4CXX_CHARSET "utf-8" CACHE STRING "LogString characters, choice of utf-8 (default), ISO-8859-1, US-ASCII, EBCDIC, locale") diff --git a/src/main/include/log4cxx/log4cxx.h.in b/src/main/include/log4cxx/log4cxx.h.in index 348d28735..b16d3de14 100644 --- a/src/main/include/log4cxx/log4cxx.h.in +++ b/src/main/include/log4cxx/log4cxx.h.in @@ -119,4 +119,8 @@ LOG4CXX_EXPORT uint32_t libraryVersion(); } +#if @LOG4CXX_DECLARE_DEFAULT_NS_ALIAS@ +namespace log4cxx = LOG4CXX_NS; +#endif + #endif diff --git a/src/test/cpp/appenderskeletontestcase.cpp b/src/test/cpp/appenderskeletontestcase.cpp index 1f93dae1c..270ab259b 100644 --- a/src/test/cpp/appenderskeletontestcase.cpp +++ b/src/test/cpp/appenderskeletontestcase.cpp @@ -21,8 +21,8 @@ #include -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; +using namespace log4cxx; +using namespace log4cxx::helpers; void AppenderSkeletonTestCase::testDefaultThreshold() diff --git a/src/test/cpp/appenderskeletontestcase.h b/src/test/cpp/appenderskeletontestcase.h index 2d491ca49..40b01d2c7 100644 --- a/src/test/cpp/appenderskeletontestcase.h +++ b/src/test/cpp/appenderskeletontestcase.h @@ -26,7 +26,7 @@ LOGUNIT_CLASS(AppenderSkeletonTestCase) { public: - virtual LOG4CXX_NS::AppenderSkeleton* createAppenderSkeleton() const = 0; + virtual log4cxx::AppenderSkeleton* createAppenderSkeleton() const = 0; void testDefaultThreshold(); diff --git a/src/test/cpp/asyncappendertestcase.cpp b/src/test/cpp/asyncappendertestcase.cpp index e810665e7..dedbded91 100644 --- a/src/test/cpp/asyncappendertestcase.cpp +++ b/src/test/cpp/asyncappendertestcase.cpp @@ -33,9 +33,9 @@ #include #include -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; -using namespace LOG4CXX_NS::spi; +using namespace log4cxx; +using namespace log4cxx::helpers; +using namespace log4cxx::spi; class NullPointerAppender : public AppenderSkeleton { @@ -48,7 +48,7 @@ class NullPointerAppender : public AppenderSkeleton /** * @{inheritDoc} */ - void append(const spi::LoggingEventPtr&, LOG4CXX_NS::helpers::Pool&) override + void append(const spi::LoggingEventPtr&, log4cxx::helpers::Pool&) override { throw NullPointerException(LOG4CXX_STR("Intentional NullPointerException")); } @@ -81,7 +81,7 @@ class BlockableVectorAppender : public VectorAppender /** * {@inheritDoc} */ - void append(const spi::LoggingEventPtr& event, LOG4CXX_NS::helpers::Pool& p) override + void append(const spi::LoggingEventPtr& event, log4cxx::helpers::Pool& p) override { std::unique_lock lock( blocker ); VectorAppender::append(event, p); @@ -285,14 +285,14 @@ class AsyncAppenderTestCase : public AppenderSkeletonTestCase LoggingEventPtr discardEvent = events[events.size() - 1]; LOGUNIT_ASSERT(initialEvent->getMessage() == LOG4CXX_STR("Hello, World")); LOGUNIT_ASSERT(discardEvent->getMessage().substr(0, 10) == LOG4CXX_STR("Discarded ")); - LOGUNIT_ASSERT_EQUAL(LOG4CXX_NS::spi::LocationInfo::getLocationUnavailable().getClassName(), + LOGUNIT_ASSERT_EQUAL(log4cxx::spi::LocationInfo::getLocationUnavailable().getClassName(), discardEvent->getLocationInformation().getClassName()); } void testConfiguration() { - LOG4CXX_NS::xml::DOMConfigurator::configure("input/xml/asyncAppender1.xml"); - AsyncAppenderPtr asyncAppender = LOG4CXX_NS::cast(Logger::getRootLogger()->getAppender(LOG4CXX_STR("ASYNC"))); + log4cxx::xml::DOMConfigurator::configure("input/xml/asyncAppender1.xml"); + AsyncAppenderPtr asyncAppender = log4cxx::cast(Logger::getRootLogger()->getAppender(LOG4CXX_STR("ASYNC"))); LOGUNIT_ASSERT(!(asyncAppender == 0)); LOGUNIT_ASSERT_EQUAL(100, asyncAppender->getBufferSize()); LOGUNIT_ASSERT_EQUAL(false, asyncAppender->getBlocking()); diff --git a/src/test/cpp/autoconfiguretestcase.cpp b/src/test/cpp/autoconfiguretestcase.cpp index 4dedea0c7..e486727e7 100644 --- a/src/test/cpp/autoconfiguretestcase.cpp +++ b/src/test/cpp/autoconfiguretestcase.cpp @@ -48,7 +48,7 @@ } \ } register ## testName ## ThreadTest -using namespace LOG4CXX_NS; +using namespace log4cxx; LOGUNIT_CLASS(AutoConfigureTestCase) { diff --git a/src/test/cpp/benchmark/benchmark.cpp b/src/test/cpp/benchmark/benchmark.cpp index 551724a53..638a1590e 100644 --- a/src/test/cpp/benchmark/benchmark.cpp +++ b/src/test/cpp/benchmark/benchmark.cpp @@ -8,7 +8,7 @@ #include #include -using namespace LOG4CXX_NS; +using namespace log4cxx; class NullWriterAppender : public AppenderSkeleton { @@ -49,8 +49,8 @@ IMPLEMENT_LOG4CXX_OBJECT(NullWriterAppender) LOG4CXX_PTR_DEF(NullWriterAppender); #else #define LOG4CXX_HAS_FMT 0 -template class LOG4CXX_NS::helpers::ObjectPtrT; -typedef LOG4CXX_NS::helpers::ObjectPtrT NullWriterAppenderPtr; +template class log4cxx::helpers::ObjectPtrT; +typedef log4cxx::helpers::ObjectPtrT NullWriterAppenderPtr; #endif class benchmarker : public ::benchmark::Fixture diff --git a/src/test/cpp/consoleappendertestcase.cpp b/src/test/cpp/consoleappendertestcase.cpp index 342617916..51383861f 100644 --- a/src/test/cpp/consoleappendertestcase.cpp +++ b/src/test/cpp/consoleappendertestcase.cpp @@ -19,8 +19,8 @@ #include "logunit.h" #include "writerappendertestcase.h" -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; +using namespace log4cxx; +using namespace log4cxx::helpers; /** Unit tests of ConsoleAppender. @@ -41,7 +41,7 @@ class ConsoleAppenderTestCase : public WriterAppenderTestCase WriterAppender* createWriterAppender() const { - return new LOG4CXX_NS::ConsoleAppender(); + return new log4cxx::ConsoleAppender(); } void testNoLayout() diff --git a/src/test/cpp/customlogger/xlogger.cpp b/src/test/cpp/customlogger/xlogger.cpp index b6541a509..9a3760a69 100644 --- a/src/test/cpp/customlogger/xlogger.cpp +++ b/src/test/cpp/customlogger/xlogger.cpp @@ -22,8 +22,8 @@ #include -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::spi; +using namespace log4cxx; +using namespace log4cxx::spi; IMPLEMENT_LOG4CXX_OBJECT(XLogger) IMPLEMENT_LOG4CXX_OBJECT(XFactory) @@ -104,7 +104,7 @@ XFactory::XFactory() { } -LoggerPtr XFactory::makeNewLoggerInstance(LOG4CXX_NS::helpers::Pool& pool, +LoggerPtr XFactory::makeNewLoggerInstance(log4cxx::helpers::Pool& pool, const LogString& name) const { return LoggerPtr(new XLogger(pool, name)); diff --git a/src/test/cpp/customlogger/xlogger.h b/src/test/cpp/customlogger/xlogger.h index 9e39a1287..154e742b2 100644 --- a/src/test/cpp/customlogger/xlogger.h +++ b/src/test/cpp/customlogger/xlogger.h @@ -44,7 +44,7 @@ class XFactory : XFactory(); LoggerPtr makeNewLoggerInstance( - LOG4CXX_NS::helpers::Pool& pool, + log4cxx::helpers::Pool& pool, const LogString& name) const override; }; @@ -72,7 +72,7 @@ class XLogger : public Logger /** Just calls the parent constuctor. */ - XLogger(LOG4CXX_NS::helpers::Pool& pool, + XLogger(log4cxx::helpers::Pool& pool, const LogString& name1) : Logger(pool, name1) {} /** @@ -84,7 +84,7 @@ class XLogger : public Logger /** We introduce a new printing method in order to support {@link XLevel#LETHAL}. */ - void lethal(const LogString& message, const LOG4CXX_NS::spi::LocationInfo& location); + void lethal(const LogString& message, const log4cxx::spi::LocationInfo& location); /** We introduce a new printing method in order to support {@link @@ -108,7 +108,7 @@ class XLogger : public Logger /** We introduce a new printing method that takes the TRACE level. */ - void trace(const LogString& message, const LOG4CXX_NS::spi::LocationInfo& location); + void trace(const LogString& message, const log4cxx::spi::LocationInfo& location); /** We introduce a new printing method that takes the TRACE level. diff --git a/src/test/cpp/customlogger/xloggertestcase.cpp b/src/test/cpp/customlogger/xloggertestcase.cpp index 691c14163..74302e5ca 100644 --- a/src/test/cpp/customlogger/xloggertestcase.cpp +++ b/src/test/cpp/customlogger/xloggertestcase.cpp @@ -25,9 +25,9 @@ #include "../util/compare.h" #include -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; -using namespace LOG4CXX_NS::xml; +using namespace log4cxx; +using namespace log4cxx::helpers; +using namespace log4cxx::xml; #define LOG4CXX_TEST_STR(x) L##x @@ -77,7 +77,7 @@ LOGUNIT_CLASS(XLoggerTestCase) DOMConfigurator::configure(fn); int i = 0; - LOG4CXX_LOG(logger, LOG4CXX_NS::XLevel::getTrace(), "Message " << i); + LOG4CXX_LOG(logger, log4cxx::XLevel::getTrace(), "Message " << i); i++; LOG4CXX_DEBUG(logger, "Message " << i); diff --git a/src/test/cpp/db/odbcappendertestcase.cpp b/src/test/cpp/db/odbcappendertestcase.cpp index 2e817fd90..ca568aed0 100644 --- a/src/test/cpp/db/odbcappendertestcase.cpp +++ b/src/test/cpp/db/odbcappendertestcase.cpp @@ -26,7 +26,7 @@ #ifdef LOG4CXX_HAVE_ODBC -using namespace LOG4CXX_NS; +using namespace log4cxx; /** Unit tests of log4cxx::SocketAppender diff --git a/src/test/cpp/decodingtest.cpp b/src/test/cpp/decodingtest.cpp index 7f08d801b..72345f1d0 100644 --- a/src/test/cpp/decodingtest.cpp +++ b/src/test/cpp/decodingtest.cpp @@ -38,8 +38,8 @@ // #if LOG4CXX_WCHAR_T_API -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; +using namespace log4cxx; +using namespace log4cxx::helpers; /** * Tests support for decoding specification. diff --git a/src/test/cpp/defaultinit/testcase1.cpp b/src/test/cpp/defaultinit/testcase1.cpp index e9e5e76f6..2b56af6d9 100644 --- a/src/test/cpp/defaultinit/testcase1.cpp +++ b/src/test/cpp/defaultinit/testcase1.cpp @@ -20,7 +20,7 @@ #include #include -using namespace LOG4CXX_NS; +using namespace log4cxx; LOGUNIT_CLASS(TestCase1) { diff --git a/src/test/cpp/defaultinit/testcase2.cpp b/src/test/cpp/defaultinit/testcase2.cpp index 697cacd78..c6de4979a 100644 --- a/src/test/cpp/defaultinit/testcase2.cpp +++ b/src/test/cpp/defaultinit/testcase2.cpp @@ -26,7 +26,7 @@ #include "../insertwide.h" #include "../logunit.h" -using namespace LOG4CXX_NS; +using namespace log4cxx; LOGUNIT_CLASS(TestCase2) { diff --git a/src/test/cpp/defaultinit/testcase3.cpp b/src/test/cpp/defaultinit/testcase3.cpp index 7210f7e05..fd9a9ab2d 100644 --- a/src/test/cpp/defaultinit/testcase3.cpp +++ b/src/test/cpp/defaultinit/testcase3.cpp @@ -22,7 +22,7 @@ #include "../insertwide.h" #include "../logunit.h" -using namespace LOG4CXX_NS; +using namespace log4cxx; LOGUNIT_CLASS(TestCase3) { diff --git a/src/test/cpp/defaultinit/testcase4.cpp b/src/test/cpp/defaultinit/testcase4.cpp index eb4c63a57..21e7f3733 100644 --- a/src/test/cpp/defaultinit/testcase4.cpp +++ b/src/test/cpp/defaultinit/testcase4.cpp @@ -26,7 +26,7 @@ #include "../insertwide.h" #include "../logunit.h" -using namespace LOG4CXX_NS; +using namespace log4cxx; LOGUNIT_CLASS(TestCase4) { diff --git a/src/test/cpp/encodingtest.cpp b/src/test/cpp/encodingtest.cpp index a4ad47862..7e190b198 100644 --- a/src/test/cpp/encodingtest.cpp +++ b/src/test/cpp/encodingtest.cpp @@ -33,9 +33,9 @@ #include #include -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::util; -using namespace LOG4CXX_NS::helpers; +using namespace log4cxx; +using namespace log4cxx::util; +using namespace log4cxx::helpers; /** * Tests support for encoding specification. diff --git a/src/test/cpp/eventsatexittest.cpp b/src/test/cpp/eventsatexittest.cpp index 35b13ba24..eb707b9eb 100644 --- a/src/test/cpp/eventsatexittest.cpp +++ b/src/test/cpp/eventsatexittest.cpp @@ -17,7 +17,7 @@ #include -using namespace LOG4CXX_NS; +using namespace log4cxx; static struct Static { diff --git a/src/test/cpp/fileappendertest.cpp b/src/test/cpp/fileappendertest.cpp index 5cf55355b..fb6e992b2 100644 --- a/src/test/cpp/fileappendertest.cpp +++ b/src/test/cpp/fileappendertest.cpp @@ -19,8 +19,8 @@ #include #include "logunit.h" -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; +using namespace log4cxx; +using namespace log4cxx::helpers; /** diff --git a/src/test/cpp/fileappendertestcase.cpp b/src/test/cpp/fileappendertestcase.cpp index 560afeb6a..61910e6e8 100644 --- a/src/test/cpp/fileappendertestcase.cpp +++ b/src/test/cpp/fileappendertestcase.cpp @@ -19,8 +19,8 @@ #include #include "insertwide.h" -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; +using namespace log4cxx; +using namespace log4cxx::helpers; WriterAppender* FileAppenderAbstractTestCase::createWriterAppender() const { @@ -53,7 +53,7 @@ class FileAppenderTestCase : public FileAppenderAbstractTestCase FileAppender* createFileAppender() const { - return new LOG4CXX_NS::FileAppender(); + return new log4cxx::FileAppender(); } void testSetDoubleBackslashes() diff --git a/src/test/cpp/fileappendertestcase.h b/src/test/cpp/fileappendertestcase.h index 762ad11b9..f8caa49d6 100644 --- a/src/test/cpp/fileappendertestcase.h +++ b/src/test/cpp/fileappendertestcase.h @@ -27,8 +27,8 @@ class FileAppenderAbstractTestCase : public WriterAppenderTestCase { public: - LOG4CXX_NS::WriterAppender* createWriterAppender() const; + log4cxx::WriterAppender* createWriterAppender() const; - virtual LOG4CXX_NS::FileAppender* createFileAppender() const = 0; + virtual log4cxx::FileAppender* createFileAppender() const = 0; }; diff --git a/src/test/cpp/filetestcase.cpp b/src/test/cpp/filetestcase.cpp index c49e4ecae..00146c834 100644 --- a/src/test/cpp/filetestcase.cpp +++ b/src/test/cpp/filetestcase.cpp @@ -33,8 +33,8 @@ #include #endif -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; +using namespace log4cxx; +using namespace log4cxx::helpers; LOGUNIT_CLASS(FileTestCase) @@ -119,7 +119,7 @@ LOGUNIT_CLASS(FileTestCase) #if LOG4CXX_UNICHAR_API void unicharConstructor() { - const LOG4CXX_NS::UniChar filename[] = { 'i', 'n', 'p', 'u', 't', '/', + const log4cxx::UniChar filename[] = { 'i', 'n', 'p', 'u', 't', '/', 'p', 'a', 't', 't', 'e', 'r', 'n', 'L', 'a', 'y', 'o', 'u', 't', '1', '.', 'p', 'r', 'o', 'p', 'e', 'r', 't', 'i', 'e', 's', 0 }; diff --git a/src/test/cpp/filter/andfiltertest.cpp b/src/test/cpp/filter/andfiltertest.cpp index 290a9471f..96defe46b 100644 --- a/src/test/cpp/filter/andfiltertest.cpp +++ b/src/test/cpp/filter/andfiltertest.cpp @@ -24,10 +24,10 @@ #include #include "../logunit.h" -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::filter; -using namespace LOG4CXX_NS::spi; -using namespace LOG4CXX_NS::helpers; +using namespace log4cxx; +using namespace log4cxx::filter; +using namespace log4cxx::spi; +using namespace log4cxx::helpers; /** diff --git a/src/test/cpp/filter/denyallfiltertest.cpp b/src/test/cpp/filter/denyallfiltertest.cpp index 53d7cdcd3..1ff1f7b87 100644 --- a/src/test/cpp/filter/denyallfiltertest.cpp +++ b/src/test/cpp/filter/denyallfiltertest.cpp @@ -20,10 +20,10 @@ #include #include "../logunit.h" -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::filter; -using namespace LOG4CXX_NS::spi; -using namespace LOG4CXX_NS::helpers; +using namespace log4cxx; +using namespace log4cxx::filter; +using namespace log4cxx::spi; +using namespace log4cxx::helpers; /** diff --git a/src/test/cpp/filter/levelmatchfiltertest.cpp b/src/test/cpp/filter/levelmatchfiltertest.cpp index 7c0b94ad5..3acbb8ffc 100644 --- a/src/test/cpp/filter/levelmatchfiltertest.cpp +++ b/src/test/cpp/filter/levelmatchfiltertest.cpp @@ -20,10 +20,10 @@ #include #include "../logunit.h" -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::filter; -using namespace LOG4CXX_NS::spi; -using namespace LOG4CXX_NS::helpers; +using namespace log4cxx; +using namespace log4cxx::filter; +using namespace log4cxx::spi; +using namespace log4cxx::helpers; /** diff --git a/src/test/cpp/filter/levelrangefiltertest.cpp b/src/test/cpp/filter/levelrangefiltertest.cpp index 587e3ba07..f0971f64b 100644 --- a/src/test/cpp/filter/levelrangefiltertest.cpp +++ b/src/test/cpp/filter/levelrangefiltertest.cpp @@ -20,10 +20,10 @@ #include #include "../logunit.h" -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::filter; -using namespace LOG4CXX_NS::spi; -using namespace LOG4CXX_NS::helpers; +using namespace log4cxx; +using namespace log4cxx::filter; +using namespace log4cxx::spi; +using namespace log4cxx::helpers; /** diff --git a/src/test/cpp/filter/locationinfofiltertest.cpp b/src/test/cpp/filter/locationinfofiltertest.cpp index 9537ed08a..402b97a5b 100644 --- a/src/test/cpp/filter/locationinfofiltertest.cpp +++ b/src/test/cpp/filter/locationinfofiltertest.cpp @@ -20,10 +20,10 @@ #include #include "../logunit.h" -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::filter; -using namespace LOG4CXX_NS::spi; -using namespace LOG4CXX_NS::helpers; +using namespace log4cxx; +using namespace log4cxx::filter; +using namespace log4cxx::spi; +using namespace log4cxx::helpers; /** * Unit tests for LocationInfo. diff --git a/src/test/cpp/filter/loggermatchfiltertest.cpp b/src/test/cpp/filter/loggermatchfiltertest.cpp index 21e9a5467..88adb06bb 100644 --- a/src/test/cpp/filter/loggermatchfiltertest.cpp +++ b/src/test/cpp/filter/loggermatchfiltertest.cpp @@ -20,10 +20,10 @@ #include #include "../logunit.h" -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::filter; -using namespace LOG4CXX_NS::spi; -using namespace LOG4CXX_NS::helpers; +using namespace log4cxx; +using namespace log4cxx::filter; +using namespace log4cxx::spi; +using namespace log4cxx::helpers; /** diff --git a/src/test/cpp/filter/mapfiltertest.cpp b/src/test/cpp/filter/mapfiltertest.cpp index da03bc82a..0b3d620d2 100644 --- a/src/test/cpp/filter/mapfiltertest.cpp +++ b/src/test/cpp/filter/mapfiltertest.cpp @@ -20,10 +20,10 @@ #include #include "../logunit.h" -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::filter; -using namespace LOG4CXX_NS::spi; -using namespace LOG4CXX_NS::helpers; +using namespace log4cxx; +using namespace log4cxx::filter; +using namespace log4cxx::spi; +using namespace log4cxx::helpers; /** * Unit tests for MapFilter. diff --git a/src/test/cpp/filter/stringmatchfiltertest.cpp b/src/test/cpp/filter/stringmatchfiltertest.cpp index 075492e15..131d0edb7 100644 --- a/src/test/cpp/filter/stringmatchfiltertest.cpp +++ b/src/test/cpp/filter/stringmatchfiltertest.cpp @@ -20,10 +20,10 @@ #include #include "../logunit.h" -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::filter; -using namespace LOG4CXX_NS::spi; -using namespace LOG4CXX_NS::helpers; +using namespace log4cxx; +using namespace log4cxx::filter; +using namespace log4cxx::spi; +using namespace log4cxx::helpers; /** diff --git a/src/test/cpp/fmttest.cpp b/src/test/cpp/fmttest.cpp index 2fee1c362..3827f69c1 100644 --- a/src/test/cpp/fmttest.cpp +++ b/src/test/cpp/fmttest.cpp @@ -49,8 +49,8 @@ REGEX_STR("Message [0-9]\\{1,2\\}") #define PAT_MDC_1 REGEX_STR("") -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; +using namespace log4cxx; +using namespace log4cxx::helpers; LOGUNIT_CLASS(FMTTestCase) { @@ -136,20 +136,20 @@ LOGUNIT_CLASS(FMTTestCase) auto tp = std::chrono::system_clock::from_time_t(std::mktime(&tm)); uint64_t micros = std::chrono::duration_cast(tp.time_since_epoch()).count(); - LOG4CXX_NS::helpers::Date::setGetCurrentTimeFunction([micros](){ + log4cxx::helpers::Date::setGetCurrentTimeFunction([micros](){ return micros; }); - LOG4CXX_NS::spi::LoggingEventPtr logEvt = std::make_shared(LOG4CXX_STR("foo"), + log4cxx::spi::LoggingEventPtr logEvt = std::make_shared(LOG4CXX_STR("foo"), Level::getInfo(), LOG4CXX_STR("A Message"), - LOG4CXX_NS::spi::LocationInfo::getLocationUnavailable()); + log4cxx::spi::LocationInfo::getLocationUnavailable()); FMTLayout layout(LOG4CXX_STR("{d:%Y-%m-%d %H:%M:%S} {message}")); LogString output; - LOG4CXX_NS::helpers::Pool pool; + log4cxx::helpers::Pool pool; layout.format( output, logEvt, pool); - LOG4CXX_NS::helpers::Date::setGetCurrentTimeFunction(nullptr); + log4cxx::helpers::Date::setGetCurrentTimeFunction(nullptr); LOGUNIT_ASSERT_EQUAL(LOG4CXX_STR("2013-04-11 09:35:34 A Message"), output); } diff --git a/src/test/cpp/helpers/absolutetimedateformattestcase.cpp b/src/test/cpp/helpers/absolutetimedateformattestcase.cpp index e5e545734..d88b0a5c2 100644 --- a/src/test/cpp/helpers/absolutetimedateformattestcase.cpp +++ b/src/test/cpp/helpers/absolutetimedateformattestcase.cpp @@ -28,8 +28,8 @@ #endif -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; +using namespace log4cxx; +using namespace log4cxx::helpers; diff --git a/src/test/cpp/helpers/cacheddateformattestcase.cpp b/src/test/cpp/helpers/cacheddateformattestcase.cpp index ac0d9f801..1da31a100 100644 --- a/src/test/cpp/helpers/cacheddateformattestcase.cpp +++ b/src/test/cpp/helpers/cacheddateformattestcase.cpp @@ -27,9 +27,9 @@ #include #include "localechanger.h" -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; -using namespace LOG4CXX_NS::pattern; +using namespace log4cxx; +using namespace log4cxx::helpers; +using namespace log4cxx::pattern; #define LOCALE_US "C" #if defined(_WIN32) diff --git a/src/test/cpp/helpers/casttestcase.cpp b/src/test/cpp/helpers/casttestcase.cpp index 31f167cb5..53e6de547 100644 --- a/src/test/cpp/helpers/casttestcase.cpp +++ b/src/test/cpp/helpers/casttestcase.cpp @@ -21,8 +21,8 @@ #include #include -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; +using namespace log4cxx; +using namespace log4cxx::helpers; #define LOG4CXX_TEST 1 #include @@ -47,7 +47,7 @@ LOGUNIT_CLASS(CastTestCase) { OutputStreamPtr out = OutputStreamPtr(new ByteArrayOutputStream()); - ByteArrayOutputStreamPtr byteOut = LOG4CXX_NS::cast(out); + ByteArrayOutputStreamPtr byteOut = log4cxx::cast(out); LOGUNIT_ASSERT(byteOut); } @@ -56,7 +56,7 @@ LOGUNIT_CLASS(CastTestCase) { OutputStreamPtr out = OutputStreamPtr(new ByteArrayOutputStream()); - FileOutputStreamPtr fos = LOG4CXX_NS::cast(out); + FileOutputStreamPtr fos = log4cxx::cast(out); LOGUNIT_ASSERT(!fos); } @@ -65,7 +65,7 @@ LOGUNIT_CLASS(CastTestCase) { OutputStreamPtr out = nullptr; - FileOutputStreamPtr fos = LOG4CXX_NS::cast(out); + FileOutputStreamPtr fos = log4cxx::cast(out); LOGUNIT_ASSERT(!fos); } @@ -74,7 +74,7 @@ LOGUNIT_CLASS(CastTestCase) { rolling::RollingFileAppenderPtr rolling = rolling::RollingFileAppenderPtr(new rolling::RollingFileAppender()); - AppenderPtr appender = LOG4CXX_NS::cast(rolling); + AppenderPtr appender = log4cxx::cast(rolling); LOGUNIT_ASSERT(appender); } diff --git a/src/test/cpp/helpers/charsetdecodertestcase.cpp b/src/test/cpp/helpers/charsetdecodertestcase.cpp index ca339cfbd..ba7539db6 100644 --- a/src/test/cpp/helpers/charsetdecodertestcase.cpp +++ b/src/test/cpp/helpers/charsetdecodertestcase.cpp @@ -21,8 +21,8 @@ #include "../insertwide.h" #include -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; +using namespace log4cxx; +using namespace log4cxx::helpers; #define APR_SUCCESS ((log4cxx_status_t) 0) diff --git a/src/test/cpp/helpers/charsetencodertestcase.cpp b/src/test/cpp/helpers/charsetencodertestcase.cpp index 23f1edab1..b44a6e4cc 100644 --- a/src/test/cpp/helpers/charsetencodertestcase.cpp +++ b/src/test/cpp/helpers/charsetencodertestcase.cpp @@ -24,8 +24,8 @@ #include #include -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; +using namespace log4cxx; +using namespace log4cxx::helpers; LOGUNIT_CLASS(CharsetEncoderTestCase) diff --git a/src/test/cpp/helpers/cyclicbuffertestcase.cpp b/src/test/cpp/helpers/cyclicbuffertestcase.cpp index 857f3bad5..859ff0768 100644 --- a/src/test/cpp/helpers/cyclicbuffertestcase.cpp +++ b/src/test/cpp/helpers/cyclicbuffertestcase.cpp @@ -24,9 +24,9 @@ #include #include "../testchar.h" -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; -using namespace LOG4CXX_NS::spi; +using namespace log4cxx; +using namespace log4cxx::helpers; +using namespace log4cxx::spi; #define MAX 1000 @@ -50,7 +50,7 @@ LOGUNIT_CLASS(CyclicBufferTestCase) for (int i = 0; i < MAX; i++) { event = LoggingEventPtr(new LoggingEvent(LOG4CXX_STR("x"), Level::getDebug(), LOG4CXX_STR("e"), - LOG4CXX_NS::spi::LocationInfo::getLocationUnavailable())); + log4cxx::spi::LocationInfo::getLocationUnavailable())); e.push_back(event); } } diff --git a/src/test/cpp/helpers/datetimedateformattestcase.cpp b/src/test/cpp/helpers/datetimedateformattestcase.cpp index 4161de2b1..e771404e0 100644 --- a/src/test/cpp/helpers/datetimedateformattestcase.cpp +++ b/src/test/cpp/helpers/datetimedateformattestcase.cpp @@ -25,8 +25,8 @@ #include #include -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; +using namespace log4cxx; +using namespace log4cxx::helpers; using namespace std; #define LOCALE_US "C" diff --git a/src/test/cpp/helpers/filewatchdogtest.cpp b/src/test/cpp/helpers/filewatchdogtest.cpp index 076e21270..67cae7097 100644 --- a/src/test/cpp/helpers/filewatchdogtest.cpp +++ b/src/test/cpp/helpers/filewatchdogtest.cpp @@ -19,8 +19,8 @@ #include "../logunit.h" #include "apr_time.h" -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; +using namespace log4cxx; +using namespace log4cxx::helpers; /** diff --git a/src/test/cpp/helpers/inetaddresstestcase.cpp b/src/test/cpp/helpers/inetaddresstestcase.cpp index d3728786c..b29ca5c00 100644 --- a/src/test/cpp/helpers/inetaddresstestcase.cpp +++ b/src/test/cpp/helpers/inetaddresstestcase.cpp @@ -18,8 +18,8 @@ #include #include "../logunit.h" -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; +using namespace log4cxx; +using namespace log4cxx::helpers; LOGUNIT_CLASS(InetAddressTestCase) diff --git a/src/test/cpp/helpers/iso8601dateformattestcase.cpp b/src/test/cpp/helpers/iso8601dateformattestcase.cpp index fd2391d08..13e63a659 100644 --- a/src/test/cpp/helpers/iso8601dateformattestcase.cpp +++ b/src/test/cpp/helpers/iso8601dateformattestcase.cpp @@ -28,8 +28,8 @@ -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; +using namespace log4cxx; +using namespace log4cxx::helpers; /** Unit test {@link ISO8601DateFormat}. diff --git a/src/test/cpp/helpers/localechanger.cpp b/src/test/cpp/helpers/localechanger.cpp index 616fcb472..a1aeb9eb6 100644 --- a/src/test/cpp/helpers/localechanger.cpp +++ b/src/test/cpp/helpers/localechanger.cpp @@ -23,7 +23,7 @@ #include "localechanger.h" #include -using namespace LOG4CXX_NS::helpers; +using namespace log4cxx::helpers; /** * Construction attemtps to change default locale. diff --git a/src/test/cpp/helpers/messagebuffertest.cpp b/src/test/cpp/helpers/messagebuffertest.cpp index 6cb0e118f..deba396be 100644 --- a/src/test/cpp/helpers/messagebuffertest.cpp +++ b/src/test/cpp/helpers/messagebuffertest.cpp @@ -26,8 +26,8 @@ #include #endif -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; +using namespace log4cxx; +using namespace log4cxx::helpers; /** * Test MessageBuffer. @@ -175,27 +175,27 @@ LOGUNIT_CLASS(MessageBufferTest) void testInsertConstUStr() { MessageBuffer buf; - const LOG4CXX_NS::UniChar hello[] = { 'H', 'e', 'l', 'l', 'o', 0 }; - const LOG4CXX_NS::UniChar world[] = { ',', ' ', 'W', 'o', 'r', 'l', 'd', 0 }; - const LOG4CXX_NS::UniChar greeting[] = { 'H', 'e', 'l', 'l', 'o', + const log4cxx::UniChar hello[] = { 'H', 'e', 'l', 'l', 'o', 0 }; + const log4cxx::UniChar world[] = { ',', ' ', 'W', 'o', 'r', 'l', 'd', 0 }; + const log4cxx::UniChar greeting[] = { 'H', 'e', 'l', 'l', 'o', ',', ' ', 'W', 'o', 'r', 'l', 'd', 0 }; UniCharMessageBuffer& retval = buf << hello << world; - LOGUNIT_ASSERT_EQUAL(std::basic_string(greeting), buf.str(retval)); + LOGUNIT_ASSERT_EQUAL(std::basic_string(greeting), buf.str(retval)); LOGUNIT_ASSERT_EQUAL(false, buf.hasStream()); } void testInsertUString() { MessageBuffer buf; - const LOG4CXX_NS::UniChar hello[] = { 'H', 'e', 'l', 'l', 'o', 0 }; - const LOG4CXX_NS::UniChar world[] = { ',', ' ', 'W', 'o', 'r', 'l', 'd', 0 }; - const LOG4CXX_NS::UniChar greeting[] = { 'H', 'e', 'l', 'l', 'o', + const log4cxx::UniChar hello[] = { 'H', 'e', 'l', 'l', 'o', 0 }; + const log4cxx::UniChar world[] = { ',', ' ', 'W', 'o', 'r', 'l', 'd', 0 }; + const log4cxx::UniChar greeting[] = { 'H', 'e', 'l', 'l', 'o', ',', ' ', 'W', 'o', 'r', 'l', 'd', 0 }; - UniCharMessageBuffer& retval = buf << std::basic_string(hello) - << std::basic_string(world); - LOGUNIT_ASSERT_EQUAL(std::basic_string(greeting), buf.str(retval)); + UniCharMessageBuffer& retval = buf << std::basic_string(hello) + << std::basic_string(world); + LOGUNIT_ASSERT_EQUAL(std::basic_string(greeting), buf.str(retval)); LOGUNIT_ASSERT_EQUAL(false, buf.hasStream()); } @@ -205,24 +205,24 @@ LOGUNIT_CLASS(MessageBufferTest) void testInsertCFString() { MessageBuffer buf; - const LOG4CXX_NS::UniChar greeting[] = { 'H', 'e', 'l', 'l', 'o', + const log4cxx::UniChar greeting[] = { 'H', 'e', 'l', 'l', 'o', ',', ' ', 'W', 'o', 'r', 'l', 'd', 0 }; UniCharMessageBuffer& retval = buf << CFSTR("Hello") << CFSTR(", World"); - LOGUNIT_ASSERT_EQUAL(std::basic_string(greeting), buf.str(retval)); + LOGUNIT_ASSERT_EQUAL(std::basic_string(greeting), buf.str(retval)); LOGUNIT_ASSERT_EQUAL(false, buf.hasStream()); } #elif LOG4CXX_CFSTRING_API void testInsertCFString() { MessageBuffer buf; - const LOG4CXX_NS::logchar greeting[] = { 'H', 'e', 'l', 'l', 'o', + const log4cxx::logchar greeting[] = { 'H', 'e', 'l', 'l', 'o', ',', ' ', 'W', 'o', 'r', 'l', 'd', 0 }; CharMessageBuffer& retval = buf << CFSTR("Hello") << CFSTR(", World"); - LOGUNIT_ASSERT_EQUAL(std::basic_string(greeting), buf.str(retval)); + LOGUNIT_ASSERT_EQUAL(std::basic_string(greeting), buf.str(retval)); LOGUNIT_ASSERT_EQUAL(false, buf.hasStream()); } #endif diff --git a/src/test/cpp/helpers/optionconvertertestcase.cpp b/src/test/cpp/helpers/optionconvertertestcase.cpp index 79bd104de..d3c128a89 100644 --- a/src/test/cpp/helpers/optionconvertertestcase.cpp +++ b/src/test/cpp/helpers/optionconvertertestcase.cpp @@ -30,9 +30,9 @@ #include -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; -using namespace LOG4CXX_NS::spi; +using namespace log4cxx; +using namespace log4cxx::helpers; +using namespace log4cxx::spi; #define MAX 1000 diff --git a/src/test/cpp/helpers/propertiestestcase.cpp b/src/test/cpp/helpers/propertiestestcase.cpp index 25abb206a..315b6c8e3 100644 --- a/src/test/cpp/helpers/propertiestestcase.cpp +++ b/src/test/cpp/helpers/propertiestestcase.cpp @@ -20,8 +20,8 @@ #include "../insertwide.h" #include "../logunit.h" -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; +using namespace log4cxx; +using namespace log4cxx::helpers; LOGUNIT_CLASS(PropertiesTestCase) diff --git a/src/test/cpp/helpers/relativetimedateformattestcase.cpp b/src/test/cpp/helpers/relativetimedateformattestcase.cpp index fa4289851..a28ebcec8 100644 --- a/src/test/cpp/helpers/relativetimedateformattestcase.cpp +++ b/src/test/cpp/helpers/relativetimedateformattestcase.cpp @@ -26,9 +26,9 @@ -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; -using namespace LOG4CXX_NS::spi; +using namespace log4cxx; +using namespace log4cxx::helpers; +using namespace log4cxx::spi; /** @@ -62,7 +62,7 @@ LOGUNIT_CLASS(RelativeTimeDateFormatTestCase) formatter.format(actual, jan2, p); - log4cxx_time_t elapsed = LOG4CXX_NS::helpers::StringHelper::toInt64(actual); + log4cxx_time_t elapsed = log4cxx::helpers::StringHelper::toInt64(actual); LOGUNIT_ASSERT(preStartTime + elapsed * 1000 > jan2 - 2000); diff --git a/src/test/cpp/helpers/stringhelpertestcase.cpp b/src/test/cpp/helpers/stringhelpertestcase.cpp index 76d61eec4..aba933e35 100644 --- a/src/test/cpp/helpers/stringhelpertestcase.cpp +++ b/src/test/cpp/helpers/stringhelpertestcase.cpp @@ -21,8 +21,8 @@ #include "../logunit.h" -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; +using namespace log4cxx; +using namespace log4cxx::helpers; /** Unit test for StringHelper. diff --git a/src/test/cpp/helpers/stringtokenizertestcase.cpp b/src/test/cpp/helpers/stringtokenizertestcase.cpp index 55ada0203..b0b9bf427 100644 --- a/src/test/cpp/helpers/stringtokenizertestcase.cpp +++ b/src/test/cpp/helpers/stringtokenizertestcase.cpp @@ -20,8 +20,8 @@ #include "../insertwide.h" -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; +using namespace log4cxx; +using namespace log4cxx::helpers; LOGUNIT_CLASS(StringTokenizerTestCase) { diff --git a/src/test/cpp/helpers/syslogwritertest.cpp b/src/test/cpp/helpers/syslogwritertest.cpp index 03e14c921..e46543a3a 100644 --- a/src/test/cpp/helpers/syslogwritertest.cpp +++ b/src/test/cpp/helpers/syslogwritertest.cpp @@ -18,8 +18,8 @@ #include "../logunit.h" #include -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; +using namespace log4cxx; +using namespace log4cxx::helpers; LOGUNIT_CLASS(SyslogWriterTest) diff --git a/src/test/cpp/helpers/threadutilitytestcase.cpp b/src/test/cpp/helpers/threadutilitytestcase.cpp index dc323288b..effe1edaa 100644 --- a/src/test/cpp/helpers/threadutilitytestcase.cpp +++ b/src/test/cpp/helpers/threadutilitytestcase.cpp @@ -23,8 +23,8 @@ #include #include -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; +using namespace log4cxx; +using namespace log4cxx::helpers; LOGUNIT_CLASS(ThreadUtilityTest) diff --git a/src/test/cpp/helpers/timezonetestcase.cpp b/src/test/cpp/helpers/timezonetestcase.cpp index 274c9653e..c15200a0a 100644 --- a/src/test/cpp/helpers/timezonetestcase.cpp +++ b/src/test/cpp/helpers/timezonetestcase.cpp @@ -20,8 +20,8 @@ #include "../logunit.h" #include -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; +using namespace log4cxx; +using namespace log4cxx::helpers; //Define INT64_C for compilers that don't have it #if (!defined(INT64_C)) diff --git a/src/test/cpp/helpers/transcodertestcase.cpp b/src/test/cpp/helpers/transcodertestcase.cpp index 9e5085a04..23a5caa52 100644 --- a/src/test/cpp/helpers/transcodertestcase.cpp +++ b/src/test/cpp/helpers/transcodertestcase.cpp @@ -23,8 +23,8 @@ #include #endif -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; +using namespace log4cxx; +using namespace log4cxx::helpers; LOGUNIT_CLASS(TranscoderTestCase) @@ -193,7 +193,7 @@ LOGUNIT_CLASS(TranscoderTestCase) Transcoder::encode(greeting, encoded); std::wstring expected; - expected.push_back( LOG4CXX_NS::helpers::Transcoder::LOSSCHAR ); + expected.push_back( log4cxx::helpers::Transcoder::LOSSCHAR ); LOGUNIT_ASSERT_EQUAL(encoded, expected ); } #endif diff --git a/src/test/cpp/hexdumptestcase.cpp b/src/test/cpp/hexdumptestcase.cpp index 234b18f07..66624c23d 100644 --- a/src/test/cpp/hexdumptestcase.cpp +++ b/src/test/cpp/hexdumptestcase.cpp @@ -19,7 +19,7 @@ #include #include -using namespace LOG4CXX_NS; +using namespace log4cxx; LOGUNIT_CLASS(HexdumpTestCase) { @@ -48,7 +48,7 @@ LOGUNIT_CLASS(HexdumpTestCase) LogString expectedOutput = LOG4CXX_STR("00000000 74 65 73 74 31 |test1|"); - LogString dumped = LOG4CXX_NS::hexdump(test1_str, sizeof(test1_str)); + LogString dumped = log4cxx::hexdump(test1_str, sizeof(test1_str)); LOGUNIT_ASSERT_EQUAL(expectedOutput, dumped); } @@ -68,7 +68,7 @@ LOGUNIT_CLASS(HexdumpTestCase) LOG4CXX_STR("00000020 68 65 20 6c 61 7a 79 20 64 6f 67 |he lazy dog|"); // Hexdump up until the NULL char - LogString dumped = LOG4CXX_NS::hexdump(quick_brown_fox, sizeof(quick_brown_fox)); + LogString dumped = log4cxx::hexdump(quick_brown_fox, sizeof(quick_brown_fox)); LOGUNIT_ASSERT_EQUAL(expectedOutput, dumped); } @@ -82,7 +82,7 @@ LOGUNIT_CLASS(HexdumpTestCase) LOG4CXX_STR("00000000 74 65 73 74 31 |test1|") LOG4CXX_EOL; - LogString dumped = LOG4CXX_NS::hexdump(test1_str, sizeof(test1_str), HexdumpFlags::AddNewline); + LogString dumped = log4cxx::hexdump(test1_str, sizeof(test1_str), HexdumpFlags::AddNewline); LOGUNIT_ASSERT_EQUAL(expectedOutput, dumped); } @@ -96,7 +96,7 @@ LOGUNIT_CLASS(HexdumpTestCase) LOG4CXX_STR("00000000 74 65 73 74 31 |test1|") LOG4CXX_EOL; - LogString dumped = LOG4CXX_NS::hexdump(test1_str, sizeof(test1_str), HexdumpFlags::AddStartingNewline | HexdumpFlags::AddEndingNewline); + LogString dumped = log4cxx::hexdump(test1_str, sizeof(test1_str), HexdumpFlags::AddStartingNewline | HexdumpFlags::AddEndingNewline); LOGUNIT_ASSERT_EQUAL(expectedOutput, dumped); } diff --git a/src/test/cpp/hierarchytest.cpp b/src/test/cpp/hierarchytest.cpp index 773dcc1e1..39bc11826 100644 --- a/src/test/cpp/hierarchytest.cpp +++ b/src/test/cpp/hierarchytest.cpp @@ -21,7 +21,7 @@ #include "logunit.h" #include "insertwide.h" -using namespace LOG4CXX_NS; +using namespace log4cxx; /** * Tests hierarchy. diff --git a/src/test/cpp/hierarchythresholdtestcase.cpp b/src/test/cpp/hierarchythresholdtestcase.cpp index 4e916c57a..de836f091 100644 --- a/src/test/cpp/hierarchythresholdtestcase.cpp +++ b/src/test/cpp/hierarchythresholdtestcase.cpp @@ -23,7 +23,7 @@ #include "testchar.h" #include -using namespace LOG4CXX_NS; +using namespace log4cxx; /** Test the configuration of the hierarchy-wide threshold. diff --git a/src/test/cpp/insertwide.h b/src/test/cpp/insertwide.h index 2719362ca..613a55f04 100644 --- a/src/test/cpp/insertwide.h +++ b/src/test/cpp/insertwide.h @@ -28,7 +28,7 @@ std::ostream& operator<<(std::ostream& os, #if LOG4CXX_LOGCHAR_IS_UNICHAR || LOG4CXX_UNICHAR_API std::ostream& operator<<(std::ostream& os, - const std::basic_string& str); + const std::basic_string& str); #endif #endif diff --git a/src/test/cpp/jsonlayouttest.cpp b/src/test/cpp/jsonlayouttest.cpp index 9ce9356e7..fda39fca2 100644 --- a/src/test/cpp/jsonlayouttest.cpp +++ b/src/test/cpp/jsonlayouttest.cpp @@ -25,9 +25,9 @@ #include -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; -using namespace LOG4CXX_NS::spi; +using namespace log4cxx; +using namespace log4cxx::helpers; +using namespace log4cxx::spi; #if defined(__LOG4CXX_FUNC__) #undef __LOG4CXX_FUNC__ diff --git a/src/test/cpp/l7dtestcase.cpp b/src/test/cpp/l7dtestcase.cpp index 8ea35aee4..7c70b74ad 100644 --- a/src/test/cpp/l7dtestcase.cpp +++ b/src/test/cpp/l7dtestcase.cpp @@ -32,8 +32,8 @@ typedef std::basic_ostringstream StringBuffer; -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; +using namespace log4cxx; +using namespace log4cxx::helpers; LOGUNIT_CLASS(L7dTestCase) { @@ -79,7 +79,7 @@ LOGUNIT_CLASS(L7dTestCase) { PropertyConfigurator::configure(LOG4CXX_FILE("input/l7d1.properties")); - LOG4CXX_NS::helpers::Pool pool; + log4cxx::helpers::Pool pool; for (int i = 0; i < 3; i++) { diff --git a/src/test/cpp/leveltestcase.cpp b/src/test/cpp/leveltestcase.cpp index 740dee6a6..176697e6d 100644 --- a/src/test/cpp/leveltestcase.cpp +++ b/src/test/cpp/leveltestcase.cpp @@ -25,7 +25,7 @@ #include #endif -using namespace LOG4CXX_NS; +using namespace log4cxx; LOGUNIT_CLASS(LevelTestCase) { @@ -116,7 +116,7 @@ LOGUNIT_CLASS(LevelTestCase) */ void testUniCharStringToTrace() { - const LOG4CXX_NS::UniChar name[] = { 'T', 'R', 'A', 'C', 'E', 0 }; + const log4cxx::UniChar name[] = { 'T', 'R', 'A', 'C', 'E', 0 }; LevelPtr trace(Level::toLevel(name)); LOGUNIT_ASSERT(trace->toString() == LOG4CXX_STR("TRACE")); } diff --git a/src/test/cpp/locationdisabledtest.cpp b/src/test/cpp/locationdisabledtest.cpp index 99f7e32f2..fa682f616 100644 --- a/src/test/cpp/locationdisabledtest.cpp +++ b/src/test/cpp/locationdisabledtest.cpp @@ -22,8 +22,8 @@ #include "logunit.h" #include "util/compare.h" -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; +using namespace log4cxx; +using namespace log4cxx::helpers; LOGUNIT_CLASS(LocationDisabledTest) { diff --git a/src/test/cpp/locationtest.cpp b/src/test/cpp/locationtest.cpp index 880577196..aa98a63d0 100644 --- a/src/test/cpp/locationtest.cpp +++ b/src/test/cpp/locationtest.cpp @@ -22,8 +22,8 @@ #include "logunit.h" #include "util/compare.h" -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; +using namespace log4cxx; +using namespace log4cxx::helpers; LOGUNIT_CLASS(LocationTest) { diff --git a/src/test/cpp/loggertestcase.cpp b/src/test/cpp/loggertestcase.cpp index bb4ae0986..942b829e0 100644 --- a/src/test/cpp/loggertestcase.cpp +++ b/src/test/cpp/loggertestcase.cpp @@ -31,9 +31,9 @@ #include #include "vectorappender.h" -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::spi; -using namespace LOG4CXX_NS::helpers; +using namespace log4cxx; +using namespace log4cxx::spi; +using namespace log4cxx::helpers; class CountingAppender; typedef std::shared_ptr CountingAppenderPtr; diff --git a/src/test/cpp/logunit.cpp b/src/test/cpp/logunit.cpp index 55255a78b..ce03206a9 100644 --- a/src/test/cpp/logunit.cpp +++ b/src/test/cpp/logunit.cpp @@ -207,8 +207,8 @@ void TestFixture::assertEquals(const std::wstring expected, } #endif #if LOG4CXX_LOGCHAR_IS_UNICHAR || LOG4CXX_UNICHAR_API -void TestFixture::assertEquals(const std::basic_string expected, - const std::basic_string actual, +void TestFixture::assertEquals(const std::basic_string expected, + const std::basic_string actual, const char* expectedExpr, const char* actualExpr, int lineno) diff --git a/src/test/cpp/logunit.h b/src/test/cpp/logunit.h index 19b13e094..cdd7ac66b 100644 --- a/src/test/cpp/logunit.h +++ b/src/test/cpp/logunit.h @@ -78,8 +78,8 @@ class TestFixture int lineno); #endif #if LOG4CXX_LOGCHAR_IS_UNICHAR || LOG4CXX_UNICHAR_API - void assertEquals(const std::basic_string expected, - const std::basic_string actual, + void assertEquals(const std::basic_string expected, + const std::basic_string actual, const char* expectedExpr, const char* actualExpr, int lineno); #endif diff --git a/src/test/cpp/mdctestcase.cpp b/src/test/cpp/mdctestcase.cpp index f9d516ed7..06f4f3acc 100644 --- a/src/test/cpp/mdctestcase.cpp +++ b/src/test/cpp/mdctestcase.cpp @@ -26,7 +26,7 @@ -using namespace LOG4CXX_NS; +using namespace log4cxx; LOGUNIT_CLASS(MDCTestCase) { diff --git a/src/test/cpp/minimumtestcase.cpp b/src/test/cpp/minimumtestcase.cpp index 89a56208a..aa23221f3 100644 --- a/src/test/cpp/minimumtestcase.cpp +++ b/src/test/cpp/minimumtestcase.cpp @@ -35,8 +35,8 @@ #include #include -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; +using namespace log4cxx; +using namespace log4cxx::helpers; LOGUNIT_CLASS(MinimumTestCase) { diff --git a/src/test/cpp/multithreadtest.cpp b/src/test/cpp/multithreadtest.cpp index f41d63364..be52a8f23 100644 --- a/src/test/cpp/multithreadtest.cpp +++ b/src/test/cpp/multithreadtest.cpp @@ -27,7 +27,7 @@ #include #include -using namespace LOG4CXX_NS; +using namespace log4cxx; class MyAppender : public FileAppender { diff --git a/src/test/cpp/ndctestcase.cpp b/src/test/cpp/ndctestcase.cpp index 06f4db75f..ec96220a5 100644 --- a/src/test/cpp/ndctestcase.cpp +++ b/src/test/cpp/ndctestcase.cpp @@ -26,7 +26,7 @@ -using namespace LOG4CXX_NS; +using namespace log4cxx; LOGUNIT_CLASS(NDCTestCase) { diff --git a/src/test/cpp/net/smtpappendertestcase.cpp b/src/test/cpp/net/smtpappendertestcase.cpp index a21715eee..c67e631c9 100644 --- a/src/test/cpp/net/smtpappendertestcase.cpp +++ b/src/test/cpp/net/smtpappendertestcase.cpp @@ -54,9 +54,9 @@ class MockTriggeringEventEvaluator : } } -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; -using namespace LOG4CXX_NS::net; +using namespace log4cxx; +using namespace log4cxx::helpers; +using namespace log4cxx::net; IMPLEMENT_LOG4CXX_OBJECT(MockTriggeringEventEvaluator) @@ -82,7 +82,7 @@ class SMTPAppenderTestCase : public AppenderSkeletonTestCase AppenderSkeleton* createAppenderSkeleton() const { - return new LOG4CXX_NS::net::SMTPAppender(); + return new log4cxx::net::SMTPAppender(); } void setUp() @@ -100,7 +100,7 @@ class SMTPAppenderTestCase : public AppenderSkeletonTestCase void testTrigger() { xml::DOMConfigurator::configure("input/xml/smtpAppender1.xml"); - auto appender = LOG4CXX_NS::cast(Logger::getRootLogger()->getAppender(LOG4CXX_STR("A1"))); + auto appender = log4cxx::cast(Logger::getRootLogger()->getAppender(LOG4CXX_STR("A1"))); LOGUNIT_ASSERT(appender); auto evaluator = appender->getEvaluator(); LOGUNIT_ASSERT(evaluator); diff --git a/src/test/cpp/net/socketappendertestcase.cpp b/src/test/cpp/net/socketappendertestcase.cpp index b77a60acc..0a462cb65 100644 --- a/src/test/cpp/net/socketappendertestcase.cpp +++ b/src/test/cpp/net/socketappendertestcase.cpp @@ -18,8 +18,8 @@ #include "../appenderskeletontestcase.h" #include "apr.h" -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; +using namespace log4cxx; +using namespace log4cxx::helpers; #if APR_HAS_THREADS /** @@ -51,25 +51,25 @@ class SocketAppenderTestCase : public AppenderSkeletonTestCase AppenderSkeleton* createAppenderSkeleton() const { - return new LOG4CXX_NS::net::SocketAppender(); + return new log4cxx::net::SocketAppender(); } void testInvalidHost(){ -// LOG4CXX_NS::net::SocketAppenderPtr appender = std::make_shared(); -// LOG4CXX_NS::PatternLayoutPtr layout = std::make_shared(LOG4CXX_STR("%m%n")); +// log4cxx::net::SocketAppenderPtr appender = std::make_shared(); +// log4cxx::PatternLayoutPtr layout = std::make_shared(LOG4CXX_STR("%m%n")); -// LOG4CXX_NS::helpers::ServerSocket serverSocket(4445); +// log4cxx::helpers::ServerSocket serverSocket(4445); // appender->setLayout(layout); // appender->setRemoteHost(LOG4CXX_STR("localhost")); // appender->setReconnectionDelay(1); // appender->setPort(4445); -// LOG4CXX_NS::helpers::Pool pool; +// log4cxx::helpers::Pool pool; // appender->activateOptions(pool); // BasicConfigurator::configure(appender); -// LOG4CXX_NS::Logger::getRootLogger()->setLevel(LOG4CXX_NS::Level::getAll()); +// log4cxx::Logger::getRootLogger()->setLevel(log4cxx::Level::getAll()); // std::thread th1( [](){ // for( int x = 0; x < 3000; x++ ){ diff --git a/src/test/cpp/net/socketserverstarter.cpp b/src/test/cpp/net/socketserverstarter.cpp index d2e3f7669..923459f3b 100644 --- a/src/test/cpp/net/socketserverstarter.cpp +++ b/src/test/cpp/net/socketserverstarter.cpp @@ -25,7 +25,7 @@ #include #include -using namespace LOG4CXX_NS; +using namespace log4cxx; LOGUNIT_CLASS(SocketServerStarter) { diff --git a/src/test/cpp/net/syslogappendertestcase.cpp b/src/test/cpp/net/syslogappendertestcase.cpp index 8c1dd9e23..8470548f9 100644 --- a/src/test/cpp/net/syslogappendertestcase.cpp +++ b/src/test/cpp/net/syslogappendertestcase.cpp @@ -19,8 +19,8 @@ #include #include "../appenderskeletontestcase.h" -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; +using namespace log4cxx; +using namespace log4cxx::helpers; /** Unit tests of log4cxx::SyslogAppender @@ -41,7 +41,7 @@ class SyslogAppenderTestCase : public AppenderSkeletonTestCase AppenderSkeleton* createAppenderSkeleton() const { - return new LOG4CXX_NS::net::SyslogAppender(); + return new log4cxx::net::SyslogAppender(); } }; diff --git a/src/test/cpp/net/telnetappendertestcase.cpp b/src/test/cpp/net/telnetappendertestcase.cpp index feb3161ea..7482f959b 100644 --- a/src/test/cpp/net/telnetappendertestcase.cpp +++ b/src/test/cpp/net/telnetappendertestcase.cpp @@ -21,9 +21,9 @@ #include #include -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; -using namespace LOG4CXX_NS::net; +using namespace log4cxx; +using namespace log4cxx::helpers; +using namespace log4cxx::net; #if APR_HAS_THREADS /** @@ -56,7 +56,7 @@ class TelnetAppenderTestCase : public AppenderSkeletonTestCase AppenderSkeleton* createAppenderSkeleton() const { - return new LOG4CXX_NS::net::TelnetAppender(); + return new log4cxx::net::TelnetAppender(); } void testActivateClose() diff --git a/src/test/cpp/net/xmlsocketappendertestcase.cpp b/src/test/cpp/net/xmlsocketappendertestcase.cpp index d307f6874..79445bec0 100644 --- a/src/test/cpp/net/xmlsocketappendertestcase.cpp +++ b/src/test/cpp/net/xmlsocketappendertestcase.cpp @@ -20,8 +20,8 @@ #include "../appenderskeletontestcase.h" #include "apr.h" -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; +using namespace log4cxx; +using namespace log4cxx::helpers; #if APR_HAS_THREADS /** @@ -44,7 +44,7 @@ class XMLSocketAppenderTestCase : public AppenderSkeletonTestCase AppenderSkeleton* createAppenderSkeleton() const { - return new LOG4CXX_NS::net::XMLSocketAppender(); + return new log4cxx::net::XMLSocketAppender(); } void test_fluent_bit() diff --git a/src/test/cpp/nt/nteventlogappendertestcase.cpp b/src/test/cpp/nt/nteventlogappendertestcase.cpp index cf2d1b18e..b4b82115c 100644 --- a/src/test/cpp/nt/nteventlogappendertestcase.cpp +++ b/src/test/cpp/nt/nteventlogappendertestcase.cpp @@ -26,10 +26,10 @@ #include "../logunit.h" #include -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; -using namespace LOG4CXX_NS::nt; -using namespace LOG4CXX_NS::spi; +using namespace log4cxx; +using namespace log4cxx::helpers; +using namespace log4cxx::nt; +using namespace log4cxx::spi; /** Unit tests of log4cxx::nt::NTEventLogAppender @@ -51,7 +51,7 @@ class NTEventLogAppenderTestCase : public AppenderSkeletonTestCase AppenderSkeleton* createAppenderSkeleton() const { - return new LOG4CXX_NS::nt::NTEventLogAppender(); + return new log4cxx::nt::NTEventLogAppender(); } void testHelloWorld() diff --git a/src/test/cpp/pattern/colorstartpatternconvertertest.cpp b/src/test/cpp/pattern/colorstartpatternconvertertest.cpp index c8fd6ede3..e2f85e52e 100644 --- a/src/test/cpp/pattern/colorstartpatternconvertertest.cpp +++ b/src/test/cpp/pattern/colorstartpatternconvertertest.cpp @@ -33,10 +33,10 @@ #include -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; -using namespace LOG4CXX_NS::spi; -using namespace LOG4CXX_NS::pattern; +using namespace log4cxx; +using namespace log4cxx::helpers; +using namespace log4cxx::spi; +using namespace log4cxx::pattern; LOGUNIT_CLASS(ColorStartPatternConverterTestCase) diff --git a/src/test/cpp/pattern/num343patternconverter.cpp b/src/test/cpp/pattern/num343patternconverter.cpp index 9309c13a0..18d02cab2 100644 --- a/src/test/cpp/pattern/num343patternconverter.cpp +++ b/src/test/cpp/pattern/num343patternconverter.cpp @@ -18,9 +18,9 @@ #include #include "num343patternconverter.h" -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; -using namespace LOG4CXX_NS::pattern; +using namespace log4cxx; +using namespace log4cxx::helpers; +using namespace log4cxx::pattern; IMPLEMENT_LOG4CXX_OBJECT(Num343PatternConverter) diff --git a/src/test/cpp/pattern/num343patternconverter.h b/src/test/cpp/pattern/num343patternconverter.h index 51080ce88..ae3ee7df4 100644 --- a/src/test/cpp/pattern/num343patternconverter.h +++ b/src/test/cpp/pattern/num343patternconverter.h @@ -33,9 +33,9 @@ class Num343PatternConverter : public LoggingEventPatternConverter protected: void format( - const LOG4CXX_NS::spi::LoggingEventPtr& event, + const log4cxx::spi::LoggingEventPtr& event, LogString& toAppendTo, - LOG4CXX_NS::helpers::Pool& pool) const override; + log4cxx::helpers::Pool& pool) const override; }; } } diff --git a/src/test/cpp/pattern/patternparsertestcase.cpp b/src/test/cpp/pattern/patternparsertestcase.cpp index eb26edef7..b88137e05 100644 --- a/src/test/cpp/pattern/patternparsertestcase.cpp +++ b/src/test/cpp/pattern/patternparsertestcase.cpp @@ -58,10 +58,10 @@ #include -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; -using namespace LOG4CXX_NS::spi; -using namespace LOG4CXX_NS::pattern; +using namespace log4cxx; +using namespace log4cxx::helpers; +using namespace log4cxx::spi; +using namespace log4cxx::pattern; #define RULES_PUT(spec, cls) \ map.insert(PatternMap::value_type(LOG4CXX_STR(spec), (PatternConstructor) cls ::newInstance)) diff --git a/src/test/cpp/patternlayouttest.cpp b/src/test/cpp/patternlayouttest.cpp index f6d0c8fa3..a5723bbff 100644 --- a/src/test/cpp/patternlayouttest.cpp +++ b/src/test/cpp/patternlayouttest.cpp @@ -57,8 +57,8 @@ REGEX_STR("Message [0-9]\\{1,2\\}") #define PAT_MDC_1 REGEX_STR("") -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; +using namespace log4cxx; +using namespace log4cxx::helpers; LOGUNIT_CLASS(PatternLayoutTest) { @@ -473,7 +473,7 @@ LOGUNIT_CLASS(PatternLayoutTest) root->debug(LOG4CXX_TEST_STR("starting mdc pattern test")); layout->setConversionPattern(mdcMsgPattern1); - LOG4CXX_NS::helpers::Pool pool; + log4cxx::helpers::Pool pool; layout->activateOptions(pool); root->debug(LOG4CXX_TEST_STR("empty mdc, no key specified in pattern")); diff --git a/src/test/cpp/propertyconfiguratortest.cpp b/src/test/cpp/propertyconfiguratortest.cpp index 94a6de1f0..b051614eb 100644 --- a/src/test/cpp/propertyconfiguratortest.cpp +++ b/src/test/cpp/propertyconfiguratortest.cpp @@ -21,8 +21,8 @@ #include "vectorappender.h" #include "logunit.h" -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; +using namespace log4cxx; +using namespace log4cxx::helpers; LOGUNIT_CLASS(PropertyConfiguratorTest) @@ -76,7 +76,7 @@ LOGUNIT_CLASS(PropertyConfiguratorTest) props.put(LOG4CXX_STR("log4j.appender.VECTOR1.threshold"), LOG4CXX_STR("WARN")); PropertyConfigurator::configure(props); LoggerPtr root(Logger::getRootLogger()); - VectorAppenderPtr appender = LOG4CXX_NS::cast(root->getAppender(LOG4CXX_STR("VECTOR1"))); + VectorAppenderPtr appender = log4cxx::cast(root->getAppender(LOG4CXX_STR("VECTOR1"))); LOGUNIT_ASSERT_EQUAL((int) Level::WARN_INT, appender->getThreshold()->toInt()); LOG4CXX_INFO(root, "Info message"); LOG4CXX_WARN(root, "Warn message"); diff --git a/src/test/cpp/rolling/filenamepatterntestcase.cpp b/src/test/cpp/rolling/filenamepatterntestcase.cpp index 84331dca0..eb29cbbaa 100644 --- a/src/test/cpp/rolling/filenamepatterntestcase.cpp +++ b/src/test/cpp/rolling/filenamepatterntestcase.cpp @@ -27,9 +27,9 @@ #include "../insertwide.h" #include -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; -using namespace LOG4CXX_NS::pattern; +using namespace log4cxx; +using namespace log4cxx::helpers; +using namespace log4cxx::pattern; /** diff --git a/src/test/cpp/rolling/filterbasedrollingtest.cpp b/src/test/cpp/rolling/filterbasedrollingtest.cpp index 60752cdbb..c1f615b74 100644 --- a/src/test/cpp/rolling/filterbasedrollingtest.cpp +++ b/src/test/cpp/rolling/filterbasedrollingtest.cpp @@ -28,11 +28,11 @@ #include #include -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::rolling; -using namespace LOG4CXX_NS::xml; -using namespace LOG4CXX_NS::filter; -using namespace LOG4CXX_NS::helpers; +using namespace log4cxx; +using namespace log4cxx::rolling; +using namespace log4cxx::xml; +using namespace log4cxx::filter; +using namespace log4cxx::helpers; /** * diff --git a/src/test/cpp/rolling/manualrollingtest.cpp b/src/test/cpp/rolling/manualrollingtest.cpp index 404f9bc6a..9223ece52 100644 --- a/src/test/cpp/rolling/manualrollingtest.cpp +++ b/src/test/cpp/rolling/manualrollingtest.cpp @@ -34,11 +34,11 @@ #include #include -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::xml; -using namespace LOG4CXX_NS::filter; -using namespace LOG4CXX_NS::helpers; -using namespace LOG4CXX_NS::rolling; +using namespace log4cxx; +using namespace log4cxx::xml; +using namespace log4cxx::filter; +using namespace log4cxx::helpers; +using namespace log4cxx::rolling; /** * Tests of explicit manual rolling of RollingFileAppenders. diff --git a/src/test/cpp/rolling/rollingfileappenderpropertiestest.cpp b/src/test/cpp/rolling/rollingfileappenderpropertiestest.cpp index 2de052c4c..7ab102041 100644 --- a/src/test/cpp/rolling/rollingfileappenderpropertiestest.cpp +++ b/src/test/cpp/rolling/rollingfileappenderpropertiestest.cpp @@ -34,11 +34,11 @@ #include -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::xml; -using namespace LOG4CXX_NS::filter; -using namespace LOG4CXX_NS::helpers; -using namespace LOG4CXX_NS::rolling; +using namespace log4cxx; +using namespace log4cxx::xml; +using namespace log4cxx::filter; +using namespace log4cxx::helpers; +using namespace log4cxx::rolling; /** * @@ -216,7 +216,7 @@ LOGUNIT_CLASS(RollingFileAppenderPropertiesTest) void testIsOptionHandler() { auto rfa = std::make_shared(); - LOGUNIT_ASSERT_EQUAL(true, rfa->instanceof(LOG4CXX_NS::spi::OptionHandler::getStaticClass())); + LOGUNIT_ASSERT_EQUAL(true, rfa->instanceof(log4cxx::spi::OptionHandler::getStaticClass())); } void testRollingFromProperties(){ diff --git a/src/test/cpp/rolling/sizebasedrollingtest.cpp b/src/test/cpp/rolling/sizebasedrollingtest.cpp index 4b965330c..ddb0f2d5b 100644 --- a/src/test/cpp/rolling/sizebasedrollingtest.cpp +++ b/src/test/cpp/rolling/sizebasedrollingtest.cpp @@ -35,11 +35,11 @@ #include -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::xml; -using namespace LOG4CXX_NS::filter; -using namespace LOG4CXX_NS::helpers; -using namespace LOG4CXX_NS::rolling; +using namespace log4cxx; +using namespace log4cxx::xml; +using namespace log4cxx::filter; +using namespace log4cxx::helpers; +using namespace log4cxx::rolling; /** * diff --git a/src/test/cpp/rolling/timebasedrollingtest.cpp b/src/test/cpp/rolling/timebasedrollingtest.cpp index 42fe1cf1b..5b1e0826b 100644 --- a/src/test/cpp/rolling/timebasedrollingtest.cpp +++ b/src/test/cpp/rolling/timebasedrollingtest.cpp @@ -49,9 +49,9 @@ #define DIR_PRE_OUTPUT "output/rolling/tbr-" #define DIR_PRE_WITNESS "witness/rolling/tbr-" -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; -using namespace LOG4CXX_NS::rolling; +using namespace log4cxx; +using namespace log4cxx::helpers; +using namespace log4cxx::rolling; /** * A rather exhaustive set of tests. Tests include leaving the ActiveFileName @@ -185,7 +185,7 @@ LOGUNIT_CLASS(TimeBasedRollingTest) float waitFactor = 0.5) { #undef LOG4CXX_LOCATION -#define LOG4CXX_LOCATION ::LOG4CXX_NS::spi::LocationInfo( \ +#define LOG4CXX_LOCATION ::log4cxx::spi::LocationInfo( \ __FILE__, \ __FILE__, \ srcFunc.c_str(), \ @@ -201,7 +201,7 @@ LOGUNIT_CLASS(TimeBasedRollingTest) } #undef LOG4CXX_LOCATION -#define LOG4CXX_LOCATION ::LOG4CXX_NS::spi::LocationInfo( \ +#define LOG4CXX_LOCATION ::log4cxx::spi::LocationInfo( \ __FILE__, \ __FILE__, \ __LOG4CXX_FUNC__, \ @@ -357,7 +357,7 @@ LOGUNIT_CLASS(TimeBasedRollingTest) */ void setUpCurrTime() { - //current_time = LOG4CXX_NS::helpers::Date::currentTime(); // Start at "about" now. + //current_time = log4cxx::helpers::Date::currentTime(); // Start at "about" now. //current_time -= (current_time % APR_USEC_PER_SEC); // Go to the top of the second //current_time++; // Need to not be at the top of a second for rollover logic to work correctly current_time = 1; // Start at about unix epoch diff --git a/src/test/cpp/rollingfileappendertestcase.cpp b/src/test/cpp/rollingfileappendertestcase.cpp index 3952df0ab..f77f116b7 100644 --- a/src/test/cpp/rollingfileappendertestcase.cpp +++ b/src/test/cpp/rollingfileappendertestcase.cpp @@ -18,8 +18,8 @@ #include #include "fileappendertestcase.h" -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; +using namespace log4cxx; +using namespace log4cxx::helpers; /** Unit tests of log4cxx::RollingFileAppender @@ -40,7 +40,7 @@ class RollingFileAppenderTestCase : public FileAppenderAbstractTestCase FileAppender* createFileAppender() const { - return new LOG4CXX_NS::rolling::RollingFileAppender(); + return new log4cxx::rolling::RollingFileAppender(); } }; diff --git a/src/test/cpp/streamtestcase.cpp b/src/test/cpp/streamtestcase.cpp index 4027a4112..c90efd90f 100644 --- a/src/test/cpp/streamtestcase.cpp +++ b/src/test/cpp/streamtestcase.cpp @@ -36,8 +36,8 @@ #include #endif -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; +using namespace log4cxx; +using namespace log4cxx::helpers; using namespace std; class ExceptionOnInsert @@ -492,7 +492,7 @@ LOGUNIT_CLASS(StreamTestCase) void testUniChar() { LoggerPtr root(Logger::getRootLogger()); - const LOG4CXX_NS::UniChar msg[] = { 'T', 'h', 'i', 's', ' ', 'i', 's', ' ', 'a', ' ', 't', 'e', 's', 't', 0 }; + const log4cxx::UniChar msg[] = { 'T', 'h', 'i', 's', ' ', 'i', 's', ' ', 'a', ' ', 't', 'e', 's', 't', 0 }; LOG4CXX_INFO(root, msg); LOGUNIT_ASSERT_EQUAL((size_t) 1, vectorAppender->getVector().size()); } @@ -500,8 +500,8 @@ LOGUNIT_CLASS(StreamTestCase) void testUniCharAppend() { LoggerPtr root(Logger::getRootLogger()); - const LOG4CXX_NS::UniChar msg1[] = { 'T', 'h', 'i', 's', ' ', 'i', 's', ' ', 'a', ' ', 't', 'e', 's', 't', 0 }; - const LOG4CXX_NS::UniChar msg2[] = { ':', ' ', 'D', 'e', 't', 'a', 'i', 'l', 's', ' ', 't', 'o', ' ', 'f', 'o', 'l', 'l', 'o', 'w', 0 }; + const log4cxx::UniChar msg1[] = { 'T', 'h', 'i', 's', ' ', 'i', 's', ' ', 'a', ' ', 't', 'e', 's', 't', 0 }; + const log4cxx::UniChar msg2[] = { ':', ' ', 'D', 'e', 't', 'a', 'i', 'l', 's', ' ', 't', 'o', ' ', 'f', 'o', 'l', 'l', 'o', 'w', 0 }; LOG4CXX_INFO(root, msg1 << msg2); LOGUNIT_ASSERT_EQUAL((size_t) 1, vectorAppender->getVector().size()); } @@ -509,9 +509,9 @@ LOGUNIT_CLASS(StreamTestCase) void testUniCharWidth() { LoggerPtr root(Logger::getRootLogger()); - const LOG4CXX_NS::UniChar openBracket[] = { '[', 0 }; - const LOG4CXX_NS::UniChar closeBracket[] = { ']', 0 }; - LOG4CXX_INFO(root, openBracket << std::fixed << std::setprecision(2) << std::setw(7) << std::right << std::setfill((LOG4CXX_NS::UniChar)'_') << 10.0 << closeBracket); + const log4cxx::UniChar openBracket[] = { '[', 0 }; + const log4cxx::UniChar closeBracket[] = { ']', 0 }; + LOG4CXX_INFO(root, openBracket << std::fixed << std::setprecision(2) << std::setw(7) << std::right << std::setfill((log4cxx::UniChar)'_') << 10.0 << closeBracket); spi::LoggingEventPtr event(vectorAppender->getVector()[0]); LogString msg(event->getMessage()); LOGUNIT_ASSERT_EQUAL(LogString(LOG4CXX_STR("[__10.00]")), msg); @@ -520,7 +520,7 @@ LOGUNIT_CLASS(StreamTestCase) void testULogStreamSimple() { ulogstream root(Logger::getRootLogger(), Level::getInfo()); - const LOG4CXX_NS::UniChar msg[] = { 'T', 'h', 'i', 's', ' ', 'i', 's', ' ', 'a', ' ', 't', 'e', 's', 't', 0 }; + const log4cxx::UniChar msg[] = { 'T', 'h', 'i', 's', ' ', 'i', 's', ' ', 'a', ' ', 't', 'e', 's', 't', 0 }; root << msg << LOG4CXX_ENDMSG; LOGUNIT_ASSERT_EQUAL((size_t) 1, vectorAppender->getVector().size()); } @@ -528,8 +528,8 @@ LOGUNIT_CLASS(StreamTestCase) void testULogStreamMultiple() { ulogstream root(Logger::getRootLogger(), Level::getInfo()); - const LOG4CXX_NS::UniChar msg1[] = { 'T', 'h', 'i', 's', ' ', 'i', 's', ' ', 'a', ' ', 't', 'e', 's', 't', 0 }; - const LOG4CXX_NS::UniChar msg2[] = { ':', ' ', 'D', 'e', 't', 'a', 'i', 'l', 's', ' ', 't', 'o', ' ', 'f', 'o', 'l', 'l', 'o', 'w', 0 }; + const log4cxx::UniChar msg1[] = { 'T', 'h', 'i', 's', ' ', 'i', 's', ' ', 'a', ' ', 't', 'e', 's', 't', 0 }; + const log4cxx::UniChar msg2[] = { ':', ' ', 'D', 'e', 't', 'a', 'i', 'l', 's', ' ', 't', 'o', ' ', 'f', 'o', 'l', 'l', 'o', 'w', 0 }; root << msg1 << msg2 << LOG4CXX_ENDMSG; LOGUNIT_ASSERT_EQUAL((size_t) 1, vectorAppender->getVector().size()); } @@ -580,21 +580,21 @@ LOGUNIT_CLASS(StreamTestCase) { LoggerPtr root(Logger::getRootLogger()); ulogstream os(root, Level::getInfo()); - const LOG4CXX_NS::UniChar openBracket[] = { '[', 0 }; - const LOG4CXX_NS::UniChar closeBracket[] = { ']', 0 }; + const log4cxx::UniChar openBracket[] = { '[', 0 }; + const log4cxx::UniChar closeBracket[] = { ']', 0 }; os << openBracket << std::fixed << std::setprecision(2) << std::setw(7) << std::right - << std::setfill((LOG4CXX_NS::UniChar) '_') << 10.0 << closeBracket << LOG4CXX_ENDMSG; + << std::setfill((log4cxx::UniChar) '_') << 10.0 << closeBracket << LOG4CXX_ENDMSG; LOGUNIT_ASSERT_EQUAL((size_t) 1, vectorAppender->getVector().size()); spi::LoggingEventPtr event(vectorAppender->getVector()[0]); LogString msg(event->getMessage()); LOGUNIT_ASSERT_EQUAL(LogString(LOG4CXX_STR("[__10.00]")), msg); } - void ureport(std::basic_ostream& os) + void ureport(std::basic_ostream& os) { - const LOG4CXX_NS::UniChar msg1[] = { 'T', 'h', 'i', 's', ' ', 'j', 'u', 's', 't', ' ', 'i', 'n', ':', ' ', '\n', 0 }; - const LOG4CXX_NS::UniChar msg2[] = { 'U', 's', 'e', ' ', 'l', 'o', 'g', 's', 't', 'r', 'e', 'a', 'm', '\n', 0 }; + const log4cxx::UniChar msg1[] = { 'T', 'h', 'i', 's', ' ', 'j', 'u', 's', 't', ' ', 'i', 'n', ':', ' ', '\n', 0 }; + const log4cxx::UniChar msg2[] = { 'U', 's', 'e', ' ', 'l', 'o', 'g', 's', 't', 'r', 'e', 'a', 'm', '\n', 0 }; os << msg1; os << msg2; } @@ -692,8 +692,8 @@ using namespace foo; namespace { -LOG4CXX_NS::LoggerPtr logger(LOG4CXX_NS::Logger::getLogger("foo")); -LOG4CXX_NS::logstream lout(logger, LOG4CXX_NS::Level::getDebug()); +log4cxx::LoggerPtr logger(log4cxx::Logger::getLogger("foo")); +log4cxx::logstream lout(logger, log4cxx::Level::getDebug()); } void Bar::fn() diff --git a/src/test/cpp/throughput/log4cxxbenchmarker.cpp b/src/test/cpp/throughput/log4cxxbenchmarker.cpp index ed4610a61..da80abcc7 100644 --- a/src/test/cpp/throughput/log4cxxbenchmarker.cpp +++ b/src/test/cpp/throughput/log4cxxbenchmarker.cpp @@ -22,10 +22,10 @@ #include -namespace LOG4CXX_NS +namespace log4cxx { -class NullWriterAppender : public LOG4CXX_NS::AppenderSkeleton +class NullWriterAppender : public log4cxx::AppenderSkeleton { public: DECLARE_LOG4CXX_OBJECT(NullWriterAppender) @@ -43,12 +43,12 @@ class NullWriterAppender : public LOG4CXX_NS::AppenderSkeleton return true; } - void append(const spi::LoggingEventPtr& event, LOG4CXX_NS::helpers::Pool& p) override + void append(const spi::LoggingEventPtr& event, log4cxx::helpers::Pool& p) override { // This gets called whenever there is a valid event for our appender. } - void activateOptions(LOG4CXX_NS::helpers::Pool& /* pool */) override + void activateOptions(log4cxx::helpers::Pool& /* pool */) override { // Given all of our options, do something useful(e.g. open a file) } @@ -69,18 +69,18 @@ log4cxxbenchmarker::log4cxxbenchmarker() } -LOG4CXX_NS::LoggerPtr log4cxxbenchmarker::resetLogger() +log4cxx::LoggerPtr log4cxxbenchmarker::resetLogger() { - LOG4CXX_NS::LoggerPtr logger = LOG4CXX_NS::Logger::getLogger( LOG4CXX_STR("bench_logger") ); + log4cxx::LoggerPtr logger = log4cxx::Logger::getLogger( LOG4CXX_STR("bench_logger") ); logger->removeAllAppenders(); logger->setAdditivity( false ); - logger->setLevel( LOG4CXX_NS::Level::getInfo() ); + logger->setLevel( log4cxx::Level::getInfo() ); - LOG4CXX_NS::PatternLayoutPtr pattern = std::make_shared(); + log4cxx::PatternLayoutPtr pattern = std::make_shared(); pattern->setConversionPattern( LOG4CXX_STR("%m%n") ); - LOG4CXX_NS::NullWriterAppenderPtr nullWriter = std::make_shared(); + log4cxx::NullWriterAppenderPtr nullWriter = std::make_shared(); nullWriter->setLayout( pattern ); logger->addAppender( nullWriter ); @@ -88,18 +88,18 @@ LOG4CXX_NS::LoggerPtr log4cxxbenchmarker::resetLogger() return logger; } -void log4cxxbenchmarker::logWithConversionPattern( const LOG4CXX_NS::LogString& conversionPattern, int howmany ) +void log4cxxbenchmarker::logWithConversionPattern( const log4cxx::LogString& conversionPattern, int howmany ) { - LOG4CXX_NS::LoggerPtr logger = LOG4CXX_NS::Logger::getLogger( LOG4CXX_STR("bench_logger") ); + log4cxx::LoggerPtr logger = log4cxx::Logger::getLogger( LOG4CXX_STR("bench_logger") ); logger->removeAllAppenders(); logger->setAdditivity( false ); - logger->setLevel( LOG4CXX_NS::Level::getInfo() ); + logger->setLevel( log4cxx::Level::getInfo() ); - LOG4CXX_NS::PatternLayoutPtr pattern = std::make_shared(); + log4cxx::PatternLayoutPtr pattern = std::make_shared(); pattern->setConversionPattern( conversionPattern ); - LOG4CXX_NS::NullWriterAppenderPtr nullWriter = std::make_shared(); + log4cxx::NullWriterAppenderPtr nullWriter = std::make_shared(); nullWriter->setLayout( pattern ); logger->addAppender( nullWriter ); @@ -112,7 +112,7 @@ void log4cxxbenchmarker::logWithConversionPattern( const LOG4CXX_NS::LogString& void log4cxxbenchmarker::logWithFMT(int howmany) { - LOG4CXX_NS::LoggerPtr logger = resetLogger(); + log4cxx::LoggerPtr logger = resetLogger(); for ( int x = 0; x < howmany; x++ ) { @@ -120,18 +120,18 @@ void log4cxxbenchmarker::logWithFMT(int howmany) } } -LOG4CXX_NS::LoggerPtr log4cxxbenchmarker::logSetupMultithreaded() +log4cxx::LoggerPtr log4cxxbenchmarker::logSetupMultithreaded() { - LOG4CXX_NS::LoggerPtr logger = LOG4CXX_NS::Logger::getLogger( LOG4CXX_STR("bench_logger") ); + log4cxx::LoggerPtr logger = log4cxx::Logger::getLogger( LOG4CXX_STR("bench_logger") ); logger->removeAllAppenders(); logger->setAdditivity( false ); - logger->setLevel( LOG4CXX_NS::Level::getInfo() ); + logger->setLevel( log4cxx::Level::getInfo() ); - LOG4CXX_NS::PatternLayoutPtr pattern = std::make_shared(); + log4cxx::PatternLayoutPtr pattern = std::make_shared(); pattern->setConversionPattern( LOG4CXX_STR("%m%n") ); - LOG4CXX_NS::NullWriterAppenderPtr nullWriter = std::make_shared(); + log4cxx::NullWriterAppenderPtr nullWriter = std::make_shared(); nullWriter->setLayout( pattern ); logger->addAppender( nullWriter ); @@ -140,7 +140,7 @@ LOG4CXX_NS::LoggerPtr log4cxxbenchmarker::logSetupMultithreaded() void log4cxxbenchmarker::logWithFMTMultithreaded(int howmany) { - LOG4CXX_NS::LoggerPtr logger = LOG4CXX_NS::Logger::getLogger( LOG4CXX_STR("bench_logger") ); + log4cxx::LoggerPtr logger = log4cxx::Logger::getLogger( LOG4CXX_STR("bench_logger") ); for ( int x = 0; x < howmany; x++ ) { @@ -150,7 +150,7 @@ void log4cxxbenchmarker::logWithFMTMultithreaded(int howmany) void log4cxxbenchmarker::logDisabledMultithreaded( int howmany ) { - LOG4CXX_NS::LoggerPtr logger = LOG4CXX_NS::Logger::getLogger( LOG4CXX_STR("bench_logger") ); + log4cxx::LoggerPtr logger = log4cxx::Logger::getLogger( LOG4CXX_STR("bench_logger") ); for ( int x = 0; x < howmany; x++ ) { @@ -160,7 +160,7 @@ void log4cxxbenchmarker::logDisabledMultithreaded( int howmany ) void log4cxxbenchmarker::logStaticString( int howmany ) { - LOG4CXX_NS::LoggerPtr logger = resetLogger(); + log4cxx::LoggerPtr logger = resetLogger(); for ( int x = 0; x < howmany; x++ ) { @@ -170,7 +170,7 @@ void log4cxxbenchmarker::logStaticString( int howmany ) void log4cxxbenchmarker::logStaticStringFMT( int howmany ) { - LOG4CXX_NS::LoggerPtr logger = resetLogger(); + log4cxx::LoggerPtr logger = resetLogger(); for ( int x = 0; x < howmany; x++ ) { @@ -180,7 +180,7 @@ void log4cxxbenchmarker::logStaticStringFMT( int howmany ) void log4cxxbenchmarker::logDisabledDebug( int howmany ) { - LOG4CXX_NS::LoggerPtr logger = resetLogger(); + log4cxx::LoggerPtr logger = resetLogger(); for ( int x = 0; x < howmany; x++ ) { @@ -190,7 +190,7 @@ void log4cxxbenchmarker::logDisabledDebug( int howmany ) void log4cxxbenchmarker::logDisabledTrace( int howmany ) { - LOG4CXX_NS::LoggerPtr logger = resetLogger(); + log4cxx::LoggerPtr logger = resetLogger(); for ( int x = 0; x < howmany; x++ ) { @@ -200,8 +200,8 @@ void log4cxxbenchmarker::logDisabledTrace( int howmany ) void log4cxxbenchmarker::logEnabledDebug( int howmany ) { - LOG4CXX_NS::LoggerPtr logger = resetLogger(); - logger->setLevel( LOG4CXX_NS::Level::getDebug() ); + log4cxx::LoggerPtr logger = resetLogger(); + logger->setLevel( log4cxx::Level::getDebug() ); for ( int x = 0; x < howmany; x++ ) { @@ -211,8 +211,8 @@ void log4cxxbenchmarker::logEnabledDebug( int howmany ) void log4cxxbenchmarker::logEnabledTrace( int howmany ) { - LOG4CXX_NS::LoggerPtr logger = resetLogger(); - logger->setLevel( LOG4CXX_NS::Level::getTrace() ); + log4cxx::LoggerPtr logger = resetLogger(); + logger->setLevel( log4cxx::Level::getTrace() ); for ( int x = 0; x < howmany; x++ ) { diff --git a/src/test/cpp/throughput/log4cxxbenchmarker.h b/src/test/cpp/throughput/log4cxxbenchmarker.h index 9109557b5..790543aac 100644 --- a/src/test/cpp/throughput/log4cxxbenchmarker.h +++ b/src/test/cpp/throughput/log4cxxbenchmarker.h @@ -26,7 +26,7 @@ class log4cxxbenchmarker private: log4cxxbenchmarker(); - static LOG4CXX_NS::LoggerPtr resetLogger(); + static log4cxx::LoggerPtr resetLogger(); public: /** @@ -36,7 +36,7 @@ class log4cxxbenchmarker * * @param conversionPattern The conversion pattern used, as passed to the PatternLayout */ - static void logWithConversionPattern( const LOG4CXX_NS::LogString& conversionPattern, int howmany ); + static void logWithConversionPattern( const log4cxx::LogString& conversionPattern, int howmany ); /** * Log with the LOG4CXX_INFO_FMT macro to see how long it takes. @@ -49,7 +49,7 @@ class log4cxxbenchmarker /** * Reset logger for multithreaded setup. */ - static LOG4CXX_NS::LoggerPtr logSetupMultithreaded(); + static log4cxx::LoggerPtr logSetupMultithreaded(); /** * Log with the LOG4CXX_INFO_FMT macro to see how long it takes(multithreaded). diff --git a/src/test/cpp/throughput/throughput-main.cpp b/src/test/cpp/throughput/throughput-main.cpp index c4b27ca3b..23807563e 100644 --- a/src/test/cpp/throughput/throughput-main.cpp +++ b/src/test/cpp/throughput/throughput-main.cpp @@ -29,9 +29,9 @@ #include #include "log4cxxbenchmarker.h" -using LOG4CXX_NS::LogString; +using log4cxx::LogString; -static LOG4CXX_NS::LoggerPtr console = LOG4CXX_NS::Logger::getLogger( "console" ); +static log4cxx::LoggerPtr console = log4cxx::Logger::getLogger( "console" ); static std::vector results; static std::mutex results_mutex; @@ -155,13 +155,13 @@ int main(int argc, char* argv[]) std::locale::global(std::locale("")); /* set locale for C++ functions */ console->setAdditivity( false ); - LOG4CXX_NS::PatternLayoutPtr pattern( new LOG4CXX_NS::PatternLayout() ); + log4cxx::PatternLayoutPtr pattern( new log4cxx::PatternLayout() ); pattern->setConversionPattern( LOG4CXX_STR("%m%n") ); - LOG4CXX_NS::ConsoleAppenderPtr consoleWriter( new LOG4CXX_NS::ConsoleAppender ); + log4cxx::ConsoleAppenderPtr consoleWriter( new log4cxx::ConsoleAppender ); consoleWriter->setLayout( pattern ); consoleWriter->setTarget( LOG4CXX_STR("System.out") ); - LOG4CXX_NS::helpers::Pool p; + log4cxx::helpers::Pool p; consoleWriter->activateOptions(p); console->addAppender( consoleWriter ); diff --git a/src/test/cpp/util/absolutedateandtimefilter.cpp b/src/test/cpp/util/absolutedateandtimefilter.cpp index 594a80447..d72129e58 100644 --- a/src/test/cpp/util/absolutedateandtimefilter.cpp +++ b/src/test/cpp/util/absolutedateandtimefilter.cpp @@ -17,8 +17,8 @@ #include "absolutedateandtimefilter.h" -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; +using namespace log4cxx; +using namespace log4cxx::helpers; AbsoluteDateAndTimeFilter::AbsoluteDateAndTimeFilter() : Filter(ABSOLUTE_DATE_AND_TIME_PAT, "") {} diff --git a/src/test/cpp/util/absolutetimefilter.cpp b/src/test/cpp/util/absolutetimefilter.cpp index 351981698..87ac0a536 100644 --- a/src/test/cpp/util/absolutetimefilter.cpp +++ b/src/test/cpp/util/absolutetimefilter.cpp @@ -17,8 +17,8 @@ #include "absolutetimefilter.h" -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; +using namespace log4cxx; +using namespace log4cxx::helpers; AbsoluteTimeFilter::AbsoluteTimeFilter() : Filter(ABSOLUTE_TIME_PAT, "") {} diff --git a/src/test/cpp/util/binarycompare.cpp b/src/test/cpp/util/binarycompare.cpp index 4d12e51ed..5752ccbcb 100644 --- a/src/test/cpp/util/binarycompare.cpp +++ b/src/test/cpp/util/binarycompare.cpp @@ -21,9 +21,9 @@ #include #include -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::util; -using namespace LOG4CXX_NS::helpers; +using namespace log4cxx; +using namespace log4cxx::util; +using namespace log4cxx::helpers; void BinaryCompare::compare(const char* filename1, const char* filename2) diff --git a/src/test/cpp/util/compare.cpp b/src/test/cpp/util/compare.cpp index 2a6635e44..d71f5471a 100644 --- a/src/test/cpp/util/compare.cpp +++ b/src/test/cpp/util/compare.cpp @@ -23,8 +23,8 @@ #include #include -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; +using namespace log4cxx; +using namespace log4cxx::helpers; bool Compare::compare(const File& file1, const File& file2) { @@ -101,7 +101,7 @@ bool Compare::compare(const File& file1, const File& file2) void Compare::outputFile(const File& file, const LogString& contents, - LOG4CXX_NS::helpers::Pool& pool) + log4cxx::helpers::Pool& pool) { int lineCounter = 0; emit(LOG4CXX_STR("--------------------------------")); diff --git a/src/test/cpp/util/compare.h b/src/test/cpp/util/compare.h index bdc35af6e..be807c66d 100644 --- a/src/test/cpp/util/compare.h +++ b/src/test/cpp/util/compare.h @@ -35,7 +35,7 @@ class Compare /// Prints file on the console. static void outputFile(const File& file, const LogString& contents, - LOG4CXX_NS::helpers::Pool& pool); + log4cxx::helpers::Pool& pool); static void emit(const LogString& line); static bool getline(LogString& buf, LogString& line); diff --git a/src/test/cpp/util/controlfilter.cpp b/src/test/cpp/util/controlfilter.cpp index 36da5f404..46dd39e16 100644 --- a/src/test/cpp/util/controlfilter.cpp +++ b/src/test/cpp/util/controlfilter.cpp @@ -17,8 +17,8 @@ #include "controlfilter.h" -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; +using namespace log4cxx; +using namespace log4cxx::helpers; ControlFilter::ControlFilter() { diff --git a/src/test/cpp/util/filenamefilter.cpp b/src/test/cpp/util/filenamefilter.cpp index 143a5c807..9963815d7 100644 --- a/src/test/cpp/util/filenamefilter.cpp +++ b/src/test/cpp/util/filenamefilter.cpp @@ -17,8 +17,8 @@ #include "filenamefilter.h" -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; +using namespace log4cxx; +using namespace log4cxx::helpers; FilenameFilter::FilenameFilter(const std::string& actual, const std::string& expected) { diff --git a/src/test/cpp/util/iso8601filter.cpp b/src/test/cpp/util/iso8601filter.cpp index e70ebcf0f..7129d448d 100644 --- a/src/test/cpp/util/iso8601filter.cpp +++ b/src/test/cpp/util/iso8601filter.cpp @@ -17,7 +17,7 @@ #include "iso8601filter.h" -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; +using namespace log4cxx; +using namespace log4cxx::helpers; ISO8601Filter::ISO8601Filter() : Filter(ISO8601_PAT, "") {} diff --git a/src/test/cpp/util/linenumberfilter.cpp b/src/test/cpp/util/linenumberfilter.cpp index 933400bd7..9f3268fe9 100644 --- a/src/test/cpp/util/linenumberfilter.cpp +++ b/src/test/cpp/util/linenumberfilter.cpp @@ -17,8 +17,8 @@ #include "linenumberfilter.h" -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; +using namespace log4cxx; +using namespace log4cxx::helpers; LineNumberFilter::LineNumberFilter() { diff --git a/src/test/cpp/util/relativetimefilter.cpp b/src/test/cpp/util/relativetimefilter.cpp index c829d117d..743dc51f1 100644 --- a/src/test/cpp/util/relativetimefilter.cpp +++ b/src/test/cpp/util/relativetimefilter.cpp @@ -17,8 +17,8 @@ #include "relativetimefilter.h" -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; +using namespace log4cxx; +using namespace log4cxx::helpers; RelativeTimeFilter::RelativeTimeFilter() : Filter(RELATIVE_TIME_PAT, "") {} diff --git a/src/test/cpp/util/threadfilter.cpp b/src/test/cpp/util/threadfilter.cpp index f82d4d380..1c58cdd7e 100644 --- a/src/test/cpp/util/threadfilter.cpp +++ b/src/test/cpp/util/threadfilter.cpp @@ -17,7 +17,7 @@ #include "threadfilter.h" -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; +using namespace log4cxx; +using namespace log4cxx::helpers; ThreadFilter::ThreadFilter() : Filter("\\[[0-9A-Fa-fXx]*]", "\\[main]") {} diff --git a/src/test/cpp/util/transformer.cpp b/src/test/cpp/util/transformer.cpp index 0182542e1..96ed877ba 100644 --- a/src/test/cpp/util/transformer.cpp +++ b/src/test/cpp/util/transformer.cpp @@ -25,8 +25,8 @@ #include #include -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; +using namespace log4cxx; +using namespace log4cxx::helpers; #if !defined(APR_FOPEN_READ) #define APR_FOPEN_READ APR_READ @@ -39,16 +39,16 @@ using namespace LOG4CXX_NS::helpers; void Transformer::transform(const File& in, const File& out, const std::vector& filters) { - LOG4CXX_NS::Filter::PatternList patterns; + log4cxx::Filter::PatternList patterns; for (std::vector::const_iterator iter = filters.begin(); iter != filters.end(); iter++) { - const LOG4CXX_NS::Filter::PatternList& thesePatterns = (*iter)->getPatterns(); + const log4cxx::Filter::PatternList& thesePatterns = (*iter)->getPatterns(); - for (LOG4CXX_NS::Filter::PatternList::const_iterator pattern = thesePatterns.begin(); + for (log4cxx::Filter::PatternList::const_iterator pattern = thesePatterns.begin(); pattern != thesePatterns.end(); pattern++) { @@ -104,7 +104,7 @@ void Transformer::copyFile(const File& in, const File& out) } void Transformer::createSedCommandFile(const std::string& regexName, - const LOG4CXX_NS::Filter::PatternList& patterns, + const log4cxx::Filter::PatternList& patterns, apr_pool_t* pool) { apr_file_t* regexFile; @@ -131,7 +131,7 @@ void Transformer::createSedCommandFile(const std::string& regexName, return ret; }; - for (LOG4CXX_NS::Filter::PatternList::const_iterator iter = patterns.begin(); + for (log4cxx::Filter::PatternList::const_iterator iter = patterns.begin(); iter != patterns.end(); iter++) { @@ -147,7 +147,7 @@ void Transformer::createSedCommandFile(const std::string& regexName, } void Transformer::transform(const File& in, const File& out, - const LOG4CXX_NS::Filter::PatternList& patterns) + const log4cxx::Filter::PatternList& patterns) { // // if no patterns just copy the file diff --git a/src/test/cpp/util/transformer.h b/src/test/cpp/util/transformer.h index 27689411e..e7ac49e52 100644 --- a/src/test/cpp/util/transformer.h +++ b/src/test/cpp/util/transformer.h @@ -42,12 +42,12 @@ class Transformer static void transform(const File& in, const File& out, - const std::vector< LOG4CXX_NS::Filter::PatternReplacement >& patterns); + const std::vector< log4cxx::Filter::PatternReplacement >& patterns); private: static void copyFile(const File& in, const File& out); static void createSedCommandFile(const std::string& regexName, - const LOG4CXX_NS::Filter::PatternList& patterns, + const log4cxx::Filter::PatternList& patterns, apr_pool_t* pool); }; diff --git a/src/test/cpp/util/utilfilter.cpp b/src/test/cpp/util/utilfilter.cpp index 2c98a2633..811e53135 100644 --- a/src/test/cpp/util/utilfilter.cpp +++ b/src/test/cpp/util/utilfilter.cpp @@ -18,8 +18,8 @@ #include "filter.h" #include -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; +using namespace log4cxx; +using namespace log4cxx::helpers; Filter::Filter() {} diff --git a/src/test/cpp/util/xmlfilenamefilter.cpp b/src/test/cpp/util/xmlfilenamefilter.cpp index d39f8e7f3..c31095798 100644 --- a/src/test/cpp/util/xmlfilenamefilter.cpp +++ b/src/test/cpp/util/xmlfilenamefilter.cpp @@ -17,8 +17,8 @@ #include "xmlfilenamefilter.h" -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; +using namespace log4cxx; +using namespace log4cxx::helpers; XMLFilenameFilter::XMLFilenameFilter(const std::string& /*actual*/, const std::string& expected) { diff --git a/src/test/cpp/util/xmllineattributefilter.cpp b/src/test/cpp/util/xmllineattributefilter.cpp index ba0facb37..6f21688d8 100644 --- a/src/test/cpp/util/xmllineattributefilter.cpp +++ b/src/test/cpp/util/xmllineattributefilter.cpp @@ -17,8 +17,8 @@ #include "xmllineattributefilter.h" -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; +using namespace log4cxx; +using namespace log4cxx::helpers; XMLLineAttributeFilter::XMLLineAttributeFilter() { diff --git a/src/test/cpp/util/xmlthreadfilter.cpp b/src/test/cpp/util/xmlthreadfilter.cpp index 492939e93..ec4532f92 100644 --- a/src/test/cpp/util/xmlthreadfilter.cpp +++ b/src/test/cpp/util/xmlthreadfilter.cpp @@ -17,8 +17,8 @@ #include "xmlthreadfilter.h" -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; +using namespace log4cxx; +using namespace log4cxx::helpers; XMLThreadFilter::XMLThreadFilter() : Filter("thread=\\\"[0-9A-Fa-fXx]*", "thread=\\\"main") diff --git a/src/test/cpp/util/xmltimestampfilter.cpp b/src/test/cpp/util/xmltimestampfilter.cpp index b618f4b8f..734cadc4b 100644 --- a/src/test/cpp/util/xmltimestampfilter.cpp +++ b/src/test/cpp/util/xmltimestampfilter.cpp @@ -17,8 +17,8 @@ #include "xmltimestampfilter.h" -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; +using namespace log4cxx; +using namespace log4cxx::helpers; XMLTimestampFilter::XMLTimestampFilter() : Filter("[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]*", "XXX") {} diff --git a/src/test/cpp/varia/errorhandlertestcase.cpp b/src/test/cpp/varia/errorhandlertestcase.cpp index 5c55cf412..4f4007e1f 100644 --- a/src/test/cpp/varia/errorhandlertestcase.cpp +++ b/src/test/cpp/varia/errorhandlertestcase.cpp @@ -28,9 +28,9 @@ #include "../util/linenumberfilter.h" #include -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; -using namespace LOG4CXX_NS::xml; +using namespace log4cxx; +using namespace log4cxx::helpers; +using namespace log4cxx::xml; LOGUNIT_CLASS(ErrorHandlerTestCase) { @@ -72,10 +72,10 @@ LOGUNIT_CLASS(ErrorHandlerTestCase) { DOMConfigurator::configure("input/xml/fallback1.xml"); AppenderPtr appender = root->getAppender(LOG4CXX_STR("PRIMARY")); - FileAppenderPtr primary = LOG4CXX_NS::cast(appender); - LOG4CXX_NS::varia::FallbackErrorHandlerPtr eh; - LOG4CXX_NS::spi::ErrorHandlerPtr errHandle = primary->getErrorHandler(); - eh = LOG4CXX_NS::cast(errHandle); + FileAppenderPtr primary = log4cxx::cast(appender); + log4cxx::varia::FallbackErrorHandlerPtr eh; + log4cxx::spi::ErrorHandlerPtr errHandle = primary->getErrorHandler(); + eh = log4cxx::cast(errHandle); LOGUNIT_ASSERT(eh != 0); common(); @@ -110,10 +110,10 @@ LOGUNIT_CLASS(ErrorHandlerTestCase) { DOMConfigurator::configure("input/xml/fallback2.xml"); AppenderPtr appender = root->getAppender(LOG4CXX_STR("PRIMARY")); - FileAppenderPtr primary = LOG4CXX_NS::cast(appender); - LOG4CXX_NS::varia::FallbackErrorHandlerPtr eh; - LOG4CXX_NS::spi::ErrorHandlerPtr errHandle = primary->getErrorHandler(); - eh = LOG4CXX_NS::cast(errHandle); + FileAppenderPtr primary = log4cxx::cast(appender); + log4cxx::varia::FallbackErrorHandlerPtr eh; + log4cxx::spi::ErrorHandlerPtr errHandle = primary->getErrorHandler(); + eh = log4cxx::cast(errHandle); LOGUNIT_ASSERT(eh != 0); eh->setLogger(logger); common(); diff --git a/src/test/cpp/varia/levelmatchfiltertestcase.cpp b/src/test/cpp/varia/levelmatchfiltertestcase.cpp index 2031ebcba..d4198e501 100644 --- a/src/test/cpp/varia/levelmatchfiltertestcase.cpp +++ b/src/test/cpp/varia/levelmatchfiltertestcase.cpp @@ -32,9 +32,9 @@ #include "../testchar.h" -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; -using namespace LOG4CXX_NS::filter; +using namespace log4cxx; +using namespace log4cxx::helpers; +using namespace log4cxx::filter; LOGUNIT_CLASS(LevelMatchFilterTestCase) { diff --git a/src/test/cpp/varia/levelrangefiltertestcase.cpp b/src/test/cpp/varia/levelrangefiltertestcase.cpp index 13b1e61ce..2c297aa7a 100644 --- a/src/test/cpp/varia/levelrangefiltertestcase.cpp +++ b/src/test/cpp/varia/levelrangefiltertestcase.cpp @@ -30,9 +30,9 @@ #include "../logunit.h" #include -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; -using namespace LOG4CXX_NS::filter; +using namespace log4cxx; +using namespace log4cxx::helpers; +using namespace log4cxx::filter; diff --git a/src/test/cpp/vectorappender.cpp b/src/test/cpp/vectorappender.cpp index 0b310dd9e..13fa5656e 100644 --- a/src/test/cpp/vectorappender.cpp +++ b/src/test/cpp/vectorappender.cpp @@ -18,8 +18,8 @@ #include "vectorappender.h" #include -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; +using namespace log4cxx; +using namespace log4cxx::helpers; IMPLEMENT_LOG4CXX_OBJECT(VectorAppender) diff --git a/src/test/cpp/vectorappender.h b/src/test/cpp/vectorappender.h index bfbd634d7..fe184dea4 100644 --- a/src/test/cpp/vectorappender.h +++ b/src/test/cpp/vectorappender.h @@ -43,7 +43,7 @@ class VectorAppender : public AppenderSkeleton This method is called by the AppenderSkeleton#doAppend method. */ - void append(const spi::LoggingEventPtr& event, LOG4CXX_NS::helpers::Pool& p) override; + void append(const spi::LoggingEventPtr& event, log4cxx::helpers::Pool& p) override; const std::vector& getVector() const { diff --git a/src/test/cpp/writerappendertestcase.cpp b/src/test/cpp/writerappendertestcase.cpp index 2110f74a7..c59361295 100644 --- a/src/test/cpp/writerappendertestcase.cpp +++ b/src/test/cpp/writerappendertestcase.cpp @@ -19,8 +19,8 @@ #include -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; +using namespace log4cxx; +using namespace log4cxx::helpers; AppenderSkeleton* WriterAppenderTestCase::createAppenderSkeleton() const { diff --git a/src/test/cpp/writerappendertestcase.h b/src/test/cpp/writerappendertestcase.h index ec192b484..dde0b14e5 100644 --- a/src/test/cpp/writerappendertestcase.h +++ b/src/test/cpp/writerappendertestcase.h @@ -27,8 +27,8 @@ class WriterAppenderTestCase : public AppenderSkeletonTestCase { public: - LOG4CXX_NS::AppenderSkeleton* createAppenderSkeleton() const; + log4cxx::AppenderSkeleton* createAppenderSkeleton() const; - virtual LOG4CXX_NS::WriterAppender* createWriterAppender() const = 0; + virtual log4cxx::WriterAppender* createWriterAppender() const = 0; }; diff --git a/src/test/cpp/xml/customleveltestcase.cpp b/src/test/cpp/xml/customleveltestcase.cpp index 75c4a0753..d2259a565 100644 --- a/src/test/cpp/xml/customleveltestcase.cpp +++ b/src/test/cpp/xml/customleveltestcase.cpp @@ -32,9 +32,9 @@ #include "xlevel.h" #include "../testchar.h" -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; -using namespace LOG4CXX_NS::xml; +using namespace log4cxx; +using namespace log4cxx::helpers; +using namespace log4cxx::xml; LOGUNIT_CLASS(CustomLevelTestCase) diff --git a/src/test/cpp/xml/domtestcase.cpp b/src/test/cpp/xml/domtestcase.cpp index cc01fb582..e254868b0 100644 --- a/src/test/cpp/xml/domtestcase.cpp +++ b/src/test/cpp/xml/domtestcase.cpp @@ -32,9 +32,9 @@ #include "../testchar.h" #include "log4cxx/helpers/loglog.h" -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; -using namespace LOG4CXX_NS::xml; +using namespace log4cxx; +using namespace log4cxx::helpers; +using namespace log4cxx::xml; #define TEST1_1A_PAT \ "(DEBUG|INFO |WARN |ERROR|FATAL) \\w*\\.\\w* - Message [0-9]" diff --git a/src/test/cpp/xml/xlevel.cpp b/src/test/cpp/xml/xlevel.cpp index 8b20e0503..efe9387ba 100644 --- a/src/test/cpp/xml/xlevel.cpp +++ b/src/test/cpp/xml/xlevel.cpp @@ -18,8 +18,8 @@ #include "xlevel.h" #include -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; +using namespace log4cxx; +using namespace log4cxx::helpers; IMPLEMENT_LOG4CXX_LEVEL(XLevel) diff --git a/src/test/cpp/xml/xmllayouttest.cpp b/src/test/cpp/xml/xmllayouttest.cpp index b376b2216..78f1c1183 100644 --- a/src/test/cpp/xml/xmllayouttest.cpp +++ b/src/test/cpp/xml/xmllayouttest.cpp @@ -39,10 +39,10 @@ #include -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; -using namespace LOG4CXX_NS::xml; -using namespace LOG4CXX_NS::spi; +using namespace log4cxx; +using namespace log4cxx::helpers; +using namespace log4cxx::xml; +using namespace log4cxx::spi; #if defined(__LOG4CXX_FUNC__) #undef __LOG4CXX_FUNC__ diff --git a/src/test/cpp/xml/xmllayouttestcase.cpp b/src/test/cpp/xml/xmllayouttestcase.cpp index d948e5edc..05711daae 100644 --- a/src/test/cpp/xml/xmllayouttestcase.cpp +++ b/src/test/cpp/xml/xmllayouttestcase.cpp @@ -34,9 +34,9 @@ #include -using namespace LOG4CXX_NS; -using namespace LOG4CXX_NS::helpers; -using namespace LOG4CXX_NS::xml; +using namespace log4cxx; +using namespace log4cxx::helpers; +using namespace log4cxx::xml; #if defined(__LOG4CXX_FUNC__) #undef __LOG4CXX_FUNC__