From cdc5c62c7821a0190a3a1423ac28af2989e0f5e9 Mon Sep 17 00:00:00 2001 From: Stephen Webb Date: Fri, 18 Sep 2026 16:19:06 +1000 Subject: [PATCH 1/4] Remove all code supporting ABI 15 --- src/examples/cpp/custom-appender.cpp | 4 - src/main/cpp/action.cpp | 22 -- src/main/cpp/appender.cpp | 8 - src/main/cpp/appenderattachableimpl.cpp | 12 - src/main/cpp/appenderskeleton.cpp | 13 - src/main/cpp/aprinitializer.cpp | 32 -- src/main/cpp/aprserversocket.cpp | 4 - src/main/cpp/asyncappender.cpp | 84 ------ src/main/cpp/asyncbuffer.cpp | 11 - src/main/cpp/bytebuffer.cpp | 31 -- src/main/cpp/cacheddateformat.cpp | 9 - src/main/cpp/charsetencoder.cpp | 34 --- src/main/cpp/class.cpp | 12 - src/main/cpp/consoleappender.cpp | 5 - src/main/cpp/datagrampacket.cpp | 4 - src/main/cpp/dateformat.cpp | 8 - src/main/cpp/datepatternconverter.cpp | 14 - src/main/cpp/dbappender.cpp | 4 - src/main/cpp/defaultloggerfactory.cpp | 14 - src/main/cpp/domconfigurator.cpp | 209 -------------- src/main/cpp/errorhandler.cpp | 2 - src/main/cpp/fallbackerrorhandler.cpp | 18 -- src/main/cpp/file.cpp | 16 - src/main/cpp/fileappender.cpp | 8 - src/main/cpp/filerenameaction.cpp | 9 - src/main/cpp/fixedwindowrollingpolicy.cpp | 6 - src/main/cpp/formattinginfo.cpp | 6 - src/main/cpp/hierarchy.cpp | 25 -- src/main/cpp/jsonlayout.cpp | 7 - src/main/cpp/layout.cpp | 26 -- src/main/cpp/logger.cpp | 19 -- src/main/cpp/loggingevent.cpp | 7 - src/main/cpp/loggingeventpatternconverter.cpp | 8 - src/main/cpp/logmanager.cpp | 7 - .../cpp/multiprocessrollingfileappender.cpp | 12 - src/main/cpp/odbcappender.cpp | 10 - src/main/cpp/onlyonceerrorhandler.cpp | 5 - src/main/cpp/optionhandler.cpp | 9 - src/main/cpp/outputstream.cpp | 18 -- src/main/cpp/patternconverter.cpp | 8 - src/main/cpp/patternparser.cpp | 10 - src/main/cpp/propertyconfigurator.cpp | 38 --- src/main/cpp/propertysetter.cpp | 29 -- src/main/cpp/reader.cpp | 13 - src/main/cpp/rollingfileappender.cpp | 12 - src/main/cpp/rollingpolicy.cpp | 13 - src/main/cpp/rollingpolicybase.cpp | 9 - src/main/cpp/rootlogger.cpp | 6 - src/main/cpp/serversocket.cpp | 5 - src/main/cpp/smtpappender.cpp | 5 - src/main/cpp/socket.cpp | 7 - src/main/cpp/socketappenderskeleton.cpp | 14 - src/main/cpp/stringhelper.cpp | 5 - src/main/cpp/syslogappender.cpp | 5 - src/main/cpp/systemerrwriter.cpp | 11 - src/main/cpp/systemoutwriter.cpp | 11 - src/main/cpp/telnetappender.cpp | 8 - src/main/cpp/threadlocal.cpp | 61 ---- src/main/cpp/transcoder.cpp | 39 --- src/main/cpp/writer.cpp | 18 -- src/main/cpp/writerappender.cpp | 50 ---- src/main/cpp/xmlsocketappender.cpp | 36 --- src/main/include/log4cxx/appender.h | 16 - src/main/include/log4cxx/appenderskeleton.h | 13 - src/main/include/log4cxx/asyncappender.h | 18 -- .../include/log4cxx/config/propertysetter.h | 22 -- src/main/include/log4cxx/db/odbcappender.h | 14 - .../include/log4cxx/defaultloggerfactory.h | 15 - src/main/include/log4cxx/file.h | 39 --- src/main/include/log4cxx/fileappender.h | 6 - .../log4cxx/helpers/appenderattachableimpl.h | 13 - .../include/log4cxx/helpers/aprinitializer.h | 17 -- .../include/log4cxx/helpers/asyncbuffer.h | 9 - src/main/include/log4cxx/helpers/bytebuffer.h | 17 -- .../log4cxx/helpers/cacheddateformat.h | 7 - .../include/log4cxx/helpers/charsetencoder.h | 8 - src/main/include/log4cxx/helpers/class.h | 4 - .../include/log4cxx/helpers/datagrampacket.h | 39 --- src/main/include/log4cxx/helpers/dateformat.h | 20 -- .../log4cxx/helpers/onlyonceerrorhandler.h | 22 -- .../include/log4cxx/helpers/outputstream.h | 24 -- .../log4cxx/helpers/outputstreamwriter.h | 4 - src/main/include/log4cxx/helpers/properties.h | 4 - src/main/include/log4cxx/helpers/reader.h | 25 -- .../include/log4cxx/helpers/serversocket.h | 5 - src/main/include/log4cxx/helpers/socket.h | 15 - .../include/log4cxx/helpers/stringhelper.h | 14 - .../include/log4cxx/helpers/systemerrwriter.h | 4 - .../include/log4cxx/helpers/systemoutwriter.h | 4 - .../include/log4cxx/helpers/threadlocal.h | 70 ----- src/main/include/log4cxx/helpers/transcoder.h | 24 -- src/main/include/log4cxx/helpers/writer.h | 24 -- src/main/include/log4cxx/helpers/xml.h | 16 - src/main/include/log4cxx/hierarchy.h | 25 -- src/main/include/log4cxx/htmllayout.h | 8 - src/main/include/log4cxx/jsonlayout.h | 4 - src/main/include/log4cxx/layout.h | 38 --- src/main/include/log4cxx/logger.h | 35 --- .../log4cxx/net/socketappenderskeleton.h | 36 --- src/main/include/log4cxx/net/syslogappender.h | 8 - .../include/log4cxx/net/xmlsocketappender.h | 26 -- .../log4cxx/pattern/datepatternconverter.h | 5 - .../include/log4cxx/pattern/formattinginfo.h | 11 - .../pattern/loggingeventpatternconverter.h | 14 - .../log4cxx/pattern/patternconverter.h | 12 - .../include/log4cxx/pattern/patternparser.h | 16 - .../include/log4cxx/private/aprserversocket.h | 5 - .../include/log4cxx/private/bytebuffer_priv.h | 3 - .../include/log4cxx/propertyconfigurator.h | 37 --- src/main/include/log4cxx/rolling/action.h | 15 - .../rolling/fixedwindowrollingpolicy.h | 3 - .../rolling/multiprocessrollingfileappender.h | 6 - .../log4cxx/rolling/rollingfileappender.h | 6 - .../include/log4cxx/rolling/rollingpolicy.h | 26 -- .../log4cxx/rolling/rollingpolicybase.h | 9 - .../log4cxx/rolling/timebasedrollingpolicy.h | 5 - .../log4cxx/rolling/triggeringpolicy.h | 5 - src/main/include/log4cxx/simplelayout.h | 8 - .../include/log4cxx/spi/appenderattachable.h | 2 - src/main/include/log4cxx/spi/configurator.h | 6 - .../log4cxx/spi/defaultrepositoryselector.h | 5 - src/main/include/log4cxx/spi/errorhandler.h | 8 - src/main/include/log4cxx/spi/filter.h | 4 - src/main/include/log4cxx/spi/loggerfactory.h | 11 - .../include/log4cxx/spi/loggerrepository.h | 6 - src/main/include/log4cxx/spi/loggingevent.h | 7 - src/main/include/log4cxx/spi/optionhandler.h | 15 - src/main/include/log4cxx/spi/rootlogger.h | 4 - .../log4cxx/varia/fallbackerrorhandler.h | 19 -- src/main/include/log4cxx/writerappender.h | 48 --- .../include/log4cxx/xml/domconfigurator.h | 273 ------------------ src/main/include/log4cxx/xml/xmllayout.h | 9 - src/test/cpp/customlogger/xlogger.cpp | 6 - src/test/cpp/customlogger/xlogger.h | 8 - src/test/cpp/helpers/propertiestestcase.cpp | 4 - src/test/cpp/loggerthresholdtests.cpp | 8 - src/test/cpp/net/socketappendertestcase.cpp | 6 - src/test/cpp/optionhandlertest.cpp | 20 -- 138 files changed, 2532 deletions(-) diff --git a/src/examples/cpp/custom-appender.cpp b/src/examples/cpp/custom-appender.cpp index cd67f1de4..879e16576 100644 --- a/src/examples/cpp/custom-appender.cpp +++ b/src/examples/cpp/custom-appender.cpp @@ -44,11 +44,7 @@ class NullWriterAppender : public AppenderSkeleton { // This gets called whenever there is a valid event for our appender. } -#if LOG4CXX_ABI_VERSION <= 15 - void activateOptions(helpers::Pool& /* pool */) override { -#else void activateOptions() override { -#endif // Given all of our options, do something useful(e.g. open a file) } diff --git a/src/main/cpp/action.cpp b/src/main/cpp/action.cpp index 8a8933a04..4a196edd2 100644 --- a/src/main/cpp/action.cpp +++ b/src/main/cpp/action.cpp @@ -81,30 +81,8 @@ LogString Action::getName() const return m_priv->actionName; } -#if LOG4CXX_ABI_VERSION <= 15 -bool Action::execute() const -{ - helpers::Pool p; - return execute(p); -} - -/** - * Capture exception. - * - * @param ex exception. - */ -void Action::reportException(const std::exception& /* ex */) -{ -} - -void Action::run(helpers::Pool&) -{ - run(); -} -#else bool Action::execute(helpers::Pool&) const { return execute(); } -#endif diff --git a/src/main/cpp/appender.cpp b/src/main/cpp/appender.cpp index 1e5122049..374d42fa1 100644 --- a/src/main/cpp/appender.cpp +++ b/src/main/cpp/appender.cpp @@ -21,15 +21,7 @@ using namespace LOG4CXX_NS; IMPLEMENT_LOG4CXX_OBJECT(Appender) -#if LOG4CXX_ABI_VERSION <= 15 -void Appender::doAppend(const spi::LoggingEventPtr& event) -{ - helpers::Pool p; - doAppend(event, p); -} -#else void Appender::doAppend(const spi::LoggingEventPtr& event, helpers::Pool&) { doAppend(event); } -#endif diff --git a/src/main/cpp/appenderattachableimpl.cpp b/src/main/cpp/appenderattachableimpl.cpp index 8c2c0f4f5..53e8dfa39 100644 --- a/src/main/cpp/appenderattachableimpl.cpp +++ b/src/main/cpp/appenderattachableimpl.cpp @@ -76,12 +76,6 @@ AppenderAttachableImpl::AppenderAttachableImpl() { } -#if LOG4CXX_ABI_VERSION <= 15 -AppenderAttachableImpl::AppenderAttachableImpl(Pool& pool) - : m_priv(std::make_unique()) -{ -} -#endif AppenderAttachableImpl::~AppenderAttachableImpl() { } @@ -112,12 +106,6 @@ int AppenderAttachableImpl::appendLoopOnAppenders(const spi::LoggingEventPtr& ev } return result; } -#if LOG4CXX_ABI_VERSION <= 15 -int AppenderAttachableImpl::appendLoopOnAppenders(const spi::LoggingEventPtr& event, helpers::Pool& p) -{ - return appendLoopOnAppenders(event); -} -#endif AppenderList AppenderAttachableImpl::getAllAppenders() const { diff --git a/src/main/cpp/appenderskeleton.cpp b/src/main/cpp/appenderskeleton.cpp index 7fe568838..716fa6e0d 100644 --- a/src/main/cpp/appenderskeleton.cpp +++ b/src/main/cpp/appenderskeleton.cpp @@ -54,19 +54,6 @@ void AppenderSkeleton::activateOptions( LOG4CXX_ACTIVATE_OPTIONS_FORMAL_PARAMETE { } -#if LOG4CXX_ABI_VERSION <= 15 -void AppenderSkeleton::finalize() -{ - // An appender might be closed then garbage collected. There is no - // point in closing twice. - if (m_priv->closed) - { - return; - } - - close(); -} -#endif void AppenderSkeleton::addFilter(const spi::FilterPtr newFilter) { diff --git a/src/main/cpp/aprinitializer.cpp b/src/main/cpp/aprinitializer.cpp index 36119e2a6..b9fe3052c 100644 --- a/src/main/cpp/aprinitializer.cpp +++ b/src/main/cpp/aprinitializer.cpp @@ -32,9 +32,6 @@ using namespace LOG4CXX_NS::helpers; using namespace LOG4CXX_NS; -#if LOG4CXX_ABI_VERSION <= 15 -bool APRInitializer::isDestructed = false; -#endif using IdentifiedObject = std::pair; @@ -67,12 +64,6 @@ void tlsDestructImpl(void* ptr) } } -#if LOG4CXX_ABI_VERSION <= 15 -extern "C" void tlsDestruct(void* ptr) -{ - tlsDestructImpl(ptr); -} -#endif namespace { @@ -105,20 +96,12 @@ APRInitializer::APRInitializer() : APRInitializer::~APRInitializer() { -#if LOG4CXX_ABI_VERSION <= 15 - isDestructed = true; -#endif #if APR_HAS_THREADS std::lock_guard lock(m_priv->mutex); apr_threadkey_private_delete(m_priv->tlsKey); #endif } -#if LOG4CXX_ABI_VERSION <= 15 -void APRInitializer::unregisterAll() -{ -} -#endif APRInitializer& APRInitializer::getInstance() { @@ -128,12 +111,6 @@ APRInitializer& APRInitializer::getInstance() } -#if LOG4CXX_ABI_VERSION <= 15 -log4cxx_time_t APRInitializer::initialize() -{ - return getInstance().m_priv->startTime; -} -#endif log4cxx_time_t APRInitializer::getStartTime() { @@ -150,15 +127,6 @@ apr_threadkey_t* APRInitializer::getTlsKey() return getInstance().m_priv->tlsKey; } -#if LOG4CXX_ABI_VERSION <= 15 -void APRInitializer::registerCleanup(FileWatchdog* watchdog) -{ -} - -void APRInitializer::unregisterCleanup(FileWatchdog* watchdog) -{ -} -#endif void APRInitializer::addObject(size_t key, const ObjectPtr& pObject) { diff --git a/src/main/cpp/aprserversocket.cpp b/src/main/cpp/aprserversocket.cpp index 29246d881..132f3c255 100644 --- a/src/main/cpp/aprserversocket.cpp +++ b/src/main/cpp/aprserversocket.cpp @@ -37,10 +37,6 @@ struct APRServerSocket::APRServerSocketPriv : public ServerSocketPrivate { apr_pollset_t* pSet{ 0 }; }; -#if LOG4CXX_ABI_VERSION <= 15 -APRServerSocket::APRServerSocket(int port) : - APRServerSocket(port, false, {}) {} -#endif APRServerSocket::APRServerSocket(int port, bool reuseAddress, const LogString& hostname) : ServerSocket(std::make_unique()){ diff --git a/src/main/cpp/asyncappender.cpp b/src/main/cpp/asyncappender.cpp index e640b9aef..31872f7e4 100644 --- a/src/main/cpp/asyncappender.cpp +++ b/src/main/cpp/asyncappender.cpp @@ -35,10 +35,8 @@ using namespace LOG4CXX_NS; using namespace LOG4CXX_NS::helpers; using namespace LOG4CXX_NS::spi; -#if 15 < LOG4CXX_ABI_VERSION namespace { -#endif /** * The default buffer size is set to 128 events. @@ -74,23 +72,10 @@ class DiscardSummary /** Move values from \c src into a new instance. */ DiscardSummary(DiscardSummary&& src); -#if 15 < LOG4CXX_ABI_VERSION /** Copy constructor. */ DiscardSummary(const DiscardSummary&) = delete; /** Assignment operator. */ DiscardSummary& operator=(const DiscardSummary&) = delete; -#else - /** - * Create new instance. - * - * @param event event, may not be null. - */ - DiscardSummary(const LoggingEventPtr& event); - /** Copy constructor. */ - DiscardSummary(const DiscardSummary& src); - /** Assignment operator. */ - DiscardSummary& operator=(const DiscardSummary& src); -#endif /** * Add discarded event to summary. @@ -106,12 +91,6 @@ class DiscardSummary */ LoggingEventPtr createEvent(); -#if LOG4CXX_ABI_VERSION <= 15 - LoggingEventPtr createEvent(Pool&); - static - ::LOG4CXX_NS::spi::LoggingEventPtr createEvent(::LOG4CXX_NS::helpers::Pool& p, - size_t discardedCount); -#endif /** * The number of messages discarded. @@ -121,9 +100,7 @@ class DiscardSummary typedef std::map DiscardMap; -#if 15 < LOG4CXX_ABI_VERSION } -#endif #ifdef __cpp_lib_hardware_interference_size using std::hardware_constructive_interference_size; @@ -278,12 +255,6 @@ struct AsyncAppender::AsyncAppenderPriv : public AppenderSkeleton::AppenderSkele void close(); -#if LOG4CXX_ABI_VERSION <= 15 - /** - * Should location info be included in dispatched messages. - */ - bool locationInfo{ true }; -#endif /** * Does appender block when buffer is full. */ @@ -349,13 +320,6 @@ void AsyncAppender::addAppender(const AppenderPtr newAppender) void AsyncAppender::setOption(const LogString& option, const LogString& value) { -#if LOG4CXX_ABI_VERSION <= 15 - if (StringHelper::equalsIgnoreCase(option, LOG4CXX_STR("LOCATIONINFO"), LOG4CXX_STR("locationinfo"))) - { - setLocationInfo(OptionConverter::toBoolean(value, false)); - } - else -#endif if (StringHelper::equalsIgnoreCase(option, LOG4CXX_STR("BUFFERSIZE"), LOG4CXX_STR("buffersize"))) { setBufferSize(OptionConverter::toInt(value, DEFAULT_BUFFER_SIZE)); @@ -532,17 +496,6 @@ void AsyncAppender::replaceAppenders( const AppenderList& newList) priv->appenders.replaceAppenders(newList); } -#if LOG4CXX_ABI_VERSION <= 15 -bool AsyncAppender::getLocationInfo() const -{ - return priv->locationInfo; -} - -void AsyncAppender::setLocationInfo(bool flag) -{ - priv->locationInfo = flag; -} -#endif void AsyncAppender::setBufferSize(int size) { @@ -588,24 +541,6 @@ DiscardSummary::DiscardSummary(DiscardSummary&& other) { } -#if LOG4CXX_ABI_VERSION <= 15 -DiscardSummary::DiscardSummary(const LoggingEventPtr& event) : - maxEvent(event), count(1) -{ -} - -DiscardSummary::DiscardSummary(const DiscardSummary& src) : - maxEvent(src.maxEvent), count(src.count) -{ -} - -DiscardSummary& DiscardSummary::operator=(const DiscardSummary& src) -{ - maxEvent = src.maxEvent; - count = src.count; - return *this; -} -#endif void DiscardSummary::add(const LoggingEventPtr& event) { @@ -627,25 +562,6 @@ LoggingEventPtr DiscardSummary::createEvent() , LocationInfo::getLocationUnavailable() ); } -#if LOG4CXX_ABI_VERSION <= 15 -LoggingEventPtr DiscardSummary::createEvent(Pool&) -{ return createEvent(); } - -::LOG4CXX_NS::spi::LoggingEventPtr -DiscardSummary::createEvent(::LOG4CXX_NS::helpers::Pool& p, - size_t discardedCount) -{ - LogString msg(LOG4CXX_STR("Discarded ")); - StringHelper::toString(discardedCount, msg); - msg.append(LOG4CXX_STR(" messages due to a full event buffer")); - - return std::make_shared( - LOG4CXX_STR(""), - LOG4CXX_NS::Level::getError(), - msg, - LocationInfo::getLocationUnavailable() ); -} -#endif void AsyncAppender::AsyncAppenderPriv::dispatch(const LogString& appenderName) { diff --git a/src/main/cpp/asyncbuffer.cpp b/src/main/cpp/asyncbuffer.cpp index 56c6d425c..4fe95e50d 100644 --- a/src/main/cpp/asyncbuffer.cpp +++ b/src/main/cpp/asyncbuffer.cpp @@ -88,17 +88,6 @@ void AsyncBuffer::initializeForFmt(const WideStringViewType& format_string, Wide #endif // LOG4CXX_WCHAR_T_API || LOG4CXX_LOGCHAR_IS_WCHAR #endif // LOG4CXX_ASYNC_BUFFER_SUPPORTS_FMT -#if LOG4CXX_ABI_VERSION <= 15 -#if LOG4CXX_ASYNC_BUFFER_SUPPORTS_FMT -void AsyncBuffer::initializeForFmt(StringViewType&& format_string, FmtArgStore&& args) -{ initializeForFmt(format_string, std::move(args)); } - -#if LOG4CXX_WCHAR_T_API || LOG4CXX_LOGCHAR_IS_WCHAR -void AsyncBuffer::initializeForFmt(WideStringViewType&& format_string, WideFmtArgStore&& args) -{ initializeForFmt(format_string, std::move(args)); } -#endif // LOG4CXX_WCHAR_T_API || LOG4CXX_LOGCHAR_IS_WCHAR -#endif // LOG4CXX_ASYNC_BUFFER_SUPPORTS_FMT -#endif // LOG4CXX_ABI_VERSION <= 15 /** An empty buffer. */ diff --git a/src/main/cpp/bytebuffer.cpp b/src/main/cpp/bytebuffer.cpp index 8890dd45a..481a3edfb 100644 --- a/src/main/cpp/bytebuffer.cpp +++ b/src/main/cpp/bytebuffer.cpp @@ -16,9 +16,6 @@ */ #include #include -#if LOG4CXX_ABI_VERSION <= 15 -#include -#endif #include using namespace LOG4CXX_NS; @@ -53,34 +50,6 @@ void ByteBuffer::flip() m_priv->flip(); } -#if LOG4CXX_ABI_VERSION <= 15 -void ByteBuffer::position(size_t newPosition) -{ - if (newPosition < m_priv->lim) - { - m_priv->pos = newPosition; - } - else - { - m_priv->pos = m_priv->lim; - } -} - -void ByteBuffer::limit(size_t newLimit) -{ - if (newLimit > m_priv->cap) - { - throw IllegalArgumentException(LOG4CXX_STR("newLimit")); - } - - m_priv->lim = newLimit; - - if (m_priv->pos > m_priv->lim) - { - m_priv->pos = m_priv->lim; - } -} -#endif bool ByteBuffer::put(char byte) { diff --git a/src/main/cpp/cacheddateformat.cpp b/src/main/cpp/cacheddateformat.cpp index 7df6ccc97..b7daf8fd7 100644 --- a/src/main/cpp/cacheddateformat.cpp +++ b/src/main/cpp/cacheddateformat.cpp @@ -231,15 +231,6 @@ int CachedDateFormat::findMillisecondStart( return NO_MILLISECONDS; } -#if LOG4CXX_ABI_VERSION <= 15 -int CachedDateFormat::findMillisecondStart( - log4cxx_time_t time, const LogString& formatted, - const DateFormatPtr& formatter, - Pool& pool) -{ - return findMillisecondStart(time, formatted, formatter); -} -#endif /** * Formats a millisecond count into a date/time string. diff --git a/src/main/cpp/charsetencoder.cpp b/src/main/cpp/charsetencoder.cpp index ea09b86cd..1909368cd 100644 --- a/src/main/cpp/charsetencoder.cpp +++ b/src/main/cpp/charsetencoder.cpp @@ -35,11 +35,7 @@ #include #endif -#if 15 < LOG4CXX_ABI_VERSION #define LOG4CXX_16_VIRTUAL_SPECIFIER override -#else -#define LOG4CXX_16_VIRTUAL_SPECIFIER -#endif using namespace LOG4CXX_NS; using namespace LOG4CXX_NS::helpers; @@ -731,11 +727,6 @@ void CharsetEncoder::reset() { } -#if LOG4CXX_ABI_VERSION <= 15 -void CharsetEncoder::flush(ByteBuffer& /* out */ ) -{ -} -#endif void CharsetEncoder::encode(CharsetEncoderPtr& enc, const LogString& src, @@ -761,32 +752,7 @@ void CharsetEncoder::encode(CharsetEncoderPtr& enc, #else #error logchar is unrecognized #endif -#if 15 < LOG4CXX_ABI_VERSION enc->encode(Transcoder::LOSSCHAR, dst); -#else // LOG4CXX_ABI_VERSION <= 15 - if (auto p = dynamic_cast(enc.get())) - p->encode(Transcoder::LOSSCHAR, dst); - else if (auto p = dynamic_cast(enc.get())) - p->encode(Transcoder::LOSSCHAR, dst); - else if (auto p = dynamic_cast(enc.get())) - p->encode(Transcoder::LOSSCHAR, dst); - else if (auto p = dynamic_cast(enc.get())) - p->encode(Transcoder::LOSSCHAR, dst); - else if (auto p = dynamic_cast(enc.get())) - p->encode(Transcoder::LOSSCHAR, dst); - else if (auto p = dynamic_cast(enc.get())) - p->encode(Transcoder::LOSSCHAR, dst); - else if (auto p = dynamic_cast(enc.get())) - p->encode(Transcoder::LOSSCHAR, dst); -#if LOG4CXX_LOGCHAR_IS_WCHAR && LOG4CXX_HAS_WCSTOMBS - else if (auto p = dynamic_cast(enc.get())) - p->encode(Transcoder::LOSSCHAR, dst); -#endif // LOG4CXX_LOGCHAR_IS_WCHAR && LOG4CXX_HAS_WCSTOMBS -#if APR_HAS_XLATE - else if (auto p = dynamic_cast(enc.get())) - p->encode(Transcoder::LOSSCHAR, dst); -#endif // APR_HAS_XLATE -#endif // LOG4CXX_ABI_VERSION <= 15 } } diff --git a/src/main/cpp/class.cpp b/src/main/cpp/class.cpp index 7718349e2..974c36515 100644 --- a/src/main/cpp/class.cpp +++ b/src/main/cpp/class.cpp @@ -89,12 +89,6 @@ uint32_t libraryVersion() } } -#if LOG4CXX_ABI_VERSION <= 15 -LOG4CXX_EXPORT uint32_t libraryVersion() -{ - return LOG4CXX_NS::libraryVersion(); -} -#endif Class::Class() { @@ -104,12 +98,6 @@ Class::~Class() { } -#if LOG4CXX_ABI_VERSION <= 15 -LogString Class::toString() const -{ - return getName(); -} -#endif Object* Class::newInstance() const { diff --git a/src/main/cpp/consoleappender.cpp b/src/main/cpp/consoleappender.cpp index 40d7165d0..f2a2da710 100644 --- a/src/main/cpp/consoleappender.cpp +++ b/src/main/cpp/consoleappender.cpp @@ -58,12 +58,7 @@ ConsoleAppender::ConsoleAppender(const LayoutPtr& layout, const LogString& targe { setLayout(layout); setTarget(target); -#if LOG4CXX_ABI_VERSION <= 15 - Pool p; - ConsoleAppender::activateOptions(p); -#else ConsoleAppender::activateOptions(); -#endif } ConsoleAppender::~ConsoleAppender() diff --git a/src/main/cpp/datagrampacket.cpp b/src/main/cpp/datagrampacket.cpp index 7d5eb9d0b..7d169d574 100644 --- a/src/main/cpp/datagrampacket.cpp +++ b/src/main/cpp/datagrampacket.cpp @@ -22,11 +22,7 @@ using namespace LOG4CXX_NS::helpers; namespace { -#if LOG4CXX_ABI_VERSION <= 15 -using PacketSizeType = int; -#else using PacketSizeType = std::size_t; -#endif } struct DatagramPacket::DatagramPacketPriv diff --git a/src/main/cpp/dateformat.cpp b/src/main/cpp/dateformat.cpp index a10afd162..25a824e51 100644 --- a/src/main/cpp/dateformat.cpp +++ b/src/main/cpp/dateformat.cpp @@ -42,15 +42,7 @@ void DateFormat::numberFormat(LogString& toAppendTo, int n) const StringHelper::toString(n, toAppendTo); } -#if LOG4CXX_ABI_VERSION <= 15 -void DateFormat::format(LogString& toAppendTo, log4cxx_time_t tm) const -{ - helpers::Pool p; - format(toAppendTo, tm, p); -} -#else void DateFormat::format(LogString& toAppendTo, log4cxx_time_t tm, Pool& p) const { format(toAppendTo, tm); } -#endif diff --git a/src/main/cpp/datepatternconverter.cpp b/src/main/cpp/datepatternconverter.cpp index 68df9d47f..f4e823dcc 100644 --- a/src/main/cpp/datepatternconverter.cpp +++ b/src/main/cpp/datepatternconverter.cpp @@ -164,20 +164,6 @@ void DatePatternConverter::format( LOG4CXX_FORMAT_OBJECT_FORMAL_PARAMETERS ) con } } -#if LOG4CXX_ABI_VERSION <= 15 -/** - * Append formatted date to string buffer. - * @param date date - * @param toAppendTo buffer to which formatted date is appended. - */ -void DatePatternConverter::format( - const DatePtr& date, - LogString& toAppendTo, - Pool& p) const -{ - priv->df->format(toAppendTo, date->getTime(), p); -} -#endif void DatePatternConverter::format(const DatePtr& date, LogString& toAppendTo) const { priv->df->format(toAppendTo, date->getTime()); diff --git a/src/main/cpp/dbappender.cpp b/src/main/cpp/dbappender.cpp index 0eb4823e5..7552aa7b3 100644 --- a/src/main/cpp/dbappender.cpp +++ b/src/main/cpp/dbappender.cpp @@ -158,11 +158,7 @@ void DBAppender::activateOptions( LOG4CXX_ACTIVATE_OPTIONS_FORMAL_PARAMETERS ) { apr_status_t stat = apr_dbd_get_driver(_priv->m_pool.getAPRPool(), _priv->driverName.c_str(), -#if 15 < LOG4CXX_ABI_VERSION &_priv->m_driver); -#else - const_cast(&_priv->m_driver)); -#endif if(stat != APR_SUCCESS){ LogString errMsg = LOG4CXX_STR("Unable to get driver named "); diff --git a/src/main/cpp/defaultloggerfactory.cpp b/src/main/cpp/defaultloggerfactory.cpp index 1831e0bcc..12e55dbbf 100644 --- a/src/main/cpp/defaultloggerfactory.cpp +++ b/src/main/cpp/defaultloggerfactory.cpp @@ -15,25 +15,11 @@ * limitations under the License. */ -#if LOG4CXX_ABI_VERSION <= 15 -#include -#else #include -#endif using namespace LOG4CXX_NS; using namespace spi; -#if LOG4CXX_ABI_VERSION <= 15 -IMPLEMENT_LOG4CXX_OBJECT(DefaultLoggerFactory) - -LoggerPtr DefaultLoggerFactory::makeNewLoggerInstance( - helpers::Pool& pool, - const LogString& name) const -{ - return std::make_shared(name); -} -#endif LoggerPtr LoggerFactory::makeNewLoggerInstance(const LogString& name) const { diff --git a/src/main/cpp/domconfigurator.cpp b/src/main/cpp/domconfigurator.cpp index 715ef2005..04424ec3e 100644 --- a/src/main/cpp/domconfigurator.cpp +++ b/src/main/cpp/domconfigurator.cpp @@ -29,11 +29,7 @@ #include #include #include -#if LOG4CXX_ABI_VERSION <= 15 -#include -#else #include -#endif #include #include #include @@ -77,11 +73,7 @@ struct DOMConfigurator::DOMConfiguratorPrivate public: // Attributes Properties props = Configurator::properties(); LoggerRepositoryPtr repository; -#if LOG4CXX_ABI_VERSION <= 15 - LoggerFactoryPtr loggerFactory{ std::make_shared() }; -#else LoggerFactoryPtr loggerFactory{ std::make_shared() }; -#endif bool appenderAdded{ false }; AppenderMap appenders; Pool p; @@ -603,11 +595,7 @@ void DOMConfigurator::DOMConfiguratorPrivate::parseLoggerFactory(apr_xml_elem* f auto obj = OptionConverter::instantiateByClassName ( StringHelper::trim(className) , LoggerFactory::getStaticClass() -#if LOG4CXX_ABI_VERSION <= 15 - , std::make_shared() -#else , std::make_shared() -#endif ); this->loggerFactory = LOG4CXX_NS::cast(obj); PropertySetter propSetter(this->loggerFactory); @@ -963,11 +951,7 @@ void DOMConfigurator::DOMConfiguratorPrivate::setParameter(apr_xml_elem* elem, P spi::ConfigurationStatus DOMConfigurator::doConfigure ( const File& filename -#if LOG4CXX_ABI_VERSION <= 15 - , spi::LoggerRepositoryPtr repository -#else , const spi::LoggerRepositoryPtr& repository -#endif ) { m_priv = std::make_unique @@ -1041,69 +1025,6 @@ spi::ConfigurationStatus DOMConfigurator::configure(const File& filename) return DOMConfigurator().doConfigure(filename, LogManager::getLoggerRepository()); } -#if LOG4CXX_ABI_VERSION <= 15 -spi::ConfigurationStatus DOMConfigurator::configure(const std::string& filename) -{ - File file(filename); - return DOMConfigurator().doConfigure(file, LogManager::getLoggerRepository()); -} - -#if LOG4CXX_WCHAR_T_API -spi::ConfigurationStatus DOMConfigurator::configure(const std::wstring& filename) -{ - File file(filename); - return DOMConfigurator().doConfigure(file, LogManager::getLoggerRepository()); -} -#endif - -#if LOG4CXX_UNICHAR_API || LOG4CXX_LOGCHAR_IS_UNICHAR -spi::ConfigurationStatus DOMConfigurator::configure(const std::basic_string& filename) -{ - File file(filename); - return DOMConfigurator().doConfigure(file, LogManager::getLoggerRepository()); -} -#endif - -#if LOG4CXX_CFSTRING_API -spi::ConfigurationStatus DOMConfigurator::configure(const CFStringRef& filename) -{ - File file(filename); - return DOMConfigurator().doConfigure(file, LogManager::getLoggerRepository()); -} -#endif - - -spi::ConfigurationStatus DOMConfigurator::configureAndWatch(const std::string& filename) -{ - return configureAndWatch(filename, FileWatchdog::DEFAULT_DELAY); -} - -#if LOG4CXX_WCHAR_T_API -spi::ConfigurationStatus DOMConfigurator::configureAndWatch(const std::wstring& filename) -{ - return configureAndWatch(filename, FileWatchdog::DEFAULT_DELAY); -} -#endif - -#if LOG4CXX_UNICHAR_API || LOG4CXX_LOGCHAR_IS_UNICHAR -spi::ConfigurationStatus DOMConfigurator::configureAndWatch(const std::basic_string& filename) -{ - return configureAndWatch(filename, FileWatchdog::DEFAULT_DELAY); -} -#endif - -#if LOG4CXX_CFSTRING_API -spi::ConfigurationStatus DOMConfigurator::configureAndWatch(const CFStringRef& filename) -{ - return configureAndWatch(filename, FileWatchdog::DEFAULT_DELAY); -} -#endif - -spi::ConfigurationStatus DOMConfigurator::configureAndWatch(const std::string& filename, long delay) -{ - return configureAndWatch(File(filename), delay); -} -#endif // LOG4CXX_ABI_VERSION <= 15 spi::ConfigurationStatus DOMConfigurator::configureAndWatch(const File& file, long delay) { @@ -1112,37 +1033,6 @@ spi::ConfigurationStatus DOMConfigurator::configureAndWatch(const File& file, lo return status; } -#if LOG4CXX_ABI_VERSION <= 15 -#if LOG4CXX_WCHAR_T_API -spi::ConfigurationStatus DOMConfigurator::configureAndWatch(const std::wstring& filename, long delay) -{ - File file(filename); - spi::ConfigurationStatus status = DOMConfigurator().doConfigure(file, LogManager::getLoggerRepository()); - XMLWatchdog::startWatching(file, delay); - return status; -} -#endif - -#if LOG4CXX_UNICHAR_API || LOG4CXX_LOGCHAR_IS_UNICHAR -spi::ConfigurationStatus DOMConfigurator::configureAndWatch(const std::basic_string& filename, long delay) -{ - File file(filename); - spi::ConfigurationStatus status = DOMConfigurator().doConfigure(file, LogManager::getLoggerRepository()); - XMLWatchdog::startWatching(file, delay); - return status; -} -#endif - -#if LOG4CXX_CFSTRING_API -spi::ConfigurationStatus DOMConfigurator::configureAndWatch(const CFStringRef& filename, long delay) -{ - File file(filename); - spi::ConfigurationStatus status = DOMConfigurator().doConfigure(file, LogManager::getLoggerRepository()); - XMLWatchdog::startWatching(file, delay); - return status; -} -#endif -#endif // LOG4CXX_ABI_VERSION <= 15 void DOMConfigurator::DOMConfiguratorPrivate::parse(apr_xml_elem* element) { @@ -1289,102 +1179,3 @@ LogString DOMConfigurator::DOMConfiguratorPrivate::getAttribute(apr_xml_elem* el return attrValue; } -#if LOG4CXX_ABI_VERSION <= 15 -AppenderPtr DOMConfigurator::findAppenderByName(LOG4CXX_NS::helpers::Pool& p, - LOG4CXX_NS::helpers::CharsetDecoderPtr& utf8Decoder, - apr_xml_elem* element, - apr_xml_doc* doc, - const LogString& appenderName, - AppenderMap& appenders) -{ return AppenderPtr{}; } -AppenderPtr DOMConfigurator::findAppenderByReference( - LOG4CXX_NS::helpers::Pool& p, - LOG4CXX_NS::helpers::CharsetDecoderPtr& utf8Decoder, - apr_xml_elem* appenderRef, - apr_xml_doc* doc, - AppenderMap& appenders) -{ return AppenderPtr{}; } -AppenderPtr DOMConfigurator::parseAppender(Pool& p, - LOG4CXX_NS::helpers::CharsetDecoderPtr& utf8Decoder, - apr_xml_elem* appenderElement, - apr_xml_doc* doc, - AppenderMap& appenders) -{ return AppenderPtr{}; } -void DOMConfigurator::parseErrorHandler(Pool& p, - LOG4CXX_NS::helpers::CharsetDecoderPtr& utf8Decoder, - apr_xml_elem* element, - AppenderPtr& appender, - apr_xml_doc* doc, - AppenderMap& appenders) -{} -void DOMConfigurator::parseFilters(Pool& p, - LOG4CXX_NS::helpers::CharsetDecoderPtr& utf8Decoder, - apr_xml_elem* element, - std::vector& filters) -{} -void DOMConfigurator::parseLogger( - LOG4CXX_NS::helpers::Pool& p, - LOG4CXX_NS::helpers::CharsetDecoderPtr& utf8Decoder, - apr_xml_elem* loggerElement, - apr_xml_doc* doc, - AppenderMap& appenders) -{} -void DOMConfigurator::parseLoggerFactory( - LOG4CXX_NS::helpers::Pool& p, - LOG4CXX_NS::helpers::CharsetDecoderPtr& utf8Decoder, - apr_xml_elem* factoryElement) -{} -void DOMConfigurator::parseRoot( - LOG4CXX_NS::helpers::Pool& p, - LOG4CXX_NS::helpers::CharsetDecoderPtr& utf8Decoder, - apr_xml_elem* rootElement, - apr_xml_doc* doc, - AppenderMap& appenders) -{} -void DOMConfigurator::parseChildrenOfLoggerElement( - LOG4CXX_NS::helpers::Pool& p, - LOG4CXX_NS::helpers::CharsetDecoderPtr& utf8Decoder, - apr_xml_elem* loggerElement, LoggerPtr logger, bool isRoot, - apr_xml_doc* doc, - AppenderMap& appenders) -{} -LayoutPtr DOMConfigurator::parseLayout ( - LOG4CXX_NS::helpers::Pool& p, - LOG4CXX_NS::helpers::CharsetDecoderPtr& utf8Decoder, - apr_xml_elem* layout_element) -{ return LayoutPtr{}; } -ObjectPtr DOMConfigurator::parseTriggeringPolicy ( - LOG4CXX_NS::helpers::Pool& p, - LOG4CXX_NS::helpers::CharsetDecoderPtr& utf8Decoder, - apr_xml_elem* policy_element) -{ return ObjectPtr{}; } -RollingPolicyPtr DOMConfigurator::parseRollingPolicy ( - LOG4CXX_NS::helpers::Pool& p, - LOG4CXX_NS::helpers::CharsetDecoderPtr& utf8Decoder, - apr_xml_elem* policy_element) -{ return RollingPolicyPtr{}; } -void DOMConfigurator::parseLevel( - LOG4CXX_NS::helpers::Pool& p, - LOG4CXX_NS::helpers::CharsetDecoderPtr& utf8Decoder, - apr_xml_elem* element, LoggerPtr logger, bool isRoot) -{} -void DOMConfigurator::setParameter(LOG4CXX_NS::helpers::Pool& p, - LOG4CXX_NS::helpers::CharsetDecoderPtr& utf8Decoder, - apr_xml_elem* elem, - PropertySetter& propSetter) -{} -void DOMConfigurator::parse( - Pool& p, - LOG4CXX_NS::helpers::CharsetDecoderPtr& utf8Decoder, - apr_xml_elem* element, - apr_xml_doc* doc, - AppenderMap& appenders) -{} -LogString DOMConfigurator::getAttribute( - LOG4CXX_NS::helpers::CharsetDecoderPtr& utf8Decoder, - apr_xml_elem* element, - const std::string& attrName) -{ return LogString{}; } -LogString DOMConfigurator::subst(const LogString& value) -{ return LogString{}; } -#endif diff --git a/src/main/cpp/errorhandler.cpp b/src/main/cpp/errorhandler.cpp index 001efd01b..7c0a2c9bc 100644 --- a/src/main/cpp/errorhandler.cpp +++ b/src/main/cpp/errorhandler.cpp @@ -19,8 +19,6 @@ using namespace LOG4CXX_NS; using namespace LOG4CXX_NS::helpers; -#if 15 < LOG4CXX_ABI_VERSION void spi::ErrorHandler::activateOptions( LOG4CXX_ACTIVATE_OPTIONS_FORMAL_PARAMETERS ) { } -#endif diff --git a/src/main/cpp/fallbackerrorhandler.cpp b/src/main/cpp/fallbackerrorhandler.cpp index 98cf4af18..bf505635e 100644 --- a/src/main/cpp/fallbackerrorhandler.cpp +++ b/src/main/cpp/fallbackerrorhandler.cpp @@ -20,10 +20,6 @@ #include #include #include -#if LOG4CXX_ABI_VERSION <= 15 -#include -#include -#endif #include using namespace LOG4CXX_NS; @@ -123,16 +119,7 @@ void FallbackErrorHandler::error + backupLocked->getName() + LOG4CXX_STR("] in [") + item.first + LOG4CXX_STR("].")); } -#if LOG4CXX_ABI_VERSION <= 15 - bool ok{ false }; - if (auto logger = LOG4CXX_NS::cast(holderLocked)) - ok = logger->replaceAppender(primaryLocked, backupLocked); - else if (auto asyncAppender = LOG4CXX_NS::cast(holderLocked)) - ok = asyncAppender->replaceAppender(primaryLocked, backupLocked); - if (!ok) -#else if (!holderLocked->replaceAppender(primaryLocked, backupLocked)) -#endif { LogLog::debug(LOG4CXX_STR("FB: Failed to replace [") + primaryLocked->getName() + LOG4CXX_STR("] with [") @@ -168,11 +155,6 @@ void FallbackErrorHandler::setBackupAppender(const AppenderPtr& backup1) m_priv->backup.push_back(backup1); } -#if LOG4CXX_ABI_VERSION <= 15 -void FallbackErrorHandler::activateOptions(Pool&) -{ -} -#endif void FallbackErrorHandler::setOption(const LogString& option, const LogString& value) { diff --git a/src/main/cpp/file.cpp b/src/main/cpp/file.cpp index 27dd1d5c1..ca57e7caf 100644 --- a/src/main/cpp/file.cpp +++ b/src/main/cpp/file.cpp @@ -210,12 +210,6 @@ const char* File::getAPRPath() const return m_priv->getPath(); } -#if LOG4CXX_ABI_VERSION <= 15 -log4cxx_status_t File::open(apr_file_t** file, int flags, int perm, helpers::Pool& p) const -{ - return apr_file_open(file, m_priv->getPath(), flags, perm, p.getAPRPool()); -} -#endif bool File::exists() const { @@ -347,13 +341,3 @@ bool File::getAutoDelete() const{ return m_priv->autoDelete; } -#if LOG4CXX_ABI_VERSION <= 15 -bool File::exists(helpers::Pool& p) const { return exists(); } -size_t File::length(helpers::Pool& p) const { return length(); } -log4cxx_time_t File::lastModified(helpers::Pool& p) const { return lastModified(); } -std::vector File::list(helpers::Pool& p) const { return list(); } -bool File::deleteFile(helpers::Pool& p) const { return deleteFile(); } -bool File::renameTo(const File& dest, helpers::Pool& p) const { return renameTo(dest); } -LogString File::getParent(helpers::Pool& p) const { return getParent(); } -bool File::mkdirs(helpers::Pool& p) const { return mkdirs(); } -#endif diff --git a/src/main/cpp/fileappender.cpp b/src/main/cpp/fileappender.cpp index 54215e8cb..6ecefd11b 100644 --- a/src/main/cpp/fileappender.cpp +++ b/src/main/cpp/fileappender.cpp @@ -435,11 +435,3 @@ bool FileAppender::getAppend() const return _priv->fileAppend; } -#if LOG4CXX_ABI_VERSION <= 15 -void FileAppender::activateOptionsInternal(helpers::Pool& ) -{ activateOptionsInternal(); } -void FileAppender::setFileInternal(const LogString& file, bool append, - bool bufferedIO, size_t bufferSize, - helpers::Pool&) -{ setFileInternal(file, append, bufferedIO, bufferSize); } -#endif diff --git a/src/main/cpp/filerenameaction.cpp b/src/main/cpp/filerenameaction.cpp index 3e407617a..88908bdf1 100644 --- a/src/main/cpp/filerenameaction.cpp +++ b/src/main/cpp/filerenameaction.cpp @@ -52,18 +52,9 @@ FileRenameAction::FileRenameAction(const File& toRename, { } -#if LOG4CXX_ABI_VERSION <= 15 -bool FileRenameAction::execute(Pool&) const -{ - if (!priv->renameEmptyFile && 0 == priv->source.length()) - return false; - return priv->source.renameTo(priv->destination); -} -#else bool FileRenameAction::execute()const { if (priv->renameEmptyFile || 0 != priv->source.length()) return priv->source.renameTo(priv->destination); return false; } -#endif diff --git a/src/main/cpp/fixedwindowrollingpolicy.cpp b/src/main/cpp/fixedwindowrollingpolicy.cpp index 358dee298..ff0162dd4 100644 --- a/src/main/cpp/fixedwindowrollingpolicy.cpp +++ b/src/main/cpp/fixedwindowrollingpolicy.cpp @@ -361,12 +361,6 @@ bool FixedWindowRollingPolicy::purge(int lowIndex, int highIndex) const return true; } -#if LOG4CXX_ABI_VERSION <= 15 -bool FixedWindowRollingPolicy::purge(int lowIndex, int highIndex, helpers::Pool& pool) const -{ - return purge(lowIndex, highIndex); -} -#endif #define RULES_PUT(spec, cls) \ specs.insert(PatternMap::value_type(LogString(LOG4CXX_STR(spec)), (PatternConstructor) cls ::newInstance)) diff --git a/src/main/cpp/formattinginfo.cpp b/src/main/cpp/formattinginfo.cpp index 7e322961f..b8b614f99 100644 --- a/src/main/cpp/formattinginfo.cpp +++ b/src/main/cpp/formattinginfo.cpp @@ -78,12 +78,6 @@ FormattingInfoPtr FormattingInfo::getDefault() * @param fieldStart start of field in buffer. * @param buffer buffer to be modified. */ -#if LOG4CXX_ABI_VERSION <= 15 -void FormattingInfo::format(const int fieldStart, LogString& buffer) const -{ - adjustField(static_cast(std::max(fieldStart, 0)), buffer); -} -#endif void FormattingInfo::adjustField(const LogString::size_type fieldStart, LogString& buffer) const { if (fieldStart > buffer.length()) diff --git a/src/main/cpp/hierarchy.cpp b/src/main/cpp/hierarchy.cpp index 4b7103e24..31b700928 100644 --- a/src/main/cpp/hierarchy.cpp +++ b/src/main/cpp/hierarchy.cpp @@ -16,9 +16,6 @@ */ #include -#if LOG4CXX_ABI_VERSION <= 15 -#include -#endif #include #include #include @@ -61,9 +58,6 @@ struct Hierarchy::HierarchyPrivate LoggerMap loggers; ProvisionNodeMap provisionNodes; -#if LOG4CXX_ABI_VERSION <= 15 - std::vector allAppenders; -#endif mutable std::mutex listenerMutex; const char* alreadyTriedMethod{ NULL }; @@ -226,11 +220,7 @@ LevelPtr Hierarchy::getThreshold() const LoggerPtr Hierarchy::getLogger(const LogString& name) { -#if LOG4CXX_ABI_VERSION <= 15 - static WideLife defaultFactory = std::make_shared(); -#else static WideLife defaultFactory = std::make_shared(); -#endif return getLogger(name, defaultFactory); } @@ -249,11 +239,7 @@ LoggerPtr Hierarchy::getLogger(const LogString& name, } if (!result && factory) { -#if LOG4CXX_ABI_VERSION <= 15 - LoggerPtr logger(factory->makeNewLoggerInstance(m_priv->pool, name)); -#else LoggerPtr logger(factory->makeNewLoggerInstance(name)); -#endif logger->setHierarchy(this); m_priv->loggers.insert(LoggerMap::value_type(name, logger)); @@ -464,17 +450,6 @@ HierarchyPtr Hierarchy::create() return ret; } -#if LOG4CXX_ABI_VERSION <= 15 -void Hierarchy::clearAppenders() -{ - m_priv->allAppenders.clear(); -} - -void Hierarchy::addAppender(AppenderPtr appender) -{ - m_priv->allAppenders.push_back(appender); -} -#endif bool Hierarchy::removeLogger(const LogString& name, bool ifNotUsed) { diff --git a/src/main/cpp/jsonlayout.cpp b/src/main/cpp/jsonlayout.cpp index 100b4b8cd..49763b60b 100644 --- a/src/main/cpp/jsonlayout.cpp +++ b/src/main/cpp/jsonlayout.cpp @@ -460,10 +460,3 @@ void JSONLayout::appendSerializedLocationInfo(LogString& buf, const LoggingEvent buf.append(LOG4CXX_STR("}")); } -#if LOG4CXX_ABI_VERSION <= 15 -void JSONLayout::appendSerializedLocationInfo(LogString& buf, - const LoggingEventPtr& event, Pool& p) const -{ - appendSerializedLocationInfo(buf, event); -} -#endif diff --git a/src/main/cpp/layout.cpp b/src/main/cpp/layout.cpp index 39eaf2599..ffe43b0ce 100644 --- a/src/main/cpp/layout.cpp +++ b/src/main/cpp/layout.cpp @@ -30,29 +30,6 @@ LogString Layout::getContentType() const return LOG4CXX_STR("text/plain"); } -#if LOG4CXX_ABI_VERSION <= 15 -void Layout::format(LogString& output, const spi::LoggingEventPtr& event) const -{ - Pool p; - format(output, event, p); -} - -void Layout::appendHeader(LogString&, LOG4CXX_NS::helpers::Pool&) {} - -void Layout::appendHeader(LogString& output) -{ - Pool p; - appendHeader(output, p); -} - -void Layout::appendFooter(LogString&, LOG4CXX_NS::helpers::Pool&) {} - -void Layout::appendFooter(LogString& output) -{ - Pool p; - appendFooter(output, p); -} -#else void Layout::format(LogString& output, const spi::LoggingEventPtr& event, helpers::Pool&) const { format(output, event); @@ -73,7 +50,6 @@ void Layout::appendFooter(LogString& output, helpers::Pool&) void Layout::appendFooter(LogString& output) { } -#endif /** * The expected length of a formatted event excluding the message text @@ -91,8 +67,6 @@ size_t Layout::getFormattedEventCharacterCount() const return text.size(); } -#if 15 < LOG4CXX_ABI_VERSION void Layout::activateOptions( LOG4CXX_ACTIVATE_OPTIONS_FORMAL_PARAMETERS ) { } -#endif diff --git a/src/main/cpp/logger.cpp b/src/main/cpp/logger.cpp index ef7b717a2..c985152df 100644 --- a/src/main/cpp/logger.cpp +++ b/src/main/cpp/logger.cpp @@ -93,12 +93,6 @@ Logger::Logger(const LogString& name1) { } -#if LOG4CXX_ABI_VERSION <= 15 -Logger::Logger(Pool& p, const LogString& name) - : Logger(name) -{ -} -#endif Logger::~Logger() { @@ -168,12 +162,6 @@ void Logger::callAppenders(const spi::LoggingEventPtr& event) const rep->emitNoAppenderWarning(this); } } -#if LOG4CXX_ABI_VERSION <= 15 -void Logger::callAppenders(const spi::LoggingEventPtr& event, Pool&) const -{ - callAppenders(event); -} -#endif void Logger::closeNestedAppenders() { @@ -338,17 +326,10 @@ const LevelPtr& Logger::getEffectiveLevel() const #endif } -#if LOG4CXX_ABI_VERSION <= 15 -LoggerRepository* Logger::getLoggerRepository() const -{ - return m_priv->repositoryRaw; -} -#else LoggerRepositoryPtr Logger::getLoggerRepository() { return LogManager::getLoggerRepository(); } -#endif LoggerRepository* Logger::getHierarchy() const { diff --git a/src/main/cpp/loggingevent.cpp b/src/main/cpp/loggingevent.cpp index ed110564c..74698c223 100644 --- a/src/main/cpp/loggingevent.cpp +++ b/src/main/cpp/loggingevent.cpp @@ -320,13 +320,6 @@ void LoggingEvent::LoadDC() const } } -#if LOG4CXX_ABI_VERSION <= 15 -void LoggingEvent::getMDCCopy() const -{ - if (!m_priv->dc) - LoadDC(); -} -#endif bool LoggingEvent::getProperty(const LogString& key, LogString& dest) const { diff --git a/src/main/cpp/loggingeventpatternconverter.cpp b/src/main/cpp/loggingeventpatternconverter.cpp index ed8782e97..827b82a84 100644 --- a/src/main/cpp/loggingeventpatternconverter.cpp +++ b/src/main/cpp/loggingeventpatternconverter.cpp @@ -53,15 +53,7 @@ bool LoggingEventPatternConverter::handlesThrowable() const return false; } -#if LOG4CXX_ABI_VERSION <= 15 -void LoggingEventPatternConverter::format(const spi::LoggingEventPtr& event, LogString& toAppendTo) const -{ - helpers::Pool p; - format(event, toAppendTo, p); -} -#else void LoggingEventPatternConverter::format(const spi::LoggingEventPtr& event, LogString& toAppendTo, helpers::Pool&) const { format(event, toAppendTo); } -#endif diff --git a/src/main/cpp/logmanager.cpp b/src/main/cpp/logmanager.cpp index 9888382d5..aad1f1fa2 100644 --- a/src/main/cpp/logmanager.cpp +++ b/src/main/cpp/logmanager.cpp @@ -214,12 +214,5 @@ void LogManager::resetConfiguration() bool LogManager::removeLogger(const LogString& name, bool ifNotUsed) { -#if LOG4CXX_ABI_VERSION <= 15 - bool result = false; - if (auto r = dynamic_cast(getLoggerRepository().get())) - result = r->removeLogger(name, ifNotUsed); - return result; -#else return getLoggerRepository()->removeLogger(name, ifNotUsed); -#endif } diff --git a/src/main/cpp/multiprocessrollingfileappender.cpp b/src/main/cpp/multiprocessrollingfileappender.cpp index ad9fb570a..a15955216 100644 --- a/src/main/cpp/multiprocessrollingfileappender.cpp +++ b/src/main/cpp/multiprocessrollingfileappender.cpp @@ -260,12 +260,6 @@ bool MultiprocessRollingFileAppender::rollover() std::lock_guard lock(_priv->mutex); return synchronizedRollover(); } -#if LOG4CXX_ABI_VERSION <= 15 -bool MultiprocessRollingFileAppender::rollover(Pool& p) -{ - return rollover(); -} -#endif /** * Coordinate a rollover with other processes @@ -391,12 +385,6 @@ bool MultiprocessRollingFileAppender::synchronizedRollover(const TriggeringPolic return result; } -#if LOG4CXX_ABI_VERSION <= 15 -bool MultiprocessRollingFileAppender::synchronizedRollover(Pool& p, const TriggeringPolicyPtr& trigger) -{ - return synchronizedRollover(trigger); -} -#endif /** * re-open \c fileName (used after it has been renamed) diff --git a/src/main/cpp/odbcappender.cpp b/src/main/cpp/odbcappender.cpp index cb080e903..9f3e5970c 100644 --- a/src/main/cpp/odbcappender.cpp +++ b/src/main/cpp/odbcappender.cpp @@ -273,16 +273,6 @@ void ODBCAppender::append( LOG4CXX_APPEND_FORMAL_PARAMETERS ) #endif } -#if LOG4CXX_ABI_VERSION <= 15 -LogString ODBCAppender::getLogStatement(const spi::LoggingEventPtr& event, LOG4CXX_NS::helpers::Pool& p) const -{ - return LogString(); -} - -void ODBCAppender::execute(const LogString& sql, LOG4CXX_NS::helpers::Pool& p) -{ -} -#endif /* The default behavior holds a single connection open until the appender is closed (typically when garbage collected).*/ diff --git a/src/main/cpp/onlyonceerrorhandler.cpp b/src/main/cpp/onlyonceerrorhandler.cpp index 0e76f1bcc..cbf8693bb 100644 --- a/src/main/cpp/onlyonceerrorhandler.cpp +++ b/src/main/cpp/onlyonceerrorhandler.cpp @@ -41,11 +41,6 @@ void OnlyOnceErrorHandler::setLogger(const LoggerPtr&) { } -#if LOG4CXX_ABI_VERSION <= 15 -void OnlyOnceErrorHandler::activateOptions(Pool&) -{ -} -#endif void OnlyOnceErrorHandler::setOption(const LogString& option, const LogString& value) { diff --git a/src/main/cpp/optionhandler.cpp b/src/main/cpp/optionhandler.cpp index 5134d0d22..994730bd3 100644 --- a/src/main/cpp/optionhandler.cpp +++ b/src/main/cpp/optionhandler.cpp @@ -20,20 +20,11 @@ using namespace LOG4CXX_NS; -#if LOG4CXX_ABI_VERSION <= 15 -void spi::OptionHandler::activateOptions() -{ - // Ensure any ABI 15 overriden activateOptions is invoked - helpers::Pool p; - activateOptions(p); -} -#else void spi::OptionHandler::activateOptions(helpers::Pool&) { // Redirect to the ABI 16 activateOptions activateOptions(); } -#endif void spi::OptionHandler::setOption(const LogString& option, const LogString& value) { diff --git a/src/main/cpp/outputstream.cpp b/src/main/cpp/outputstream.cpp index d88d04e49..86447a121 100644 --- a/src/main/cpp/outputstream.cpp +++ b/src/main/cpp/outputstream.cpp @@ -33,24 +33,6 @@ OutputStream::~OutputStream() { } -#if LOG4CXX_ABI_VERSION <= 15 -void OutputStream::close() -{ - Pool p; - close(p); -} -void OutputStream::flush() -{ - Pool p; - flush(p); -} -void OutputStream::write(ByteBuffer& buf) -{ - Pool p; - write(buf, p); -} -#else void OutputStream::close(Pool&) { close(); } void OutputStream::flush(Pool&) { flush(); } void OutputStream::write(ByteBuffer& buf, Pool&) { write(buf); } -#endif diff --git a/src/main/cpp/patternconverter.cpp b/src/main/cpp/patternconverter.cpp index b2e23a167..120b13c4f 100644 --- a/src/main/cpp/patternconverter.cpp +++ b/src/main/cpp/patternconverter.cpp @@ -69,15 +69,7 @@ void PatternConverter::setFormattingInfo(const FormattingInfoPtr& newValue) m_priv->info = newValue; } -#if LOG4CXX_ABI_VERSION <= 15 -void PatternConverter::format(const helpers::ObjectPtr& obj, LogString& toAppendTo) const -{ - helpers::Pool p; - format(obj, toAppendTo, p); -} -#else void PatternConverter::format(const helpers::ObjectPtr& obj, LogString& toAppendTo, helpers::Pool&) const { format(obj, toAppendTo); } -#endif diff --git a/src/main/cpp/patternparser.cpp b/src/main/cpp/patternparser.cpp index ded7a37d8..dbd970fbf 100644 --- a/src/main/cpp/patternparser.cpp +++ b/src/main/cpp/patternparser.cpp @@ -112,16 +112,6 @@ size_t PatternParser::extractOptions(const LogString& pattern, LogString::size_t return i; } -#if LOG4CXX_ABI_VERSION <= 15 -void PatternParser::parse( - const LogString& pattern, - std::vector& patternConverters, - std::vector& formattingInfos, - const PatternMap& rules) -{ - patternConverters = parse(pattern, rules); -} -#endif PatternConverterList PatternParser::parse ( const LogString& pattern diff --git a/src/main/cpp/propertyconfigurator.cpp b/src/main/cpp/propertyconfigurator.cpp index 9d4c28a4d..2cd865987 100644 --- a/src/main/cpp/propertyconfigurator.cpp +++ b/src/main/cpp/propertyconfigurator.cpp @@ -24,11 +24,7 @@ #include #include #include -#if LOG4CXX_ABI_VERSION <= 15 -#include -#else #include -#endif #include #include #include @@ -90,7 +86,6 @@ IMPLEMENT_LOG4CXX_OBJECT(PropertyConfigurator) using RegistryType = std::map; using RegistryPtr = std::unique_ptr; -#if 15 < LOG4CXX_ABI_VERSION struct PropertyConfigurator::PrivateData { @@ -111,29 +106,16 @@ struct PropertyConfigurator::PrivateData }; PropertyConfigurator::PropertyConfigurator() : m_priv{ std::make_unique() } -#else -#define m_priv this -PropertyConfigurator::PropertyConfigurator() - : registry(new std::map()) - , loggerFactory(new DefaultLoggerFactory()) -#endif { } PropertyConfigurator::~PropertyConfigurator() { -#if LOG4CXX_ABI_VERSION <= 15 - delete registry; -#endif } spi::ConfigurationStatus PropertyConfigurator::doConfigure ( const File& configFileName -#if LOG4CXX_ABI_VERSION <= 15 - , spi::LoggerRepositoryPtr repository -#else , const spi::LoggerRepositoryPtr& repository -#endif ) { auto result = spi::ConfigurationStatus::NotConfigured; @@ -158,11 +140,7 @@ spi::ConfigurationStatus PropertyConfigurator::doConfigure try { result = doConfigure(props, repository ? repository : LogManager::getLoggerRepository()); -#if LOG4CXX_ABI_VERSION <= 15 - if (m_priv->registry->empty()) -#else if (!m_priv->appenderAdded) -#endif { LogLog::warn(LOG4CXX_STR("[") + configFileName.getPath() + LOG4CXX_STR("] did not add an ") + Appender::getStaticClass().getName() @@ -188,12 +166,6 @@ spi::ConfigurationStatus PropertyConfigurator::configure(helpers::Properties& pr return PropertyConfigurator().doConfigure(properties, LogManager::getLoggerRepository()); } -#if LOG4CXX_ABI_VERSION <= 15 -spi::ConfigurationStatus PropertyConfigurator::configureAndWatch(const File& configFilename) -{ - return configureAndWatch(configFilename, FileWatchdog::DEFAULT_DELAY); -} -#endif spi::ConfigurationStatus PropertyConfigurator::configureAndWatch( const File& configFilename, long delay) @@ -255,11 +227,7 @@ spi::ConfigurationStatus PropertyConfigurator::doConfigure(helpers::Properties& configureLoggerFactory(properties); parseCatsAndRenderers(properties, hierarchy); LogLog::debug(LOG4CXX_STR("Finished configuring.")); -#if LOG4CXX_ABI_VERSION <= 15 - auto result = m_priv->registry->empty() -#else auto result = !m_priv->appenderAdded -#endif ? spi::ConfigurationStatus::NotConfigured : spi::ConfigurationStatus::Configured; @@ -278,11 +246,7 @@ void PropertyConfigurator::configureLoggerFactory(helpers::Properties& props) auto instance = OptionConverter::instantiateByClassName ( StringHelper::trim(factoryClassName) , LoggerFactory::getStaticClass() -#if LOG4CXX_ABI_VERSION <= 15 - , std::make_shared() -#else , std::make_shared() -#endif ); m_priv->loggerFactory = LOG4CXX_NS::cast( instance ); @@ -445,10 +409,8 @@ void PropertyConfigurator::parseLogger( async->addAppender(appender); } } -#if 15 < LOG4CXX_ABI_VERSION if (!newappenders.empty()) m_priv->appenderAdded = true; -#endif if (async && !newappenders.empty()) { if (LogLog::isDebugEnabled()) diff --git a/src/main/cpp/propertysetter.cpp b/src/main/cpp/propertysetter.cpp index 1b0a3a09d..3cb2ed12b 100644 --- a/src/main/cpp/propertysetter.cpp +++ b/src/main/cpp/propertysetter.cpp @@ -110,32 +110,3 @@ void PropertySetter::activate() } } -#if LOG4CXX_ABI_VERSION <= 15 -void PropertySetter::setProperties(const helpers::ObjectPtr& obj, - helpers::Properties& properties, - const LogString& prefix, - Pool&) -{ - PropertySetter(obj).setProperties(properties, prefix); -} - - -void PropertySetter::setProperties(helpers::Properties& properties, - const LogString& prefix, - Pool&) -{ - setProperties(properties, prefix); -} - -void PropertySetter::setProperty(const LogString& option, - const LogString& value, - Pool&) -{ - setProperty(option, value); -} - -void PropertySetter::activate(Pool& p) -{ - activate(); -} -#endif diff --git a/src/main/cpp/reader.cpp b/src/main/cpp/reader.cpp index 6f09cd98e..92cc80580 100644 --- a/src/main/cpp/reader.cpp +++ b/src/main/cpp/reader.cpp @@ -32,18 +32,5 @@ Reader::~Reader() { } -#if LOG4CXX_ABI_VERSION <= 15 -void Reader::close() -{ - Pool p; - close(p); -} -LogString Reader::read() -{ - Pool p; - return read(p); -} -#else void Reader::close(Pool&) { close(); } LogString Reader::read(Pool&) { return read(); } -#endif diff --git a/src/main/cpp/rollingfileappender.cpp b/src/main/cpp/rollingfileappender.cpp index 164cc418d..5926d6867 100644 --- a/src/main/cpp/rollingfileappender.cpp +++ b/src/main/cpp/rollingfileappender.cpp @@ -301,12 +301,6 @@ bool RollingFileAppender::rollover() std::lock_guard lock(_priv->mutex); return rolloverInternal(); } -#if LOG4CXX_ABI_VERSION <= 15 -bool RollingFileAppender::rollover(Pool& ) -{ - return rollover(); -} -#endif bool RollingFileAppender::rolloverInternal() { @@ -444,12 +438,6 @@ bool RollingFileAppender::rolloverInternal() return false; } -#if LOG4CXX_ABI_VERSION <= 15 -bool RollingFileAppender::rolloverInternal(Pool&) -{ - return rolloverInternal(); -} -#endif /** * {@inheritDoc} diff --git a/src/main/cpp/rollingpolicy.cpp b/src/main/cpp/rollingpolicy.cpp index 9f39ec3df..b17a7a275 100644 --- a/src/main/cpp/rollingpolicy.cpp +++ b/src/main/cpp/rollingpolicy.cpp @@ -22,18 +22,6 @@ using namespace LOG4CXX_NS::rolling; IMPLEMENT_LOG4CXX_OBJECT(RollingPolicy) -#if LOG4CXX_ABI_VERSION <= 15 -RolloverDescriptionPtr RollingPolicy::initialize(const LogString& currentActiveFile, bool append) -{ - helpers::Pool p; - return initialize(currentActiveFile, append, p); -} -RolloverDescriptionPtr RollingPolicy::rollover(const LogString& currentActiveFile, bool append) -{ - helpers::Pool p; - return rollover(currentActiveFile, append, p); -} -#else RolloverDescriptionPtr RollingPolicy::initialize(const LogString& currentActiveFile, bool append, helpers::Pool&) { return initialize(currentActiveFile, append); @@ -42,4 +30,3 @@ RolloverDescriptionPtr RollingPolicy::rollover(const LogString& currentActiveFil { return rollover(currentActiveFile, append); } -#endif diff --git a/src/main/cpp/rollingpolicybase.cpp b/src/main/cpp/rollingpolicybase.cpp index ec137529f..5202757c4 100644 --- a/src/main/cpp/rollingpolicybase.cpp +++ b/src/main/cpp/rollingpolicybase.cpp @@ -127,15 +127,6 @@ void RollingPolicyBase::formatFileName( item->getFormattingInfo().adjustField(startField, toAppendTo); } } -#if LOG4CXX_ABI_VERSION <= 15 -void RollingPolicyBase::formatFileName( - const ObjectPtr& obj, - LogString& toAppendTo, - Pool& pool) const -{ - formatFileName(obj, toAppendTo); -} -#endif PatternConverterPtr RollingPolicyBase::getIntegerPatternConverter() const { diff --git a/src/main/cpp/rootlogger.cpp b/src/main/cpp/rootlogger.cpp index 3ff9c55f9..1b17318b5 100644 --- a/src/main/cpp/rootlogger.cpp +++ b/src/main/cpp/rootlogger.cpp @@ -30,12 +30,6 @@ RootLogger::RootLogger(const LevelPtr& level1) setLevel(level1); } -#if LOG4CXX_ABI_VERSION <= 15 -RootLogger::RootLogger(Pool&, const LevelPtr level) - : RootLogger(level) -{ -} -#endif const LevelPtr& RootLogger::getEffectiveLevel() const { diff --git a/src/main/cpp/serversocket.cpp b/src/main/cpp/serversocket.cpp index e0a4fa511..e04eb37c4 100644 --- a/src/main/cpp/serversocket.cpp +++ b/src/main/cpp/serversocket.cpp @@ -52,11 +52,6 @@ void ServerSocket::setSoTimeout(int newVal) m_priv->timeout = newVal; } -#if LOG4CXX_ABI_VERSION <= 15 -ServerSocketUniquePtr ServerSocket::create(int port){ - return std::make_unique(port); -} -#endif ServerSocketUniquePtr ServerSocket::create(int port, bool reuseAddress, const LogString& hostname){ return std::make_unique(port, reuseAddress, hostname); diff --git a/src/main/cpp/smtpappender.cpp b/src/main/cpp/smtpappender.cpp index 8afdf5f10..6eb449074 100644 --- a/src/main/cpp/smtpappender.cpp +++ b/src/main/cpp/smtpappender.cpp @@ -548,12 +548,7 @@ class SMTPMessage #endif class LOG4CXX_EXPORT DefaultEvaluator -#if LOG4CXX_ABI_VERSION <= 15 - : public virtual spi::TriggeringEventEvaluator - , public virtual helpers::Object -#else : public spi::TriggeringEventEvaluator -#endif { public: DECLARE_LOG4CXX_OBJECT(DefaultEvaluator) diff --git a/src/main/cpp/socket.cpp b/src/main/cpp/socket.cpp index 4b000f9cc..b8985c5fd 100644 --- a/src/main/cpp/socket.cpp +++ b/src/main/cpp/socket.cpp @@ -50,15 +50,9 @@ void Socket::setAttributes(const InetAddressPtr& newAddress, int newPort) m_priv->port = newPort; } -#if LOG4CXX_ABI_VERSION <= 15 -SocketUniquePtr Socket::create(InetAddressPtr& address, int port){ - return std::make_unique(address, port); -} -#endif SocketUniquePtr Socket::create(LOG4CXX_16_CONST InetAddressPtr& address, int port, const LogString& concreteClassName) { -#if 15 < LOG4CXX_ABI_VERSION if (!concreteClassName.empty()) { if (LogLog::isDebugEnabled()) @@ -82,7 +76,6 @@ SocketUniquePtr Socket::create(LOG4CXX_16_CONST InetAddressPtr& address, int por return result; } } -#endif return std::make_unique(address, port); } diff --git a/src/main/cpp/socketappenderskeleton.cpp b/src/main/cpp/socketappenderskeleton.cpp index bceaf47e0..a16163988 100644 --- a/src/main/cpp/socketappenderskeleton.cpp +++ b/src/main/cpp/socketappenderskeleton.cpp @@ -43,11 +43,7 @@ SocketAppenderSkeleton::SocketAppenderSkeleton(int defaultPort, int reconnection { } -#if LOG4CXX_ABI_VERSION <= 15 -SocketAppenderSkeleton::SocketAppenderSkeleton(helpers::InetAddressPtr address, int port, int reconnectionDelay) -#else SocketAppenderSkeleton::SocketAppenderSkeleton(const helpers::InetAddressPtr& address, int port, int reconnectionDelay) -#endif : AppenderSkeleton(std::make_unique(address, port, reconnectionDelay)) { } @@ -131,12 +127,10 @@ void SocketAppenderSkeleton::setOption(const LogString& option, const LogString& { setReconnectionDelay(OptionConverter::toInt(value, getDefaultDelay())); } -#if 15 < LOG4CXX_ABI_VERSION else if (StringHelper::equalsIgnoreCase(option, LOG4CXX_STR("SOCKETSUBCLASS"), LOG4CXX_STR("socketsubclass"))) { setSocketSubclass(value); } -#endif else { AppenderSkeleton::setOption(option, value); @@ -173,12 +167,6 @@ void SocketAppenderSkeleton::SocketAppenderSkeletonPriv::fireConnector() this->taskManager = taskManager; } -#if LOG4CXX_ABI_VERSION <= 15 -void SocketAppenderSkeleton::fireConnector() -{ - _priv->fireConnector(); -} -#endif void SocketAppenderSkeleton::SocketAppenderSkeletonPriv::retryConnect() { @@ -321,7 +309,6 @@ int SocketAppenderSkeleton::getReconnectionDelay() const return _priv->reconnectionDelay; } -#if 15 < LOG4CXX_ABI_VERSION void SocketAppenderSkeleton::setSocketSubclass(const LogString& newValue) { _priv->socketSubclass = newValue; @@ -331,4 +318,3 @@ const LogString& SocketAppenderSkeleton::getSocketSubclass() const { return _priv->socketSubclass; } -#endif \ No newline at end of file diff --git a/src/main/cpp/stringhelper.cpp b/src/main/cpp/stringhelper.cpp index 42ad3e32d..efcd3800c 100644 --- a/src/main/cpp/stringhelper.cpp +++ b/src/main/cpp/stringhelper.cpp @@ -214,8 +214,3 @@ LogString StringHelper::format(const LogString& pattern, const std::vector #include #include -#if LOG4CXX_ABI_VERSION <= 15 -#include -#endif #include #include #include @@ -311,12 +308,7 @@ void TelnetAppender::acceptConnections() try { SocketPtr newClient = _priv->serverSocket->accept(); -#if 15 < LOG4CXX_ABI_VERSION newClient->setNonBlocking(_priv->nonBlocking); -#else - if (auto p = dynamic_cast(newClient.get())) - p->setNonBlocking(_priv->nonBlocking); -#endif bool done = _priv->closed; if (done) diff --git a/src/main/cpp/threadlocal.cpp b/src/main/cpp/threadlocal.cpp index 9abb76129..ae6f28c4a 100644 --- a/src/main/cpp/threadlocal.cpp +++ b/src/main/cpp/threadlocal.cpp @@ -14,64 +14,3 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#if LOG4CXX_ABI_VERSION <= 15 - -#include "log4cxx/helpers/threadlocal.h" -#include "apr_thread_proc.h" -#include "log4cxx/helpers/exception.h" - -using namespace LOG4CXX_NS::helpers; -using namespace LOG4CXX_NS; - -apr_threadkey_t* ThreadLocal::create(Pool& p) -{ - apr_threadkey_t* key = 0; -#if APR_HAS_THREADS - apr_status_t stat = apr_threadkey_private_create(&key, 0, p.getAPRPool()); - - if (stat != APR_SUCCESS) - { - throw RuntimeException(stat); - } - -#endif - return key; -} - -ThreadLocal::ThreadLocal() : p(), key(create(p)) -{ -} - -ThreadLocal::~ThreadLocal() -{ -} - -void ThreadLocal::set(void* priv) -{ -#if APR_HAS_THREADS - apr_status_t stat = apr_threadkey_private_set(priv, key); - - if (stat != APR_SUCCESS) - { - throw RuntimeException(stat); - } - -#endif -} - -void* ThreadLocal::get() -{ - void* retval = 0; -#if APR_HAS_THREADS - apr_status_t stat = apr_threadkey_private_get(&retval, key); - - if (stat != APR_SUCCESS) - { - throw RuntimeException(stat); - } - -#endif - return retval; -} - -#endif // LOG4CXX_ABI_VERSION <= 15 diff --git a/src/main/cpp/transcoder.cpp b/src/main/cpp/transcoder.cpp index 4efd9da60..b58cd010d 100644 --- a/src/main/cpp/transcoder.cpp +++ b/src/main/cpp/transcoder.cpp @@ -66,18 +66,6 @@ void Transcoder::encodeUTF8(const LogString& src, std::string& dst) #endif } -#if LOG4CXX_ABI_VERSION <= 15 -char* Transcoder::encodeUTF8(const LogString& src, Pool& p) -{ -#if LOG4CXX_LOGCHAR_IS_UTF8 - return p.pstrdup(src); -#else - std::string tmp; - encodeUTF8(src, tmp); - return p.pstrdup(tmp); -#endif -} -#endif void Transcoder::encodeUTF8(unsigned int sv, ByteBuffer& dst) { @@ -190,18 +178,6 @@ void Transcoder::decode(const std::string& src, LogString& dst) #endif } -#if LOG4CXX_ABI_VERSION <= 15 -char* Transcoder::encode(const LogString& src, Pool& p) -{ -#if LOG4CXX_CHARSET_UTF8 && LOG4CXX_LOGCHAR_IS_UTF8 - return p.pstrdup(src); -#else - std::string tmp; - encode(src, tmp); - return p.pstrdup(tmp); -#endif -} -#endif void Transcoder::encode(const LogString& src, std::string& dst) @@ -349,21 +325,6 @@ void Transcoder::encode(const LogString& src, std::wstring& dst) #endif } -#if LOG4CXX_ABI_VERSION <= 15 -wchar_t* Transcoder::wencode(const LogString& src, Pool& p) -{ -#if LOG4CXX_LOGCHAR_IS_WCHAR - const std::wstring& tmp = src; -#else - std::wstring tmp; - encode(src, tmp); -#endif - wchar_t* dst = (wchar_t*) p.palloc((tmp.length() + 1) * sizeof(wchar_t)); - dst[tmp.length()] = 0; - std::memcpy(dst, tmp.data(), tmp.length() * sizeof(wchar_t)); - return dst; -} -#endif unsigned int Transcoder::decode(const std::wstring& in, std::wstring::const_iterator& iter) diff --git a/src/main/cpp/writer.cpp b/src/main/cpp/writer.cpp index fbb89bbe3..b869ba5f0 100644 --- a/src/main/cpp/writer.cpp +++ b/src/main/cpp/writer.cpp @@ -34,24 +34,6 @@ Writer::~Writer() { } -#if LOG4CXX_ABI_VERSION <= 15 -void Writer::close() -{ - Pool p; - close(p); -} -void Writer::flush() -{ - Pool p; - flush(p); -} -void Writer::write(const LogString& str) -{ - Pool p; - write(str, p); -} -#else void Writer::close(Pool&) { close(); } void Writer::flush(Pool&) { flush(); } void Writer::write(const LogString& str, Pool&) { write(str); } -#endif diff --git a/src/main/cpp/writerappender.cpp b/src/main/cpp/writerappender.cpp index c5650665d..92a80bd21 100644 --- a/src/main/cpp/writerappender.cpp +++ b/src/main/cpp/writerappender.cpp @@ -36,25 +36,11 @@ WriterAppender::WriterAppender() : { } -#if LOG4CXX_ABI_VERSION <= 15 -WriterAppender::WriterAppender(const LayoutPtr& layout, helpers::WriterPtr& writer) - : AppenderSkeleton (std::make_unique(layout, writer)) -{ - Pool p; - activateOptions(p); -} - -WriterAppender::WriterAppender(const LayoutPtr& layout) - : AppenderSkeleton (std::make_unique(layout)) -{ -} -#else WriterAppender::WriterAppender(const LayoutPtr& layout, const helpers::WriterPtr& writer) : AppenderSkeleton(std::make_unique(layout, writer)) { activateOptions(); } -#endif WriterAppender::WriterAppender(std::unique_ptr priv) : AppenderSkeleton (std::move(priv)) @@ -132,15 +118,6 @@ void WriterAppender::close() _priv->close(); } -#if LOG4CXX_ABI_VERSION <= 15 -/** - * Close the underlying {@link java.io.Writer}. - * */ -void WriterAppender::closeWriter() -{ - _priv->close(); -} -#endif void WriterAppender::WriterAppenderPriv::close() { @@ -236,17 +213,6 @@ void WriterAppender::subAppend( LOG4CXX_APPEND_FORMAL_PARAMETERS ) } -#if LOG4CXX_ABI_VERSION <= 15 -void WriterAppender::writeHeader(Pool& p) -{ - _priv->writeHeader(); -} - -void WriterAppender::writeFooter(Pool& p) -{ - _priv->writeFooter(); -} -#endif void WriterAppender::WriterAppenderPriv::writeFooter() { @@ -269,17 +235,6 @@ void WriterAppender::WriterAppenderPriv::writeHeader() } -#if LOG4CXX_ABI_VERSION <= 15 -void WriterAppender::setWriter(const WriterPtr& newWriter) -{ - _priv->setWriter(newWriter); -} - -void WriterAppender::setWriterInternal(const WriterPtr& newWriter) -{ - _priv->writer = newWriter; -} -#endif bool WriterAppender::requiresLayout() const { @@ -309,8 +264,3 @@ bool WriterAppender::getImmediateFlush() const return _priv->immediateFlush; } -#if LOG4CXX_ABI_VERSION <= 15 -const LOG4CXX_NS::helpers::WriterPtr WriterAppender::getWriter() const{ - return _priv->writer; -} -#endif diff --git a/src/main/cpp/xmlsocketappender.cpp b/src/main/cpp/xmlsocketappender.cpp index 60a2860a2..7367c89cf 100644 --- a/src/main/cpp/xmlsocketappender.cpp +++ b/src/main/cpp/xmlsocketappender.cpp @@ -23,22 +23,6 @@ using namespace LOG4CXX_NS; using namespace LOG4CXX_NS::net; -#if LOG4CXX_ABI_VERSION <= 15 -struct XMLSocketAppender::XMLSocketAppenderPriv : public SocketAppenderSkeletonPriv -{ - XMLSocketAppenderPriv(int defaultPort, int reconnectionDelay) : - SocketAppenderSkeletonPriv(defaultPort, reconnectionDelay) {} - - XMLSocketAppenderPriv(helpers::InetAddressPtr address, int defaultPort, int reconnectionDelay) : - SocketAppenderSkeletonPriv( address, defaultPort, reconnectionDelay ) {} - - XMLSocketAppenderPriv(const LogString& host, int port, int delay) : - SocketAppenderSkeletonPriv( host, port, delay ) {} - - LOG4CXX_NS::helpers::WriterPtr unused_writer; - -}; -#endif IMPLEMENT_LOG4CXX_OBJECT(XMLSocketAppender) @@ -50,9 +34,6 @@ int XMLSocketAppender::DEFAULT_PORT = 4560; // The default reconnection delay (30000 milliseconds or 30 seconds). int XMLSocketAppender::DEFAULT_RECONNECTION_DELAY = 30000; -#if LOG4CXX_ABI_VERSION <= 15 -const int XMLSocketAppender::MAX_EVENT_LEN = 1024; -#endif XMLSocketAppender::XMLSocketAppender() : SocketAppenderSkeleton(std::make_unique(DEFAULT_PORT, DEFAULT_RECONNECTION_DELAY)) @@ -60,11 +41,7 @@ XMLSocketAppender::XMLSocketAppender() _priv->layout = std::make_shared(); } -#if LOG4CXX_ABI_VERSION <= 15 -XMLSocketAppender::XMLSocketAppender(helpers::InetAddressPtr address1, int port1) -#else XMLSocketAppender::XMLSocketAppender(const helpers::InetAddressPtr& address1, int port1) -#endif : SocketAppenderSkeleton(std::make_unique(address1, port1, DEFAULT_RECONNECTION_DELAY)) { _priv->layout = std::make_shared(); @@ -93,19 +70,6 @@ int XMLSocketAppender::getDefaultPort() const return DEFAULT_PORT; } -#if LOG4CXX_ABI_VERSION <= 15 -void XMLSocketAppender::setSocket(LOG4CXX_NS::helpers::SocketPtr& socket, helpers::Pool& p) -{ - static auto silenceABIchecker = std::make_unique(DEFAULT_PORT, DEFAULT_RECONNECTION_DELAY); - _priv->setOutputSink(socket); -} - - -void XMLSocketAppender::cleanUp(helpers::Pool& p) -{ - _priv->close(); -} -#endif void XMLSocketAppender::append( LOG4CXX_APPEND_FORMAL_PARAMETERS ) { diff --git a/src/main/include/log4cxx/appender.h b/src/main/include/log4cxx/appender.h index 45878b5c3..fd1d2b2da 100644 --- a/src/main/include/log4cxx/appender.h +++ b/src/main/include/log4cxx/appender.h @@ -47,11 +47,7 @@ Implement this interface for your own strategies for outputting log statements. */ class LOG4CXX_EXPORT Appender -#if LOG4CXX_ABI_VERSION <= 15 - : public virtual spi::OptionHandler -#else : public spi::OptionHandler -#endif { public: DECLARE_ABSTRACT_LOG4CXX_OBJECT(Appender) @@ -88,17 +84,6 @@ class LOG4CXX_EXPORT Appender Loggers will call the doAppend method of appender implementations in order to log. */ -#if LOG4CXX_ABI_VERSION <= 15 -#define LOG4CXX_APPEND_FORMAL_PARAMETERS const spi::LoggingEventPtr& event, helpers::Pool& p -#define LOG4CXX_APPEND_PARAMETERS event, p - void doAppend(const spi::LoggingEventPtr& event); - /** - @deprecated The \c pool parameter is not used and will be removed in a future version. - Implement this method for now, but plan to migrate to doAppend() without a helpers::Pool parameter. - */ - virtual void doAppend(const spi::LoggingEventPtr& event, - LOG4CXX_NS::helpers::Pool& pool) = 0; -#else #define LOG4CXX_APPEND_FORMAL_PARAMETERS const spi::LoggingEventPtr& event #define LOG4CXX_APPEND_PARAMETERS event virtual void doAppend(const spi::LoggingEventPtr& event) = 0; @@ -107,7 +92,6 @@ class LOG4CXX_EXPORT Appender */ [[deprecated("Use doAppend() without a Pool parameter instead")]] void doAppend(const spi::LoggingEventPtr& event, helpers::Pool& pool); -#endif /** Get the name of this appender. The name uniquely identifies the diff --git a/src/main/include/log4cxx/appenderskeleton.h b/src/main/include/log4cxx/appenderskeleton.h index 679b91428..cee98c6d9 100644 --- a/src/main/include/log4cxx/appenderskeleton.h +++ b/src/main/include/log4cxx/appenderskeleton.h @@ -36,12 +36,7 @@ namespace LOG4CXX_NS * support for threshold filtering and support for general filters. * */ class LOG4CXX_EXPORT AppenderSkeleton -#if LOG4CXX_ABI_VERSION <= 15 - : public virtual Appender - , public virtual helpers::Object -#else : public Appender -#endif { protected: LOG4CXX_DECLARE_PRIVATE_MEMBER_PTR(AppenderSkeletonPrivate, m_priv) @@ -77,14 +72,6 @@ class LOG4CXX_EXPORT AppenderSkeleton AppenderSkeleton(const LayoutPtr& layout); virtual ~AppenderSkeleton(); -#if LOG4CXX_ABI_VERSION <= 15 - /** - Finalize this appender by calling the derived class' - close method. - */ - [[ deprecated( "The derived appender destructor needs to implement its cleanup" ) ]] - void finalize(); -#endif using spi::OptionHandler::activateOptions; /** diff --git a/src/main/include/log4cxx/asyncappender.h b/src/main/include/log4cxx/asyncappender.h index 20c01d797..2f9ad42b6 100644 --- a/src/main/include/log4cxx/asyncappender.h +++ b/src/main/include/log4cxx/asyncappender.h @@ -89,11 +89,7 @@ See AsyncAppender::setOption for details. */ class LOG4CXX_EXPORT AsyncAppender : public virtual spi::AppenderAttachable, -#if LOG4CXX_ABI_VERSION <= 15 - public virtual AppenderSkeleton -#else public AppenderSkeleton -#endif { protected: struct AsyncAppenderPriv; @@ -157,12 +153,6 @@ class LOG4CXX_EXPORT AsyncAppender : */ AppenderPtr getAppender(const LogString& name) const override; -#if LOG4CXX_ABI_VERSION <= 15 - /** - * The current value of the (unused) LocationInfo option. - */ - bool getLocationInfo() const; -#endif /** * Determines if specified appender is attached. * @param appender appender. @@ -201,14 +191,6 @@ class LOG4CXX_EXPORT AsyncAppender : */ void replaceAppenders(const AppenderList& newList) LOG4CXX_16_VIRTUAL_SPECIFIER; -#if LOG4CXX_ABI_VERSION <= 15 - /** - * The LocationInfo attribute is provided for compatibility - * with log4j and has no effect on the log output. - * @param flag new value. - */ - void setLocationInfo(bool flag); -#endif /** * Use \c newSize (a non-negative integer value) for * the number of [logging events](@ref spi::LoggingEvent) the ring buffer can hold. diff --git a/src/main/include/log4cxx/config/propertysetter.h b/src/main/include/log4cxx/config/propertysetter.h index 28926a6b6..70726a56b 100644 --- a/src/main/include/log4cxx/config/propertysetter.h +++ b/src/main/include/log4cxx/config/propertysetter.h @@ -102,28 +102,6 @@ class LOG4CXX_EXPORT PropertySetter void activate(); -#if LOG4CXX_ABI_VERSION <= 15 - /** - @deprecated The \c pool parameter is not used and will be removed in a future version. - */ - [[deprecated("Use setProperties() without a Pool parameter instead")]] - static void setProperties(const helpers::ObjectPtr& obj, helpers::Properties& properties, const LogString& prefix, helpers::Pool& p); - /** - @deprecated The \c pool parameter is not used and will be removed in a future version. - */ - [[deprecated("Use setProperties() without a Pool parameter instead")]] - void setProperties(helpers::Properties& properties, const LogString& prefix, helpers::Pool& p); - /** - @deprecated The \c pool parameter is not used and will be removed in a future version. - */ - [[deprecated("Use setProperty() without a Pool parameter instead")]] - void setProperty(const LogString& option, const LogString& value, helpers::Pool& p); - /** - @deprecated The \c pool parameter is not used and will be removed in a future version. - */ - [[deprecated("Use activate() without a Pool parameter instead")]] - void activate(helpers::Pool& p); -#endif }; // class PropertySetter } // namespace config; } // namespace log4cxx diff --git a/src/main/include/log4cxx/db/odbcappender.h b/src/main/include/log4cxx/db/odbcappender.h index bbcfb8c76..7eb1923c1 100644 --- a/src/main/include/log4cxx/db/odbcappender.h +++ b/src/main/include/log4cxx/db/odbcappender.h @@ -187,20 +187,6 @@ class LOG4CXX_EXPORT ODBCAppender : public AppenderSkeleton void append( LOG4CXX_APPEND_FORMAL_PARAMETERS ) override; protected: -#if LOG4CXX_ABI_VERSION <= 15 - /** - * To be removed. - */ - LogString getLogStatement(const spi::LoggingEventPtr& event, - helpers::Pool& p) const; - - /** - * - * To be removed. - * */ - virtual void execute(const LogString& sql, - LOG4CXX_NS::helpers::Pool& p) /*throw(SQLException)*/; -#endif /** * Override this to return the connection to a pool, or to clean up the * resource. diff --git a/src/main/include/log4cxx/defaultloggerfactory.h b/src/main/include/log4cxx/defaultloggerfactory.h index 67f960550..3681e733c 100644 --- a/src/main/include/log4cxx/defaultloggerfactory.h +++ b/src/main/include/log4cxx/defaultloggerfactory.h @@ -26,21 +26,6 @@ namespace LOG4CXX_NS class Logger; typedef std::shared_ptr LoggerPtr; -#if LOG4CXX_ABI_VERSION <= 15 -class LOG4CXX_EXPORT DefaultLoggerFactory : - public virtual spi::LoggerFactory, - public virtual helpers::Object -{ - public: - DECLARE_ABSTRACT_LOG4CXX_OBJECT(DefaultLoggerFactory) - BEGIN_LOG4CXX_CAST_MAP() - LOG4CXX_CAST_ENTRY(spi::LoggerFactory) - END_LOG4CXX_CAST_MAP() - - [[ deprecated( "Pool is no longer required" ) ]] - LoggerPtr makeNewLoggerInstance(helpers::Pool& pool, const LogString& name) const override; -}; -#endif } // namespace log4cxx #endif //_LOG4CXX_DEFAULT_LOGGER_FACTORY_H diff --git a/src/main/include/log4cxx/file.h b/src/main/include/log4cxx/file.h index 6b582e786..53be4f5d8 100644 --- a/src/main/include/log4cxx/file.h +++ b/src/main/include/log4cxx/file.h @@ -133,19 +133,6 @@ class LOG4CXX_EXPORT File */ File& setPath(const LogString& newVAlue); -#if LOG4CXX_ABI_VERSION <= 15 - /** - * Open this file. - * See apr_file_open for details. - * @param file allocated APR file handle. - * @param flags flags. - * @param perm permissions. - * @return APR_SUCCESS if successful. - * @deprecated This function is deprecated and will be removed in a future version. - */ - [[ deprecated( "open is no longer supported" ) ]] - log4cxx_status_t open(apr_file_t** file, int flags, int perm, helpers::Pool& p) const; -#endif /** * List files if current file is a directory. @@ -190,32 +177,6 @@ class LOG4CXX_EXPORT File */ bool getAutoDelete() const; -#if LOG4CXX_ABI_VERSION <= 15 - /// @deprecated This function is deprecated and will be removed in a future version. - [[ deprecated( "Pool is no longer required" ) ]] - bool exists(helpers::Pool& p) const; - /// @deprecated This function is deprecated and will be removed in a future version. - [[ deprecated( "Pool is no longer required" ) ]] - size_t length(helpers::Pool& p) const; - /// @deprecated This function is deprecated and will be removed in a future version. - [[ deprecated( "Pool is no longer required" ) ]] - log4cxx_time_t lastModified(helpers::Pool& p) const; - /// @deprecated This function is deprecated and will be removed in a future version. - [[ deprecated( "Pool is no longer required" ) ]] - std::vector list(helpers::Pool& p) const; - /// @deprecated This function is deprecated and will be removed in a future version. - [[ deprecated( "Pool is no longer required" ) ]] - bool deleteFile(helpers::Pool& p) const; - /// @deprecated This function is deprecated and will be removed in a future version. - [[ deprecated( "Pool is no longer required" ) ]] - bool renameTo(const File& dest, helpers::Pool& p) const; - /// @deprecated This function is deprecated and will be removed in a future version. - [[ deprecated( "Pool is no longer required" ) ]] - LogString getParent(helpers::Pool& p) const; - /// @deprecated This function is deprecated and will be removed in a future version. - [[ deprecated( "Pool is no longer required" ) ]] - bool mkdirs(helpers::Pool& p) const; -#endif private: LOG4CXX_DECLARE_PRIVATE_MEMBER_PTR(FilePrivate, m_priv) }; diff --git a/src/main/include/log4cxx/fileappender.h b/src/main/include/log4cxx/fileappender.h index 1649c0da1..45c86b912 100644 --- a/src/main/include/log4cxx/fileappender.h +++ b/src/main/include/log4cxx/fileappender.h @@ -245,12 +245,6 @@ class LOG4CXX_EXPORT FileAppender : public WriterAppender void setFileInternal(const LogString& file); -#if LOG4CXX_ABI_VERSION <= 15 - void activateOptionsInternal(helpers::Pool& p); - void setFileInternal(const LogString& file, bool append, - bool bufferedIO, size_t bufferSize, - helpers::Pool& p); -#endif private: FileAppender(const FileAppender&); FileAppender& operator=(const FileAppender&); diff --git a/src/main/include/log4cxx/helpers/appenderattachableimpl.h b/src/main/include/log4cxx/helpers/appenderattachableimpl.h index fceb77f17..8ea488a63 100644 --- a/src/main/include/log4cxx/helpers/appenderattachableimpl.h +++ b/src/main/include/log4cxx/helpers/appenderattachableimpl.h @@ -45,10 +45,6 @@ class LOG4CXX_EXPORT AppenderAttachableImpl : * Create new instance. */ AppenderAttachableImpl(); -#if LOG4CXX_ABI_VERSION <= 15 - [[ deprecated( "Pool is no longer required" ) ]] - AppenderAttachableImpl(Pool& pool); -#endif ~AppenderAttachableImpl(); DECLARE_ABSTRACT_LOG4CXX_OBJECT(AppenderAttachableImpl) @@ -63,15 +59,6 @@ class LOG4CXX_EXPORT AppenderAttachableImpl : */ void addAppender(const AppenderPtr newAppender) override; -#if LOG4CXX_ABI_VERSION <= 15 - /** - Call the doAppend method on all attached appenders. - @deprecated This function is deprecated and will be removed in a future version. - */ - [[ deprecated( "Pool is no longer required" ) ]] - int appendLoopOnAppenders(const spi::LoggingEventPtr& event, - LOG4CXX_NS::helpers::Pool& p); -#endif /** Send \c event to all attached appenders. */ diff --git a/src/main/include/log4cxx/helpers/aprinitializer.h b/src/main/include/log4cxx/helpers/aprinitializer.h index 18e9c7e03..9acd90d18 100644 --- a/src/main/include/log4cxx/helpers/aprinitializer.h +++ b/src/main/include/log4cxx/helpers/aprinitializer.h @@ -35,31 +35,14 @@ namespace LOG4CXX_NS { namespace helpers { -#if LOG4CXX_ABI_VERSION <= 15 -class FileWatchdog; -#endif class APRInitializer { public: -#if LOG4CXX_ABI_VERSION <= 15 - static log4cxx_time_t initialize(); - static bool isDestructed; -#endif static apr_pool_t* getRootPool(); static log4cxx_time_t getStartTime(); static apr_threadkey_t* getTlsKey(); -#if LOG4CXX_ABI_VERSION <= 15 - /** - * Register a FileWatchdog for deletion prior to termination. - * FileWatchdog must be - * allocated on heap and not deleted elsewhere. - */ - static void registerCleanup(FileWatchdog* watchdog); - static void unregisterCleanup(FileWatchdog* watchdog); - static void unregisterAll(); -#endif /** * Store a single instance type ObjectPtr for deletion prior to termination */ diff --git a/src/main/include/log4cxx/helpers/asyncbuffer.h b/src/main/include/log4cxx/helpers/asyncbuffer.h index 49e3d290a..3583f408f 100644 --- a/src/main/include/log4cxx/helpers/asyncbuffer.h +++ b/src/main/include/log4cxx/helpers/asyncbuffer.h @@ -258,15 +258,6 @@ class LOG4CXX_EXPORT AsyncBuffer #endif // LOG4CXX_WCHAR_T_API || LOG4CXX_LOGCHAR_IS_WCHAR #endif // LOG4CXX_ASYNC_BUFFER_SUPPORTS_FMT -#if LOG4CXX_ABI_VERSION <= 15 -#if LOG4CXX_ASYNC_BUFFER_SUPPORTS_FMT - void initializeForFmt(StringViewType&& format_string, FmtArgStore&& args); - -#if LOG4CXX_WCHAR_T_API || LOG4CXX_LOGCHAR_IS_WCHAR - void initializeForFmt(WideStringViewType&& format_string, WideFmtArgStore&& args); -#endif // LOG4CXX_WCHAR_T_API || LOG4CXX_LOGCHAR_IS_WCHAR -#endif // LOG4CXX_ASYNC_BUFFER_SUPPORTS_FMT -#endif // LOG4CXX_ABI_VERSION <= 15 }; } // namespace helpers diff --git a/src/main/include/log4cxx/helpers/bytebuffer.h b/src/main/include/log4cxx/helpers/bytebuffer.h index 670c47c2f..0d805985f 100644 --- a/src/main/include/log4cxx/helpers/bytebuffer.h +++ b/src/main/include/log4cxx/helpers/bytebuffer.h @@ -75,15 +75,6 @@ class LOG4CXX_EXPORT ByteBuffer /// Intially this is the capacity of the buffer. size_t limit() const; -#if LOG4CXX_ABI_VERSION <= 15 - /// Use \c newLimit as the extent to which the cursor can advance. - /// If \c newLimit exceeds the memory capacity, an exception is thrown. - /// If the current cursor is currently beyond \c newLimit - /// the cursor is changed to be at \c newLimit. - /// @deprecated This function is deprecated and will be removed in a future version. - [[ deprecated( "Use flip instead" ) ]] - void limit(size_t newLimit); -#endif /// The offset of the current cursor from the start of the memory area. size_t position() const; @@ -92,14 +83,6 @@ class LOG4CXX_EXPORT ByteBuffer /// until the cursor can no longer advance. size_t remaining() const; -#if LOG4CXX_ABI_VERSION <= 15 - /// Use \c newPosition as the cursor position - /// providing it is less than the extent to which the cursor can advance, - /// otherwise set the cursor to the extent to which the cursor can advance. - /// @deprecated This function is deprecated and will be removed in a future version. - [[ deprecated( "Use increment_position instead" ) ]] - void position(size_t newPosition); -#endif /// Advance the cursor by \c byteCount /// if that does not exceed the extent to which the cursor can advance, /// otherwise set the cursor to the extent to which the cursor can advance. diff --git a/src/main/include/log4cxx/helpers/cacheddateformat.h b/src/main/include/log4cxx/helpers/cacheddateformat.h index 9a71665e9..54996dbba 100644 --- a/src/main/include/log4cxx/helpers/cacheddateformat.h +++ b/src/main/include/log4cxx/helpers/cacheddateformat.h @@ -108,13 +108,6 @@ class LOG4CXX_EXPORT CachedDateFormat : public helpers::DateFormat static int findMillisecondStart( log4cxx_time_t time, const LogString& formatted, const helpers::DateFormatPtr& formatter); -#if LOG4CXX_ABI_VERSION <= 15 - [[deprecated("Use findMillisecondStart() without a Pool parameter instead")]] - static int findMillisecondStart( - log4cxx_time_t time, const LogString& formatted, - const LOG4CXX_NS::helpers::DateFormatPtr& formatter, - LOG4CXX_NS::helpers::Pool& pool); -#endif using DateFormat::format; /** * Formats a Date into a date/time string. diff --git a/src/main/include/log4cxx/helpers/charsetencoder.h b/src/main/include/log4cxx/helpers/charsetencoder.h index 4e971cb23..8d6733888 100644 --- a/src/main/include/log4cxx/helpers/charsetencoder.h +++ b/src/main/include/log4cxx/helpers/charsetencoder.h @@ -97,24 +97,16 @@ class LOG4CXX_EXPORT CharsetEncoder : public Object LogString::const_iterator& iter, ByteBuffer& out) = 0; -#if 15 < LOG4CXX_ABI_VERSION /** * Add onto \c out an encoded equivalent of \c codePoint. * @return APR_SUCCESS unless \c codePoint cannot be represented by this charset or \c out is full. */ virtual log4cxx_status_t encode(unsigned int codePoint, ByteBuffer& out) = 0; -#endif /** * Resets any internal state. */ virtual void reset(); -#if LOG4CXX_ABI_VERSION <= 15 - /** - * Flushes the encoder. - */ - virtual void flush(ByteBuffer& out); -#endif /** * Determines if the return value from encode indicates diff --git a/src/main/include/log4cxx/helpers/class.h b/src/main/include/log4cxx/helpers/class.h index d631745f5..028b2f13e 100644 --- a/src/main/include/log4cxx/helpers/class.h +++ b/src/main/include/log4cxx/helpers/class.h @@ -33,10 +33,6 @@ class LOG4CXX_EXPORT Class public: virtual ~Class(); virtual Object* newInstance() const; -#if LOG4CXX_ABI_VERSION <= 15 - [[ deprecated( "Use getName() instead" ) ]] - LogString toString() const; -#endif virtual LogString getName() const = 0; static const Class& forName(const LogString& className); static bool registerClass(const Class& newClass); diff --git a/src/main/include/log4cxx/helpers/datagrampacket.h b/src/main/include/log4cxx/helpers/datagrampacket.h index ee1519411..e5d41c9ad 100644 --- a/src/main/include/log4cxx/helpers/datagrampacket.h +++ b/src/main/include/log4cxx/helpers/datagrampacket.h @@ -45,26 +45,6 @@ class LOG4CXX_EXPORT DatagramPacket : public helpers::Object LOG4CXX_CAST_ENTRY(DatagramPacket) END_LOG4CXX_CAST_MAP() -#if LOG4CXX_ABI_VERSION <= 15 - /** Constructs a DatagramPacket for receiving packets of length - length. */ - DatagramPacket(void* buf, int length); - - /** Constructs a datagram packet for sending packets of length - length to the specified port number on the specified - host. */ - DatagramPacket(void* buf, int length, InetAddressPtr address, int port); - - /** Constructs a DatagramPacket for receiving packets of length - length, specifying an offset into the buffer. */ - DatagramPacket(void* buf, int offset, int length); - - /** Constructs a datagram packet for sending packets of length - length with offset offset to the - specified port number on the specified host. */ - DatagramPacket(void* buf, int offset, int length, InetAddressPtr address, - int port); -#else /** Constructs a DatagramPacket for receiving packets of length length. */ DatagramPacket(void* buf, std::size_t length); @@ -83,7 +63,6 @@ class LOG4CXX_EXPORT DatagramPacket : public helpers::Object specified port number on the specified host. */ DatagramPacket(void* buf, std::size_t offset, std::size_t length, InetAddressPtr address, int port); -#endif ~DatagramPacket(); @@ -94,15 +73,6 @@ class LOG4CXX_EXPORT DatagramPacket : public helpers::Object /** Returns the data received or the data to be sent. */ void* getData() const; -#if LOG4CXX_ABI_VERSION <= 15 - /** Returns the length of the data to be sent or the length of the - data received. */ - int getLength() const; - - /** Returns the offset of the data to be sent or the offset of the - data received. */ - int getOffset() const; -#else /** Returns the length of the data to be sent or the length of the data received. */ std::size_t getLength() const; @@ -110,7 +80,6 @@ class LOG4CXX_EXPORT DatagramPacket : public helpers::Object /** Returns the offset of the data to be sent or the offset of the data received. */ std::size_t getOffset() const; -#endif /** Returns the port number on the remote host to which this datagram is being sent or from which the datagram was received. */ @@ -121,19 +90,11 @@ class LOG4CXX_EXPORT DatagramPacket : public helpers::Object /** Set the data buffer for this packet. */ void setData(void* buf1); -#if LOG4CXX_ABI_VERSION <= 15 - /** Set the data buffer for this packet. */ - void setData(void* buf1, int offset1, int length1); - - /** Set the length for this packet. */ - void setLength(int length1); -#else /** Set the data buffer for this packet. */ void setData(void* buf1, std::size_t offset1, std::size_t length1); /** Set the length for this packet. */ void setLength(std::size_t length1); -#endif void setPort(int port1); diff --git a/src/main/include/log4cxx/helpers/dateformat.h b/src/main/include/log4cxx/helpers/dateformat.h index a2f8e9d31..f8680622d 100644 --- a/src/main/include/log4cxx/helpers/dateformat.h +++ b/src/main/include/log4cxx/helpers/dateformat.h @@ -48,15 +48,6 @@ class LOG4CXX_EXPORT DateFormat : public Object * @param toAppendTo string to which the date/time string is appended. * @param tm date to be formatted. */ -#if LOG4CXX_ABI_VERSION <= 15 -#define LOG4CXX_FORMAT_TIME_FORMAL_PARAMETERS LogString& toAppendTo, log4cxx_time_t tm, helpers::Pool& p - void format(LogString& toAppendTo, log4cxx_time_t tm) const; - /** - @deprecated The \c pool parameter is not used and will be removed in a future version. - Implement this method for now, but plan to migrate to format() without a helpers::Pool parameter. - */ - virtual void format(LogString& toAppendTo, log4cxx_time_t tm, LOG4CXX_NS::helpers::Pool& p) const = 0; -#else #define LOG4CXX_FORMAT_TIME_FORMAL_PARAMETERS LogString& toAppendTo, log4cxx_time_t tm virtual void format(LogString& toAppendTo, log4cxx_time_t tm) const = 0; /** @@ -64,7 +55,6 @@ class LOG4CXX_EXPORT DateFormat : public Object */ [[deprecated("Use format() without a Pool parameter instead")]] void format(LogString& toAppendTo, log4cxx_time_t tm, helpers::Pool& p) const; -#endif /** * Sets the time zone. @@ -80,15 +70,6 @@ class LOG4CXX_EXPORT DateFormat : public Object * @remarks This method is used by CachedDateFormat to * format the milliseconds. */ -#if LOG4CXX_ABI_VERSION <= 15 - void numberFormat(LogString& toAppendTo, int n) const; - /** - @deprecated The \c pool parameter is not used and will be removed in a future version. - */ - [[deprecated("Use numberFormat() without a Pool parameter instead")]] - virtual void numberFormat(LogString& toAppendTo, int n, LOG4CXX_NS::helpers::Pool& p) const; -#define LOG4CXX_FORMAT_NUMBER_FORMAL_PARAMETERS LogString& toAppendTo, int n, helpers::Pool& p -#else virtual void numberFormat(LogString& toAppendTo, int n) const; #define LOG4CXX_FORMAT_NUMBER_FORMAL_PARAMETERS LogString& toAppendTo, int n /** @@ -96,7 +77,6 @@ class LOG4CXX_EXPORT DateFormat : public Object */ [[deprecated("Use numberFormat() without a Pool parameter instead")]] void numberFormat(LogString& toAppendTo, int n, helpers::Pool& p) const; -#endif protected: /** diff --git a/src/main/include/log4cxx/helpers/onlyonceerrorhandler.h b/src/main/include/log4cxx/helpers/onlyonceerrorhandler.h index 2a5c7aeff..962badd2a 100644 --- a/src/main/include/log4cxx/helpers/onlyonceerrorhandler.h +++ b/src/main/include/log4cxx/helpers/onlyonceerrorhandler.h @@ -36,12 +36,7 @@ first error in an appender and ignoring all following errors. from being flooded with error messages when logging fails */ class LOG4CXX_EXPORT OnlyOnceErrorHandler -#if LOG4CXX_ABI_VERSION <= 15 - : public virtual spi::ErrorHandler - , public virtual helpers::Object -#else : public spi::ErrorHandler -#endif { private: LOG4CXX_DECLARE_PRIVATE_MEMBER_PTR(OnlyOnceErrorHandlerPrivate, m_priv) @@ -49,13 +44,8 @@ class LOG4CXX_EXPORT OnlyOnceErrorHandler public: DECLARE_LOG4CXX_OBJECT(OnlyOnceErrorHandler) BEGIN_LOG4CXX_CAST_MAP() -#if 15 < LOG4CXX_ABI_VERSION LOG4CXX_CAST_ENTRY(OnlyOnceErrorHandler) LOG4CXX_CAST_ENTRY_CHAIN(spi::ErrorHandler) -#else - LOG4CXX_CAST_ENTRY(spi::OptionHandler) - LOG4CXX_CAST_ENTRY(spi::ErrorHandler) -#endif END_LOG4CXX_CAST_MAP() OnlyOnceErrorHandler(); @@ -68,14 +58,6 @@ class LOG4CXX_EXPORT OnlyOnceErrorHandler void setLogger(const LoggerPtr& logger) override; -#if LOG4CXX_ABI_VERSION <= 15 - /** - \copybrief spi::OptionHandler::activateOptions() - - No action is performed in this implementation. - */ - void activateOptions(helpers::Pool& p) override; -#endif /** \copybrief spi::OptionHandler::setOption() @@ -117,11 +99,7 @@ class LOG4CXX_EXPORT OnlyOnceErrorHandler /** Has an error been reported? */ -#if 15 < LOG4CXX_ABI_VERSION bool errorReported() const override; -#else - bool errorReported() const; -#endif }; } // namespace helpers } // namespace log4cxx diff --git a/src/main/include/log4cxx/helpers/outputstream.h b/src/main/include/log4cxx/helpers/outputstream.h index d7675e6c1..d3a96ba7a 100644 --- a/src/main/include/log4cxx/helpers/outputstream.h +++ b/src/main/include/log4cxx/helpers/outputstream.h @@ -43,29 +43,6 @@ class LOG4CXX_EXPORT OutputStream : public Object virtual ~OutputStream(); public: -#if LOG4CXX_ABI_VERSION <= 15 - void close(); - void flush(); - void write(ByteBuffer& buf); - /** - @deprecated The \c pool parameter is not used and will be removed in a future version. - Implement this method for now, but plan to migrate to close() without a helpers::Pool parameter. - */ - virtual void close(Pool& p) = 0; -#define LOG4CXX_CLOSE_OUTPUT_STREAM_FORMAL_PARAMETERS helpers::Pool& p - /** - @deprecated The \c pool parameter is not used and will be removed in a future version. - Implement this method for now, but plan to migrate to flush() without a helpers::Pool parameter. - */ - virtual void flush(Pool& p) = 0; -#define LOG4CXX_FLUSH_OUTPUT_STREAM_FORMAL_PARAMETERS helpers::Pool& p - /** - @deprecated The \c pool parameter is not used and will be removed in a future version. - Implement this method for now, but plan to migrate to write() without a helpers::Pool parameter. - */ - virtual void write(ByteBuffer& buf, Pool& p) = 0; -#define LOG4CXX_WRITE_OUTPUT_STREAM_FORMAL_PARAMETERS ByteBuffer& buf, helpers::Pool& p -#else virtual void close() = 0; #define LOG4CXX_CLOSE_OUTPUT_STREAM_FORMAL_PARAMETERS virtual void flush() = 0; @@ -87,7 +64,6 @@ class LOG4CXX_EXPORT OutputStream : public Object */ [[deprecated("Use write() without a Pool parameter instead")]] void write(ByteBuffer& buf, Pool& p); -#endif private: OutputStream(const OutputStream&); diff --git a/src/main/include/log4cxx/helpers/outputstreamwriter.h b/src/main/include/log4cxx/helpers/outputstreamwriter.h index 623bacce8..554084ae9 100644 --- a/src/main/include/log4cxx/helpers/outputstreamwriter.h +++ b/src/main/include/log4cxx/helpers/outputstreamwriter.h @@ -22,11 +22,7 @@ #include #include -#if 15 < LOG4CXX_ABI_VERSION #define LOG4CXX_16_CONST const -#else -#define LOG4CXX_16_CONST -#endif namespace LOG4CXX_NS { diff --git a/src/main/include/log4cxx/helpers/properties.h b/src/main/include/log4cxx/helpers/properties.h index 2a82ad29d..5f9eb0cf4 100644 --- a/src/main/include/log4cxx/helpers/properties.h +++ b/src/main/include/log4cxx/helpers/properties.h @@ -33,11 +33,7 @@ class LOG4CXX_EXPORT Properties { private: template struct Less; -#if LOG4CXX_ABI_VERSION < 15 - using PropertyMap = std::map; -#else using PropertyMap = std::map >; -#endif PropertyMap* properties; public: // ...structors diff --git a/src/main/include/log4cxx/helpers/reader.h b/src/main/include/log4cxx/helpers/reader.h index 05c1cd2a9..0e7ca923c 100644 --- a/src/main/include/log4cxx/helpers/reader.h +++ b/src/main/include/log4cxx/helpers/reader.h @@ -47,30 +47,6 @@ class LOG4CXX_EXPORT Reader : public Object virtual ~Reader(); public: -#if LOG4CXX_ABI_VERSION <= 15 - /** - * Closes the stream. - */ - void close(); - - /** - * @return The complete stream contents as a LogString. - */ - LogString read(); - - /** - @deprecated The \c pool parameter is not used and will be removed in a future version. - Implement this method for now, but plan to migrate to close() without a helpers::Pool parameter. - */ - virtual void close(Pool& p) = 0; -#define LOG4CXX_CLOSE_READER_FORMAL_PARAMETERS helpers::Pool& p - /** - @deprecated The \c pool parameter is not used and will be removed in a future version. - Implement this method for now, but plan to migrate to read() without a helpers::Pool parameter. - */ - virtual LogString read(Pool& p) = 0; -#define LOG4CXX_READ_READER_FORMAL_PARAMETERS helpers::Pool& p -#else /** * Closes the stream. */ @@ -92,7 +68,6 @@ class LOG4CXX_EXPORT Reader : public Object */ [[deprecated("Use read() without a Pool parameter instead")]] LogString read(Pool& p); -#endif private: Reader(const Reader&); diff --git a/src/main/include/log4cxx/helpers/serversocket.h b/src/main/include/log4cxx/helpers/serversocket.h index 1e6ec371d..95541ddcc 100644 --- a/src/main/include/log4cxx/helpers/serversocket.h +++ b/src/main/include/log4cxx/helpers/serversocket.h @@ -57,12 +57,7 @@ class LOG4CXX_EXPORT ServerSocket */ void setSoTimeout(int timeout); -#if LOG4CXX_ABI_VERSION <= 15 - static ServerSocketUniquePtr create(int port); - static ServerSocketUniquePtr create(int port, bool reuseAddress, const LogString& hostname); -#else static ServerSocketUniquePtr create(int port, bool reuseAddress = false, const LogString& hostname = {}); -#endif }; } // namespace helpers diff --git a/src/main/include/log4cxx/helpers/socket.h b/src/main/include/log4cxx/helpers/socket.h index a46af82d4..37230c697 100644 --- a/src/main/include/log4cxx/helpers/socket.h +++ b/src/main/include/log4cxx/helpers/socket.h @@ -21,11 +21,7 @@ #include #include -#if 15 < LOG4CXX_ABI_VERSION #define LOG4CXX_16_CONST const -#else -#define LOG4CXX_16_CONST -#endif namespace LOG4CXX_NS @@ -59,7 +55,6 @@ class LOG4CXX_EXPORT Socket : public helpers::Object virtual size_t write(ByteBuffer&) = 0; -#if 15 < LOG4CXX_ABI_VERSION /** Use \c newValue for the behaviour when the network buffer (on an accepted socket connection) is full. @@ -72,7 +67,6 @@ class LOG4CXX_EXPORT Socket : public helpers::Object /// Is this available for use? virtual bool is_open() = 0; -#endif /** Close this socket. */ virtual void close() = 0; @@ -88,12 +82,7 @@ class LOG4CXX_EXPORT Socket : public helpers::Object /** Create a concrete instance of this class */ -#if LOG4CXX_ABI_VERSION <= 15 - static SocketUniquePtr create(InetAddressPtr& address, int port); - static SocketUniquePtr create(LOG4CXX_16_CONST InetAddressPtr& address, int port, const LogString& concreteClassName); -#else static SocketUniquePtr create(const InetAddressPtr& address, int port, const LogString& concreteClassName = {}); -#endif private: Socket(const Socket&); Socket& operator=(const Socket&); @@ -103,10 +92,6 @@ class LOG4CXX_EXPORT Socket : public helpers::Object } // namespace helpers } // namespace log4cxx -#if 15 < LOG4CXX_ABI_VERSION #define LOG4CXX_16_VIRTUAL_SPECIFIER override -#else -#define LOG4CXX_16_VIRTUAL_SPECIFIER -#endif #endif // _LOG4CXX_HELPERS_SOCKET_H diff --git a/src/main/include/log4cxx/helpers/stringhelper.h b/src/main/include/log4cxx/helpers/stringhelper.h index d0d2d1ac6..de9be3651 100644 --- a/src/main/include/log4cxx/helpers/stringhelper.h +++ b/src/main/include/log4cxx/helpers/stringhelper.h @@ -26,9 +26,6 @@ namespace LOG4CXX_NS { namespace helpers { -#if LOG4CXX_ABI_VERSION <= 15 -class Pool; -#endif /** String manipulation routines */ @@ -53,17 +50,6 @@ class LOG4CXX_EXPORT StringHelper /// See std::stoll for more details. static int64_t toInt64(const LogString& s); -#if LOG4CXX_ABI_VERSION <= 15 - /// @deprecated This function is deprecated and will be removed in a future version. - [[ deprecated( "Pool is no longer required" ) ]] - static void toString(int i, Pool& pool, LogString& dst); - /// @deprecated This function is deprecated and will be removed in a future version. - [[ deprecated( "Pool is no longer required" ) ]] - static void toString(int64_t i, Pool& pool, LogString& dst); - /// @deprecated This function is deprecated and will be removed in a future version. - [[ deprecated( "Pool is no longer required" ) ]] - static void toString(size_t i, Pool& pool, LogString& dst); -#endif /// Append a textual version of \c i to \c dst. static void toString(int i, LogString& dst); /// Append a textual version of \c i to \c dst. diff --git a/src/main/include/log4cxx/helpers/systemerrwriter.h b/src/main/include/log4cxx/helpers/systemerrwriter.h index 1107ecb3c..bbbf5b2ec 100644 --- a/src/main/include/log4cxx/helpers/systemerrwriter.h +++ b/src/main/include/log4cxx/helpers/systemerrwriter.h @@ -47,10 +47,6 @@ class LOG4CXX_EXPORT SystemErrWriter : public Writer using Writer::write; void write( LOG4CXX_WRITE_WRITER_FORMAL_PARAMETERS ) override; -#if LOG4CXX_ABI_VERSION <= 15 - static void write(const LogString& str); - static void flush(); -#endif private: SystemErrWriter(const SystemErrWriter&); SystemErrWriter& operator=(const SystemErrWriter&); diff --git a/src/main/include/log4cxx/helpers/systemoutwriter.h b/src/main/include/log4cxx/helpers/systemoutwriter.h index 6e4f9e06f..f825cd697 100644 --- a/src/main/include/log4cxx/helpers/systemoutwriter.h +++ b/src/main/include/log4cxx/helpers/systemoutwriter.h @@ -47,10 +47,6 @@ class LOG4CXX_EXPORT SystemOutWriter : public Writer using Writer::write; void write( LOG4CXX_WRITE_WRITER_FORMAL_PARAMETERS ) override; -#if LOG4CXX_ABI_VERSION <= 15 - static void write(const LogString& str); - static void flush(); -#endif private: SystemOutWriter(const SystemOutWriter&); SystemOutWriter& operator=(const SystemOutWriter&); diff --git a/src/main/include/log4cxx/helpers/threadlocal.h b/src/main/include/log4cxx/helpers/threadlocal.h index 5c27a92b1..576d401d2 100644 --- a/src/main/include/log4cxx/helpers/threadlocal.h +++ b/src/main/include/log4cxx/helpers/threadlocal.h @@ -17,75 +17,5 @@ #ifndef _LOG4CXX_HELPERS_THREAD_LOCAL_H #define _LOG4CXX_HELPERS_THREAD_LOCAL_H -#if LOG4CXX_ABI_VERSION <= 15 - -#include -#include - -#if !defined(LOG4CXX_THREAD_FUNC) - #if defined(_WIN32) - #define LOG4CXX_THREAD_FUNC __stdcall - #else - #define LOG4CXX_THREAD_FUNC - #endif -#endif - - -extern "C" { - struct apr_threadkey_t; -} - -namespace LOG4CXX_NS -{ -namespace helpers -{ - -/** - * @deprecated This class is deprecated and will be removed in a future version. - * - * This class provides thread-local variables. This class is similar in function - * to java.lang.ThreadLocal. - */ -class LOG4CXX_EXPORT ThreadLocal -{ - public: - /** - * Create new instance. - */ - ThreadLocal(); - /** - * Destructor. - */ - ~ThreadLocal(); - /** - * Sets the value in the current thread's copy of this thread-local variable. - * @param priv new value. - */ - void set(void* priv); - /** - * Returns the value in the current thread's copy of this thread-local variable. - * @return value of thread-local variable for the current thread. - */ - void* get(); - - private: - /** - * Prevent use of default copy constructor. - */ - ThreadLocal(const ThreadLocal&); - /** - * Prevent use of default assignment operator. - */ - ThreadLocal& operator=(const ThreadLocal&); - - static apr_threadkey_t* create(Pool& p); - - Pool p; - apr_threadkey_t* key; -}; -} // namespace helpers -} // namespace log4cxx - -#endif // LOG4CXX_ABI_VERSION <= 15 #endif //_LOG4CXX_HELPERS_THREAD_LOCAL_H diff --git a/src/main/include/log4cxx/helpers/transcoder.h b/src/main/include/log4cxx/helpers/transcoder.h index 28f3255ce..be48595e9 100644 --- a/src/main/include/log4cxx/helpers/transcoder.h +++ b/src/main/include/log4cxx/helpers/transcoder.h @@ -41,14 +41,6 @@ class LOG4CXX_EXPORT Transcoder * Append \src onto \c dst as a UTF-8 string. */ static void encodeUTF8(const LogString& src, std::string& dst); -#if LOG4CXX_ABI_VERSION <= 15 - /** - * Converts the LogString to a UTF-8 string. - * @deprecated This function is deprecated and will be removed in a future version. - */ - [[ deprecated( "Use the encodeUTF8() without a Pool parameter" ) ]] - static char* encodeUTF8(const LogString& src, LOG4CXX_NS::helpers::Pool& p); -#endif /** * Append the code point \c sv to \c dst as UTF-8. * @pre 4 <= dst.remaining() @@ -108,18 +100,6 @@ class LOG4CXX_EXPORT Transcoder */ static void encode(const LogString& src, std::string& dst); -#if LOG4CXX_ABI_VERSION <= 15 - /** - * Encodes the specified LogString to the current - * character set. - * @deprecated This function is deprecated and will be removed in a future version. - * @param src string to encode. - * @param p pool from which to allocate return value. - * @return pool allocated string. - */ - [[ deprecated( "Use an encode() without a Pool parameter" ) ]] - static char* encode(const LogString& src, LOG4CXX_NS::helpers::Pool& p); -#endif #if LOG4CXX_WCHAR_T_API || LOG4CXX_LOGCHAR_IS_WCHAR || defined(WIN32) || defined(_WIN32) @@ -131,10 +111,6 @@ class LOG4CXX_EXPORT Transcoder * Append the equivalent of \c src onto \c dst. */ static void encode(const LogString& src, std::wstring& dst); -#if LOG4CXX_ABI_VERSION <= 15 - /// A null-terminated equivalent of \c src. - static wchar_t* wencode(const LogString& src, LOG4CXX_NS::helpers::Pool& p); -#endif /** * Increment \c iter past the next code point in \c str. * @pre \c iter is a valid, dereferenceable iterator. diff --git a/src/main/include/log4cxx/helpers/writer.h b/src/main/include/log4cxx/helpers/writer.h index 1d179bc56..b9ab99c44 100644 --- a/src/main/include/log4cxx/helpers/writer.h +++ b/src/main/include/log4cxx/helpers/writer.h @@ -43,29 +43,6 @@ class LOG4CXX_EXPORT Writer : public Object virtual ~Writer(); public: -#if LOG4CXX_ABI_VERSION <= 15 - void close(); - void flush(); - void write(const LogString& str); - /** - @deprecated The \c pool parameter is not used and will be removed in a future version. - Implement this method for now, but plan to migrate to close() without a helpers::Pool parameter. - */ - virtual void close(Pool& p) = 0; -#define LOG4CXX_CLOSE_WRITER_FORMAL_PARAMETERS helpers::Pool& p - /** - @deprecated The \c pool parameter is not used and will be removed in a future version. - Implement this method for now, but plan to migrate to flush() without a helpers::Pool parameter. - */ - virtual void flush(Pool& p) = 0; -#define LOG4CXX_FLUSH_WRITER_FORMAL_PARAMETERS helpers::Pool& p - /** - @deprecated The \c pool parameter is not used and will be removed in a future version. - Implement this method for now, but plan to migrate to write() without a helpers::Pool parameter. - */ - virtual void write(const LogString& str, Pool& p) = 0; -#define LOG4CXX_WRITE_WRITER_FORMAL_PARAMETERS const LogString& str, helpers::Pool& p -#else virtual void close() = 0; #define LOG4CXX_CLOSE_WRITER_FORMAL_PARAMETERS virtual void flush() = 0; @@ -87,7 +64,6 @@ class LOG4CXX_EXPORT Writer : public Object */ [[deprecated("Use write() without a Pool parameter instead")]] void write(const LogString& str, Pool& p); -#endif private: Writer(const Writer&); Writer& operator=(const Writer&); diff --git a/src/main/include/log4cxx/helpers/xml.h b/src/main/include/log4cxx/helpers/xml.h index 5137d3f2a..d1afd24f1 100644 --- a/src/main/include/log4cxx/helpers/xml.h +++ b/src/main/include/log4cxx/helpers/xml.h @@ -48,11 +48,7 @@ The XMLDOMNode interface is the primary datatype for the entire Document Object Model. */ class LOG4CXX_EXPORT XMLDOMNode -#if LOG4CXX_ABI_VERSION <= 15 - : public virtual Object -#else : public Object -#endif { public: DECLARE_ABSTRACT_LOG4CXX_OBJECT(XMLDOMNode) @@ -74,11 +70,7 @@ LOG4CXX_PTR_DEF(XMLDOMNode); The XMLDOMElement interface represents an element in an XML document */ class LOG4CXX_EXPORT XMLDOMElement -#if LOG4CXX_ABI_VERSION <= 15 - : public virtual XMLDOMNode -#else : public XMLDOMNode -#endif { public: DECLARE_ABSTRACT_LOG4CXX_OBJECT(XMLDOMElement) @@ -94,11 +86,7 @@ Conceptually, it is the root of the document tree, and provides the primary access to the document's data. */ class LOG4CXX_EXPORT XMLDOMDocument -#if LOG4CXX_ABI_VERSION <= 15 - : public virtual XMLDOMNode -#else : public XMLDOMNode -#endif { public: DECLARE_ABSTRACT_LOG4CXX_OBJECT(XMLDOMDocument) @@ -120,11 +108,7 @@ The items in the XMLDOMNodeList are accessible via an integral index, starting from 0. */ class LOG4CXX_EXPORT XMLDOMNodeList -#if LOG4CXX_ABI_VERSION <= 15 - : public virtual Object -#else : public Object -#endif { public: DECLARE_ABSTRACT_LOG4CXX_OBJECT(XMLDOMNodeList) diff --git a/src/main/include/log4cxx/hierarchy.h b/src/main/include/log4cxx/hierarchy.h index d2cec4883..5ac6c279f 100644 --- a/src/main/include/log4cxx/hierarchy.h +++ b/src/main/include/log4cxx/hierarchy.h @@ -56,12 +56,8 @@ class LOG4CXX_EXPORT Hierarchy : public spi::LoggerRepository public: DECLARE_ABSTRACT_LOG4CXX_OBJECT(Hierarchy) BEGIN_LOG4CXX_CAST_MAP() -#if 15 < LOG4CXX_ABI_VERSION LOG4CXX_CAST_ENTRY(Hierarchy) LOG4CXX_CAST_ENTRY_CHAIN(spi::LoggerRepository) -#else - LOG4CXX_CAST_ENTRY(spi::LoggerRepository) -#endif END_LOG4CXX_CAST_MAP() private: @@ -81,11 +77,7 @@ class LOG4CXX_EXPORT Hierarchy : public spi::LoggerRepository * Remove a previously added HierarchyEventListener. * */ -#if LOG4CXX_ABI_VERSION <= 15 - void removeHierarchyEventListener(const spi::HierarchyEventListenerPtr& listener); -#else void removeHierarchyEventListener(const spi::HierarchyEventListenerPtr& listener) override; -#endif /** * Call \c configurator if not yet configured and \c configurator has not already been tried. @@ -231,19 +223,6 @@ class LOG4CXX_EXPORT Hierarchy : public spi::LoggerRepository */ void updateChildren(const Logger* parent); -#if LOG4CXX_ABI_VERSION <= 15 - /** - * @deprecated This function is deprecated and will be removed in a future version. - */ - [[ deprecated( "Storing appenders is longer supported" ) ]] - void clearAppenders(); - - /** - * @deprecated This function is deprecated and will be removed in a future version. - */ - [[ deprecated( "Storing appenders is longer supported" ) ]] - void addAppender(AppenderPtr appender); -#endif /** Remove the \c name Logger from the hierarchy. @@ -255,11 +234,7 @@ class LOG4CXX_EXPORT Hierarchy : public spi::LoggerRepository @param ifNotUsed If true and use_count() indicates there are other references, do not remove the Logger and return false. @returns true if \c name Logger was removed from the hierarchy. */ -#if LOG4CXX_ABI_VERSION <= 15 - bool removeLogger(const LogString& name, bool ifNotUsed = true); -#else bool removeLogger(const LogString& name, bool ifNotUsed = true) override; -#endif private: diff --git a/src/main/include/log4cxx/htmllayout.h b/src/main/include/log4cxx/htmllayout.h index 0643209b0..1ae25c2ee 100644 --- a/src/main/include/log4cxx/htmllayout.h +++ b/src/main/include/log4cxx/htmllayout.h @@ -79,14 +79,6 @@ class LOG4CXX_EXPORT HTMLLayout : public Layout LogString getContentType() const override; using Layout::activateOptions; -#if LOG4CXX_ABI_VERSION <= 15 - /** - \copybrief spi::OptionHandler::activateOptions() - - No action is performed in this implementation. - */ - void activateOptions( LOG4CXX_ACTIVATE_OPTIONS_FORMAL_PARAMETERS ) override {} -#endif /** \copybrief spi::OptionHandler::setOption() diff --git a/src/main/include/log4cxx/jsonlayout.h b/src/main/include/log4cxx/jsonlayout.h index 1ff923a27..c7fe92ba7 100644 --- a/src/main/include/log4cxx/jsonlayout.h +++ b/src/main/include/log4cxx/jsonlayout.h @@ -40,10 +40,6 @@ class LOG4CXX_EXPORT JSONLayout : public Layout void appendSerializedNDC(LogString& buf, const spi::LoggingEventPtr& event) const; void appendSerializedLocationInfo(LogString& buf, const spi::LoggingEventPtr& event) const; -#if LOG4CXX_ABI_VERSION <= 15 - void appendSerializedLocationInfo(LogString& buf, - const spi::LoggingEventPtr& event, LOG4CXX_NS::helpers::Pool& p) const; -#endif public: static void appendItem(const LogString& item, LogString& toAppendTo); DECLARE_LOG4CXX_OBJECT(JSONLayout) diff --git a/src/main/include/log4cxx/layout.h b/src/main/include/log4cxx/layout.h index 6d45b7209..1325feda5 100644 --- a/src/main/include/log4cxx/layout.h +++ b/src/main/include/log4cxx/layout.h @@ -29,12 +29,7 @@ namespace LOG4CXX_NS Extend this abstract class to create your own log layout format. */ class LOG4CXX_EXPORT Layout -#if LOG4CXX_ABI_VERSION <= 15 - : public virtual spi::OptionHandler - , public virtual helpers::Object -#else : public spi::OptionHandler -#endif { public: DECLARE_ABSTRACT_LOG4CXX_OBJECT(Layout) @@ -48,16 +43,6 @@ class LOG4CXX_EXPORT Layout /** Implement this method to create your own layout format. */ -#if LOG4CXX_ABI_VERSION <= 15 - void format(LogString& output, const spi::LoggingEventPtr& event) const; - /** - @deprecated The \c pool parameter is not used and will be removed in a future version. - Implement this method for now, but plan to migrate to format() without a helpers::Pool parameter. - */ - virtual void format(LogString& output, - const spi::LoggingEventPtr& event, LOG4CXX_NS::helpers::Pool& pool) const = 0; -#define LOG4CXX_FORMAT_LAYOUT_FORMAL_PARAMETERS LogString& output, const spi::LoggingEventPtr& event, helpers::Pool& p -#else virtual void format(LogString& output, const spi::LoggingEventPtr& event) const = 0; #define LOG4CXX_FORMAT_LAYOUT_FORMAL_PARAMETERS LogString& output, const spi::LoggingEventPtr& event /** @@ -65,7 +50,6 @@ class LOG4CXX_EXPORT Layout */ [[deprecated("Use format() without a Pool parameter instead")]] void format(LogString& output, const spi::LoggingEventPtr& event, helpers::Pool& p) const; -#endif /** Returns the content type output by this layout. The base class @@ -77,15 +61,6 @@ class LOG4CXX_EXPORT Layout Append the header for the layout format. The base class does nothing. */ -#if LOG4CXX_ABI_VERSION <= 15 - void appendHeader(LogString& output); - /** - @deprecated The \c pool parameter is not used and will be removed in a future version. - Implement this method for now, but plan to migrate to appendHeader() without a helpers::Pool parameter. - */ - virtual void appendHeader(LogString& output, LOG4CXX_NS::helpers::Pool& p); -#define LOG4CXX_APPEND_HEADER_FORMAL_PARAMETERS LogString& output, LOG4CXX_NS::helpers::Pool& p -#else virtual void appendHeader(LogString& output); #define LOG4CXX_APPEND_HEADER_FORMAL_PARAMETERS LogString& output /** @@ -93,21 +68,11 @@ class LOG4CXX_EXPORT Layout */ [[deprecated("Use appendHeader() without a Pool parameter instead")]] void appendHeader(LogString& output, helpers::Pool& p); -#endif /** Append the footer for the layout format. The base class does nothing. */ -#if LOG4CXX_ABI_VERSION <= 15 - void appendFooter(LogString& output); - /** - @deprecated The \c pool parameter is not used and will be removed in a future version. - Implement this method for now, but plan to migrate to appendFooter() without a helpers::Pool parameter. - */ - virtual void appendFooter(LogString& output, LOG4CXX_NS::helpers::Pool& p); -#define LOG4CXX_APPEND_FOOTER_FORMAL_PARAMETERS LogString& output, LOG4CXX_NS::helpers::Pool& p -#else virtual void appendFooter(LogString& output); #define LOG4CXX_APPEND_FOOTER_FORMAL_PARAMETERS LogString& output /** @@ -115,7 +80,6 @@ class LOG4CXX_EXPORT Layout */ [[deprecated("Use appendFooter() without a Pool parameter instead")]] void appendFooter(LogString& output, helpers::Pool& p); -#endif /** If the layout handles the throwable object contained within @@ -128,7 +92,6 @@ class LOG4CXX_EXPORT Layout */ virtual bool ignoresThrowable() const = 0; -#if 15 < LOG4CXX_ABI_VERSION using spi::OptionHandler::activateOptions; /** \copybrief spi::OptionHandler::activateOptions() @@ -136,7 +99,6 @@ class LOG4CXX_EXPORT Layout No action is performed in this implementation. */ void activateOptions( LOG4CXX_ACTIVATE_OPTIONS_FORMAL_PARAMETERS ) override; -#endif protected: /** * The expected length of a formatted event excluding the message text diff --git a/src/main/include/log4cxx/logger.h b/src/main/include/log4cxx/logger.h index 7c801e5cd..928e42d26 100644 --- a/src/main/include/log4cxx/logger.h +++ b/src/main/include/log4cxx/logger.h @@ -69,11 +69,6 @@ class LOG4CXX_EXPORT Logger

It is intended to be only used by factory-classes. */ Logger(const LogString& name); -#if LOG4CXX_ABI_VERSION <= 15 - /// @deprecated This function is deprecated and will be removed in a future version. - [[ deprecated( "Pool is no longer required" ) ]] - Logger(helpers::Pool& pool, const LogString& name); -#endif ~Logger(); @@ -87,23 +82,6 @@ class LOG4CXX_EXPORT Logger void addAppender(const AppenderPtr newAppender) override; -#if LOG4CXX_ABI_VERSION <= 15 - /** - Call the appenders in the hierrachy starting at - this. If no appenders could be found, emit a - warning. - -

This method calls all the appenders inherited from the - hierarchy circumventing any evaluation of whether to log or not - to log the particular log request. - - @param event the event to log. - @param p memory pool for any allocations needed to process request. - @deprecated This function is deprecated and will be removed in a future version. - */ - [[ deprecated( "Pool is no longer required" ) ]] - void callAppenders(const spi::LoggingEventPtr& event, helpers::Pool& p) const; -#endif /** Send \c event to all appenders attached to this or attached to a parent of this. If no appenders are found, emit a warning. @@ -854,13 +832,6 @@ class LOG4CXX_EXPORT Logger */ virtual const LevelPtr& getEffectiveLevel() const; -#if LOG4CXX_ABI_VERSION <= 15 - /** - Return the the LoggerRepository where this - Logger is attached. - */ - spi::LoggerRepository* getLoggerRepository() const; -#endif /** * Get the logger name. @@ -911,12 +882,10 @@ class LOG4CXX_EXPORT Logger */ const LevelPtr& getLevel() const; -#if 15 < LOG4CXX_ABI_VERSION /** The object that holds all Logger instances. */ static spi::LoggerRepositoryPtr getLoggerRepository(); -#endif /** * Retrieve a logger by name in current encoding. @@ -2257,12 +2226,8 @@ LOG4CXX_LIST_DEF(LoggerList, LoggerPtr); #endif #ifndef LOG4CXX_FMT_VA_ARG -#if __cplusplus >= 202002L - #define LOG4CXX_FMT_VA_ARG(...) __VA_OPT__(,) __VA_ARGS__ -#else #define LOG4CXX_FMT_VA_ARG(...) , __VA_ARGS__ #endif -#endif /** @addtogroup LoggingMacros Logging macros @{ diff --git a/src/main/include/log4cxx/net/socketappenderskeleton.h b/src/main/include/log4cxx/net/socketappenderskeleton.h index b9eb19edf..aeb8bea25 100644 --- a/src/main/include/log4cxx/net/socketappenderskeleton.h +++ b/src/main/include/log4cxx/net/socketappenderskeleton.h @@ -20,9 +20,6 @@ #include #include -#if LOG4CXX_ABI_VERSION <= 15 -#include -#endif namespace LOG4CXX_NS @@ -92,11 +89,7 @@ class LOG4CXX_EXPORT SocketAppenderSkeleton : public AppenderSkeleton /** Connects to remote server at address and port. */ -#if LOG4CXX_ABI_VERSION <= 15 - SocketAppenderSkeleton(helpers::InetAddressPtr address, int port, int reconnectionDelay); -#else SocketAppenderSkeleton(const helpers::InetAddressPtr& address, int port, int reconnectionDelay); -#endif /** Connects to remote server at host and port. */ @@ -112,17 +105,6 @@ class LOG4CXX_EXPORT SocketAppenderSkeleton : public AppenderSkeleton void close() override; -#if LOG4CXX_ABI_VERSION <= 15 - /** - * This appender does not use a layout. Hence, this method - * returns false. - * - */ - bool requiresLayout() const override - { - return false; - } -#endif /** * The RemoteHost option takes a string value which should be * the host name of the server where a @@ -174,12 +156,6 @@ class LOG4CXX_EXPORT SocketAppenderSkeleton : public AppenderSkeleton */ int getReconnectionDelay() const; -#if LOG4CXX_ABI_VERSION <= 15 - /** - @deprecated This method will be removed in a future version. - */ - void fireConnector(); -#else /** * Use \c newSubclass as the helpers::Socket interface instead of the default implementation. * */ @@ -189,7 +165,6 @@ class LOG4CXX_EXPORT SocketAppenderSkeleton : public AppenderSkeleton The class name used for the helpers::Socket interface implemention. */ const LogString& getSocketSubclass() const; -#endif /** \copybrief AppenderSkeleton::setOption() @@ -214,17 +189,6 @@ class LOG4CXX_EXPORT SocketAppenderSkeleton : public AppenderSkeleton protected: SocketAppenderSkeleton(std::unique_ptr priv); -#if LOG4CXX_ABI_VERSION <= 15 - /** - @deprecated This method will be removed in a future version. - */ - virtual void setSocket(helpers::SocketPtr& socket, helpers::Pool& p) = 0; - - /** - @deprecated This method will be removed in a future version. - */ - virtual void cleanUp(LOG4CXX_NS::helpers::Pool& p) = 0; -#endif virtual int getDefaultDelay() const = 0; virtual int getDefaultPort() const = 0; diff --git a/src/main/include/log4cxx/net/syslogappender.h b/src/main/include/log4cxx/net/syslogappender.h index a080d6628..6dc2c70ed 100644 --- a/src/main/include/log4cxx/net/syslogappender.h +++ b/src/main/include/log4cxx/net/syslogappender.h @@ -75,14 +75,6 @@ class LOG4CXX_EXPORT SyslogAppender : public AppenderSkeleton void append( LOG4CXX_APPEND_FORMAL_PARAMETERS ) override; -#if LOG4CXX_ABI_VERSION <= 15 - /** - \copybrief AppenderSkeleton::activateOptions() - - No action is performed in this implementation. - */ - void activateOptions(helpers::Pool& p) override; -#endif /** \copybrief AppenderSkeleton::setOption() diff --git a/src/main/include/log4cxx/net/xmlsocketappender.h b/src/main/include/log4cxx/net/xmlsocketappender.h index 68c99bcd4..d3d92108a 100644 --- a/src/main/include/log4cxx/net/xmlsocketappender.h +++ b/src/main/include/log4cxx/net/xmlsocketappender.h @@ -62,12 +62,6 @@ class LOG4CXX_EXPORT XMLSocketAppender : public SocketAppenderSkeleton */ static int DEFAULT_RECONNECTION_DELAY; -#if LOG4CXX_ABI_VERSION <= 15 - /** - Unused - */ - static const int MAX_EVENT_LEN; -#endif DECLARE_LOG4CXX_OBJECT(XMLSocketAppender) BEGIN_LOG4CXX_CAST_MAP() @@ -81,11 +75,7 @@ class LOG4CXX_EXPORT XMLSocketAppender : public SocketAppenderSkeleton /** Connects to remote server at address and port. */ -#if LOG4CXX_ABI_VERSION <= 15 - XMLSocketAppender(helpers::InetAddressPtr address, int port); -#else XMLSocketAppender(const helpers::InetAddressPtr& address, int port); -#endif /** Connects to remote server at host and port. @@ -94,7 +84,6 @@ class LOG4CXX_EXPORT XMLSocketAppender : public SocketAppenderSkeleton using SocketAppenderSkeleton::activateOptions; -#if 15 < LOG4CXX_ABI_VERSION /** * This appender has a default layout. * @returns false @@ -103,20 +92,8 @@ class LOG4CXX_EXPORT XMLSocketAppender : public SocketAppenderSkeleton { return false; } -#endif protected: -#if LOG4CXX_ABI_VERSION <= 15 - /** - @deprecated This method will be removed in a future version. - */ - void setSocket(LOG4CXX_NS::helpers::SocketPtr& socket, helpers::Pool& p) override; - - /** - @deprecated This method will be removed in a future version. - */ - void cleanUp(helpers::Pool& p) override; -#endif int getDefaultDelay() const override; int getDefaultPort() const override; @@ -128,9 +105,6 @@ class LOG4CXX_EXPORT XMLSocketAppender : public SocketAppenderSkeleton XMLSocketAppender(const XMLSocketAppender&); XMLSocketAppender& operator=(const XMLSocketAppender&); -#if LOG4CXX_ABI_VERSION <= 15 - struct XMLSocketAppenderPriv; -#endif }; // class XMLSocketAppender LOG4CXX_PTR_DEF(XMLSocketAppender); diff --git a/src/main/include/log4cxx/pattern/datepatternconverter.h b/src/main/include/log4cxx/pattern/datepatternconverter.h index ff7acb737..36a61447e 100644 --- a/src/main/include/log4cxx/pattern/datepatternconverter.h +++ b/src/main/include/log4cxx/pattern/datepatternconverter.h @@ -92,11 +92,6 @@ class LOG4CXX_EXPORT DatePatternConverter : public LoggingEventPatternConverter * Append to \c toAppendTo a textual version of \c date. */ void format(const helpers::DatePtr& date, LogString& toAppendTo) const; -#if LOG4CXX_ABI_VERSION <= 15 - void format(const helpers::DatePtr& date, - LogString& toAppendTo, - helpers::Pool& p) const; -#endif }; LOG4CXX_PTR_DEF(DatePatternConverter); diff --git a/src/main/include/log4cxx/pattern/formattinginfo.h b/src/main/include/log4cxx/pattern/formattinginfo.h index 449f820ce..49c3308f5 100644 --- a/src/main/include/log4cxx/pattern/formattinginfo.h +++ b/src/main/include/log4cxx/pattern/formattinginfo.h @@ -85,17 +85,6 @@ class LOG4CXX_EXPORT FormattingInfo : public virtual LOG4CXX_NS::helpers::Object */ int getMaxLength() const; -#if LOG4CXX_ABI_VERSION <= 15 - /** - * Adjust the content of the buffer based on the specified lengths and alignment. - * @deprecated This function is deprecated and will be removed in a future version. - * - * @param fieldStart start of field in buffer. - * @param buffer buffer to be modified. - */ - [[ deprecated( "Use adjustField() instead" ) ]] - void format(const int fieldStart, LogString& buffer) const; -#endif /** * Adjust the content of the buffer based on the specified lengths and alignment. * diff --git a/src/main/include/log4cxx/pattern/loggingeventpatternconverter.h b/src/main/include/log4cxx/pattern/loggingeventpatternconverter.h index b50414634..fda1f33ea 100644 --- a/src/main/include/log4cxx/pattern/loggingeventpatternconverter.h +++ b/src/main/include/log4cxx/pattern/loggingeventpatternconverter.h @@ -60,19 +60,6 @@ class LOG4CXX_EXPORT LoggingEventPatternConverter : public PatternConverter * @param event holds the attributes, may not be null. * @param toAppendTo string buffer to which the formatted event will be appended. May not be null. */ -#if LOG4CXX_ABI_VERSION <= 15 - void format(const spi::LoggingEventPtr& event, LogString& toAppendTo) const; - /** - @deprecated The \c pool parameter is not used and will be removed in a future version. - Implement this method for now, but plan to migrate to format() without a helpers::Pool parameter. - */ - virtual void format( - const spi::LoggingEventPtr& event, - LogString& toAppendTo, - helpers::Pool& p) const = 0; -#define LOG4CXX_FORMAT_EVENT_FORMAL_PARAMETERS const spi::LoggingEventPtr& event, LogString& toAppendTo, helpers::Pool& p -#define LOG4CXX_FORMAT_EVENT_PARAMETERS event, toAppendTo, p -#else virtual void format(const spi::LoggingEventPtr& event, LogString& toAppendTo) const = 0; #define LOG4CXX_FORMAT_EVENT_FORMAL_PARAMETERS const spi::LoggingEventPtr& event, LogString& toAppendTo #define LOG4CXX_FORMAT_EVENT_PARAMETERS event, toAppendTo @@ -81,7 +68,6 @@ class LOG4CXX_EXPORT LoggingEventPatternConverter : public PatternConverter */ [[deprecated("Use format() without a Pool parameter instead")]] void format(const spi::LoggingEventPtr& event, LogString& toAppendTo, helpers::Pool& p) const; -#endif void format( LOG4CXX_FORMAT_OBJECT_FORMAL_PARAMETERS ) const override; diff --git a/src/main/include/log4cxx/pattern/patternconverter.h b/src/main/include/log4cxx/pattern/patternconverter.h index e53e49dcc..efa0e6de8 100644 --- a/src/main/include/log4cxx/pattern/patternconverter.h +++ b/src/main/include/log4cxx/pattern/patternconverter.h @@ -71,17 +71,6 @@ class LOG4CXX_EXPORT PatternConverter : public virtual helpers::Object * @param obj holds the attributes, may not be null. * @param toAppendTo string buffer to which the formatted event will be appended. May not be null. */ -#if LOG4CXX_ABI_VERSION <= 15 - void format(const helpers::ObjectPtr& obj, LogString& toAppendTo) const; - /** - @deprecated The \c pool parameter is not used and will be removed in a future version. - Implement this method for now, but plan to migrate to format() without a helpers::Pool parameter. - */ - virtual void format(const helpers::ObjectPtr& obj, - LogString& toAppendTo, - helpers::Pool& p) const = 0; -#define LOG4CXX_FORMAT_OBJECT_FORMAL_PARAMETERS const helpers::ObjectPtr& obj, LogString& toAppendTo, helpers::Pool& p -#else virtual void format(const helpers::ObjectPtr& obj, LogString& toAppendTo) const = 0; #define LOG4CXX_FORMAT_OBJECT_FORMAL_PARAMETERS const helpers::ObjectPtr& obj, LogString& toAppendTo /** @@ -89,7 +78,6 @@ class LOG4CXX_EXPORT PatternConverter : public virtual helpers::Object */ [[deprecated("Use format() without a Pool parameter instead")]] virtual void format(const helpers::ObjectPtr& obj, LogString& toAppendTo, helpers::Pool& p) const; -#endif /** * This method returns the name of the conversion pattern. diff --git a/src/main/include/log4cxx/pattern/patternparser.h b/src/main/include/log4cxx/pattern/patternparser.h index 5b2f39ccf..899dfa8d1 100644 --- a/src/main/include/log4cxx/pattern/patternparser.h +++ b/src/main/include/log4cxx/pattern/patternparser.h @@ -100,22 +100,6 @@ class LOG4CXX_EXPORT PatternParser std::vector& options); public: -#if LOG4CXX_ABI_VERSION <= 15 - /** - * Parse a format specifier. - * @deprecated This function is deprecated and will be removed in a future version. - * @param pattern pattern to parse. - * @param patternConverters list to receive pattern converters. - * @param formattingInfos list to receive field specifiers corresponding to pattern converters. - * @param rules map of stock pattern converters keyed by format specifier. - */ - [[ deprecated( "Parsing into two vectors is longer supported" ) ]] - static void parse( - const LogString& pattern, - std::vector& patternConverters, - std::vector& formattingInfos, - const PatternMap& rules); -#endif /** * Convert \c pattern to converters using \c rules. * @param pattern a string specifying the conversion types and their properties. diff --git a/src/main/include/log4cxx/private/aprserversocket.h b/src/main/include/log4cxx/private/aprserversocket.h index 363304ebf..f84dbba35 100644 --- a/src/main/include/log4cxx/private/aprserversocket.h +++ b/src/main/include/log4cxx/private/aprserversocket.h @@ -31,12 +31,7 @@ namespace helpers class LOG4CXX_EXPORT APRServerSocket : public helpers::ServerSocket { public: -#if LOG4CXX_ABI_VERSION <= 15 - APRServerSocket(int port); - APRServerSocket(int port, bool reuseAddress, const LogString& hostname); -#else APRServerSocket(int port, bool reuseAddress = false, const LogString& hostname = {}); -#endif void close() override; diff --git a/src/main/include/log4cxx/private/bytebuffer_priv.h b/src/main/include/log4cxx/private/bytebuffer_priv.h index 93ec2a1ec..dc274183a 100644 --- a/src/main/include/log4cxx/private/bytebuffer_priv.h +++ b/src/main/include/log4cxx/private/bytebuffer_priv.h @@ -52,9 +52,6 @@ struct LOG4CXX_NS::helpers::ByteBufferPriv inline size_t increment_position(size_t byteCount); inline bool put(char byteValue); -#if LOG4CXX_ABI_VERSION <= 15 - friend class ByteBuffer; -#endif }; void ByteBufferPriv::clear() diff --git a/src/main/include/log4cxx/propertyconfigurator.h b/src/main/include/log4cxx/propertyconfigurator.h index 38705cddc..d0817a2f3 100644 --- a/src/main/include/log4cxx/propertyconfigurator.h +++ b/src/main/include/log4cxx/propertyconfigurator.h @@ -246,38 +246,15 @@ documented. */ class LOG4CXX_EXPORT PropertyConfigurator -#if LOG4CXX_ABI_VERSION <= 15 - : virtual public spi::Configurator - , virtual public helpers::Object -#else : public spi::Configurator -#endif { -#if 15 < LOG4CXX_ABI_VERSION private: LOG4CXX_DECLARE_PRIVATE_MEMBER_PTR(PrivateData, m_priv) -#else - protected: - - /** - Used internally to keep track of configured appenders. - */ - std::map* registry; - - /** - Used to create new instances of logger - */ - LOG4CXX_DECLARE_PRIVATE_MEMBER(spi::LoggerFactoryPtr, loggerFactory) -#endif public: DECLARE_LOG4CXX_OBJECT(PropertyConfigurator) BEGIN_LOG4CXX_CAST_MAP() -#if 15 < LOG4CXX_ABI_VERSION LOG4CXX_CAST_ENTRY(PropertyConfigurator) LOG4CXX_CAST_ENTRY_CHAIN(spi::Configurator) -#else - LOG4CXX_CAST_ENTRY(spi::Configurator) -#endif END_LOG4CXX_CAST_MAP() PropertyConfigurator(); @@ -296,11 +273,7 @@ class LOG4CXX_EXPORT PropertyConfigurator */ spi::ConfigurationStatus doConfigure ( const File& configFileName -#if LOG4CXX_ABI_VERSION <= 15 - , spi::LoggerRepositoryPtr repository -#else , const spi::LoggerRepositoryPtr& repository = spi::LoggerRepositoryPtr() -#endif ) override; /** @@ -309,16 +282,6 @@ class LOG4CXX_EXPORT PropertyConfigurator */ static spi::ConfigurationStatus configure(const File& configFilename); -#if LOG4CXX_ABI_VERSION <= 15 - /** - Like {@link #configureAndWatch(const File& configFilename, long delay)} - except that the - default delay as defined by helpers::FileWatchdog#DEFAULT_DELAY - is used. - @param configFilename A file in key=value format. - */ - static spi::ConfigurationStatus configureAndWatch(const File& configFilename); -#endif /** Read configuration options from \c configFilename (if it exists). Stores Logger instances in the spi::LoggerRepository held by LogManager. diff --git a/src/main/include/log4cxx/rolling/action.h b/src/main/include/log4cxx/rolling/action.h index 48c9d249c..9a25edc21 100644 --- a/src/main/include/log4cxx/rolling/action.h +++ b/src/main/include/log4cxx/rolling/action.h @@ -53,15 +53,6 @@ class Action : public virtual LOG4CXX_NS::helpers::Object * * @return true if successful. */ -#if LOG4CXX_ABI_VERSION <= 15 - bool execute() const; - /** - @deprecated The \c pool parameter is not used and will be removed in a future version. - Implement this method for now, but plan to migrate to execute() without a helpers::Pool parameter. - */ - virtual bool execute(helpers::Pool& pool) const = 0; -#define LOG4CXX_EXECUTE_ACTION_FORMAL_PARAMETERS helpers::Pool& p -#else virtual bool execute() const = 0; #define LOG4CXX_EXECUTE_ACTION_FORMAL_PARAMETERS /** @@ -69,7 +60,6 @@ class Action : public virtual LOG4CXX_NS::helpers::Object */ [[deprecated("Use execute() without a Pool parameter instead")]] bool execute(helpers::Pool& pool) const; -#endif /* Call execute() if not already closed. */ @@ -88,11 +78,6 @@ class Action : public virtual LOG4CXX_NS::helpers::Object */ LogString getName() const; -#if LOG4CXX_ABI_VERSION <= 15 - void reportException(const std::exception&); - - void run(helpers::Pool& pool); -#endif }; diff --git a/src/main/include/log4cxx/rolling/fixedwindowrollingpolicy.h b/src/main/include/log4cxx/rolling/fixedwindowrollingpolicy.h index 99b23b595..32e2990b7 100644 --- a/src/main/include/log4cxx/rolling/fixedwindowrollingpolicy.h +++ b/src/main/include/log4cxx/rolling/fixedwindowrollingpolicy.h @@ -84,9 +84,6 @@ class LOG4CXX_EXPORT FixedWindowRollingPolicy : public RollingPolicyBase enum { MAX_WINDOW_SIZE = 12 }; bool purge(int purgeStart, int maxIndex) const; -#if LOG4CXX_ABI_VERSION <= 15 - bool purge(int lowIndex, int highIndex, helpers::Pool& pool) const; -#endif public: FixedWindowRollingPolicy(); diff --git a/src/main/include/log4cxx/rolling/multiprocessrollingfileappender.h b/src/main/include/log4cxx/rolling/multiprocessrollingfileappender.h index 0955d0872..c828b32ed 100644 --- a/src/main/include/log4cxx/rolling/multiprocessrollingfileappender.h +++ b/src/main/include/log4cxx/rolling/multiprocessrollingfileappender.h @@ -74,9 +74,6 @@ class LOG4CXX_EXPORT MultiprocessRollingFileAppender : public RollingFileAppende */ bool rollover(); -#if LOG4CXX_ABI_VERSION <= 15 - bool rollover(LOG4CXX_NS::helpers::Pool& p); -#endif protected: @@ -104,9 +101,6 @@ class LOG4CXX_EXPORT MultiprocessRollingFileAppender : public RollingFileAppende * @return true if this process perfomed the rollover. */ bool synchronizedRollover(const TriggeringPolicyPtr& trigger = TriggeringPolicyPtr() ); -#if LOG4CXX_ABI_VERSION <= 15 - bool synchronizedRollover(helpers::Pool& p, const TriggeringPolicyPtr& trigger = TriggeringPolicyPtr() ); -#endif /** * Set the length of current active log file to \c length bytes. diff --git a/src/main/include/log4cxx/rolling/rollingfileappender.h b/src/main/include/log4cxx/rolling/rollingfileappender.h index 7d0fa0dd9..49dd7e870 100644 --- a/src/main/include/log4cxx/rolling/rollingfileappender.h +++ b/src/main/include/log4cxx/rolling/rollingfileappender.h @@ -170,9 +170,6 @@ class LOG4CXX_EXPORT RollingFileAppender : public FileAppender */ bool rollover(); -#if LOG4CXX_ABI_VERSION <= 15 - bool rollover(LOG4CXX_NS::helpers::Pool& p); -#endif protected: @@ -182,9 +179,6 @@ class LOG4CXX_EXPORT RollingFileAppender : public FileAppender void subAppend( LOG4CXX_APPEND_FORMAL_PARAMETERS ) override; bool rolloverInternal(); -#if LOG4CXX_ABI_VERSION <= 15 - bool rolloverInternal(LOG4CXX_NS::helpers::Pool& p); -#endif public: /** diff --git a/src/main/include/log4cxx/rolling/rollingpolicy.h b/src/main/include/log4cxx/rolling/rollingpolicy.h index 79b53d412..ed7ae395c 100644 --- a/src/main/include/log4cxx/rolling/rollingpolicy.h +++ b/src/main/include/log4cxx/rolling/rollingpolicy.h @@ -54,18 +54,6 @@ class LOG4CXX_EXPORT RollingPolicy : * @return Description of the initialization, may be null to indicate * no initialization needed. */ -#if LOG4CXX_ABI_VERSION <= 15 - RolloverDescriptionPtr initialize(const LogString& currentActiveFile, bool append); - /** - @deprecated The \c pool parameter is not used and will be removed in a future version. - Implement this method for now, but plan to migrate to initialize() without a helpers::Pool parameter. - */ - virtual RolloverDescriptionPtr initialize( - const LogString& currentActiveFile, - const bool append, - LOG4CXX_NS::helpers::Pool& pool) = 0; -#define LOG4CXX_ROLLING_POLICY_INITIALIZE_FORMAL_PARAMETERS const LogString& currentActiveFile, bool append, helpers::Pool& p -#else virtual RolloverDescriptionPtr initialize(const LogString& currentActiveFile, bool append) = 0; #define LOG4CXX_ROLLING_POLICY_INITIALIZE_FORMAL_PARAMETERS const LogString& currentActiveFile, bool append /** @@ -73,7 +61,6 @@ class LOG4CXX_EXPORT RollingPolicy : */ [[deprecated("Use initialize() without a Pool parameter instead")]] RolloverDescriptionPtr initialize(const LogString& currentActiveFile, bool append, helpers::Pool& pool); -#endif /** * Prepare for a rollover. This method is called prior to @@ -86,18 +73,6 @@ class LOG4CXX_EXPORT RollingPolicy : * @return Description of pending rollover, may be null to indicate no rollover * at this time. */ -#if LOG4CXX_ABI_VERSION <= 15 - RolloverDescriptionPtr rollover(const LogString& currentActiveFile, bool append); - /** - @deprecated The \c pool parameter is not used and will be removed in a future version. - Implement this method for now, but plan to migrate to rollover() without a helpers::Pool parameter. - */ - virtual RolloverDescriptionPtr rollover( - const LogString& currentActiveFile, - const bool append, - LOG4CXX_NS::helpers::Pool& pool) = 0; -#define LOG4CXX_ROLLING_POLICY_ROLLOVER_FORMAL_PARAMETERS const LogString& currentActiveFile, bool append, helpers::Pool& p -#else virtual RolloverDescriptionPtr rollover(const LogString& currentActiveFile, bool append) = 0; #define LOG4CXX_ROLLING_POLICY_ROLLOVER_FORMAL_PARAMETERS const LogString& currentActiveFile, bool append /** @@ -105,7 +80,6 @@ class LOG4CXX_EXPORT RollingPolicy : */ [[deprecated("Use rollover() without a Pool parameter instead")]] RolloverDescriptionPtr rollover(const LogString& currentActiveFile, bool append, helpers::Pool& pool); -#endif }; LOG4CXX_PTR_DEF(RollingPolicy); diff --git a/src/main/include/log4cxx/rolling/rollingpolicybase.h b/src/main/include/log4cxx/rolling/rollingpolicybase.h index 616bc04bd..a7ffef81d 100644 --- a/src/main/include/log4cxx/rolling/rollingpolicybase.h +++ b/src/main/include/log4cxx/rolling/rollingpolicybase.h @@ -40,12 +40,7 @@ LOG4CXX_LIST_DEF(PatternConverterList, LOG4CXX_NS::pattern::PatternConverterPtr) * */ class LOG4CXX_EXPORT RollingPolicyBase -#if LOG4CXX_ABI_VERSION <= 15 - : public virtual RollingPolicy - , public virtual helpers::Object -#else : public RollingPolicy -#endif { protected: DECLARE_ABSTRACT_LOG4CXX_OBJECT(RollingPolicyBase) @@ -123,10 +118,6 @@ class LOG4CXX_EXPORT RollingPolicyBase LOG4CXX_NS::pattern::PatternConverterPtr getIntegerPatternConverter() const; LOG4CXX_NS::pattern::PatternConverterPtr getDatePatternConverter() const; -#if LOG4CXX_ABI_VERSION <= 15 - void formatFileName(const helpers::ObjectPtr& obj, - LogString& buf, helpers::Pool& p) const; -#endif }; LOG4CXX_PTR_DEF(RollingPolicyBase); diff --git a/src/main/include/log4cxx/rolling/timebasedrollingpolicy.h b/src/main/include/log4cxx/rolling/timebasedrollingpolicy.h index 3c29f6189..29f831a45 100755 --- a/src/main/include/log4cxx/rolling/timebasedrollingpolicy.h +++ b/src/main/include/log4cxx/rolling/timebasedrollingpolicy.h @@ -138,13 +138,8 @@ namespace rolling * RollingFileAppender. */ class LOG4CXX_EXPORT TimeBasedRollingPolicy -#if LOG4CXX_ABI_VERSION <= 15 - : public virtual RollingPolicyBase - , public virtual TriggeringPolicy -#else : public RollingPolicyBase , public virtual TriggeringPolicy -#endif { DECLARE_LOG4CXX_OBJECT(TimeBasedRollingPolicy) BEGIN_LOG4CXX_CAST_MAP() diff --git a/src/main/include/log4cxx/rolling/triggeringpolicy.h b/src/main/include/log4cxx/rolling/triggeringpolicy.h index 15ce1f206..f1a98e848 100644 --- a/src/main/include/log4cxx/rolling/triggeringpolicy.h +++ b/src/main/include/log4cxx/rolling/triggeringpolicy.h @@ -42,12 +42,7 @@ namespace rolling * */ class LOG4CXX_EXPORT TriggeringPolicy -#if LOG4CXX_ABI_VERSION <= 15 - : public virtual spi::OptionHandler - , public virtual helpers::Object -#else : public spi::OptionHandler -#endif { DECLARE_ABSTRACT_LOG4CXX_OBJECT(TriggeringPolicy) BEGIN_LOG4CXX_CAST_MAP() diff --git a/src/main/include/log4cxx/simplelayout.h b/src/main/include/log4cxx/simplelayout.h index eb19e77dc..c983cc29c 100644 --- a/src/main/include/log4cxx/simplelayout.h +++ b/src/main/include/log4cxx/simplelayout.h @@ -62,14 +62,6 @@ class LOG4CXX_EXPORT SimpleLayout : public Layout return true; } -#if LOG4CXX_ABI_VERSION <= 15 - /** - \copybrief spi::OptionHandler::activateOptions() - - No action is performed in this implementation. - */ - void activateOptions( LOG4CXX_ACTIVATE_OPTIONS_FORMAL_PARAMETERS ) override {} -#endif /** \copybrief spi::OptionHandler::setOption() diff --git a/src/main/include/log4cxx/spi/appenderattachable.h b/src/main/include/log4cxx/spi/appenderattachable.h index a716fabab..0f7710add 100644 --- a/src/main/include/log4cxx/spi/appenderattachable.h +++ b/src/main/include/log4cxx/spi/appenderattachable.h @@ -72,7 +72,6 @@ class LOG4CXX_EXPORT AppenderAttachable : public virtual helpers::Object */ virtual void removeAppender(const LogString& name) = 0; -#if 15 < LOG4CXX_ABI_VERSION /** * Replace \c oldAppender with \c newAppender. * @return true if oldAppender was replaced with newAppender. @@ -83,7 +82,6 @@ class LOG4CXX_EXPORT AppenderAttachable : public virtual helpers::Object * Replace any previously added appenders with \c newList. */ virtual void replaceAppenders(const AppenderList& newList) = 0; -#endif // Dtor virtual ~AppenderAttachable() {} diff --git a/src/main/include/log4cxx/spi/configurator.h b/src/main/include/log4cxx/spi/configurator.h index 3192df4ac..3141a79d6 100644 --- a/src/main/include/log4cxx/spi/configurator.h +++ b/src/main/include/log4cxx/spi/configurator.h @@ -40,11 +40,9 @@ class LOG4CXX_EXPORT Configurator : virtual public helpers::Object { public: DECLARE_ABSTRACT_LOG4CXX_OBJECT(Configurator) -#if 15 < LOG4CXX_ABI_VERSION BEGIN_LOG4CXX_CAST_MAP() LOG4CXX_CAST_ENTRY(Configurator) END_LOG4CXX_CAST_MAP() -#endif /** Read configuration from \c configFileName. @@ -58,11 +56,7 @@ class LOG4CXX_EXPORT Configurator : virtual public helpers::Object */ virtual ConfigurationStatus doConfigure ( const File& configFileName -#if LOG4CXX_ABI_VERSION <= 15 - , spi::LoggerRepositoryPtr repository -#else , const spi::LoggerRepositoryPtr& repository = spi::LoggerRepositoryPtr() -#endif ) = 0; /** diff --git a/src/main/include/log4cxx/spi/defaultrepositoryselector.h b/src/main/include/log4cxx/spi/defaultrepositoryselector.h index 82a31a4b2..285769eab 100644 --- a/src/main/include/log4cxx/spi/defaultrepositoryselector.h +++ b/src/main/include/log4cxx/spi/defaultrepositoryselector.h @@ -28,12 +28,7 @@ namespace LOG4CXX_NS namespace spi { class LOG4CXX_EXPORT DefaultRepositorySelector -#if LOG4CXX_ABI_VERSION <= 15 - : public virtual RepositorySelector - , public virtual helpers::Object -#else : public RepositorySelector -#endif { public: DECLARE_ABSTRACT_LOG4CXX_OBJECT(DefaultRepositorySelector) diff --git a/src/main/include/log4cxx/spi/errorhandler.h b/src/main/include/log4cxx/spi/errorhandler.h index dd11f2934..bd9c069d1 100644 --- a/src/main/include/log4cxx/spi/errorhandler.h +++ b/src/main/include/log4cxx/spi/errorhandler.h @@ -56,11 +56,7 @@ that errors are not properly handled. You are most welcome to suggest new error handling policies or criticize existing policies. */ class LOG4CXX_EXPORT ErrorHandler -#if LOG4CXX_ABI_VERSION <= 15 - : public virtual OptionHandler -#else : public OptionHandler -#endif { public: DECLARE_ABSTRACT_LOG4CXX_OBJECT(ErrorHandler) @@ -71,14 +67,12 @@ class LOG4CXX_EXPORT ErrorHandler virtual ~ErrorHandler() {} -#if 15 < LOG4CXX_ABI_VERSION /** Add \c clx to the list of collections to search for the failed appender. @param name the collection name. @param clx has a collection of appenders. */ virtual void addAppenderHolder(const LogString& name, const AppenderAttachablePtr& clx) {}; -#endif /** Add a reference to a logger to which the failing appender might @@ -128,7 +122,6 @@ class LOG4CXX_EXPORT ErrorHandler */ virtual void setBackupAppender(const AppenderPtr& appender) = 0; -#if 15 < LOG4CXX_ABI_VERSION /** Has an error been reported? */ @@ -141,7 +134,6 @@ class LOG4CXX_EXPORT ErrorHandler No action is performed in this implementation. */ void activateOptions( LOG4CXX_ACTIVATE_OPTIONS_FORMAL_PARAMETERS ) override; -#endif }; diff --git a/src/main/include/log4cxx/spi/filter.h b/src/main/include/log4cxx/spi/filter.h index a2d822c4e..3394dd640 100644 --- a/src/main/include/log4cxx/spi/filter.h +++ b/src/main/include/log4cxx/spi/filter.h @@ -65,11 +65,7 @@ Linux ipchains.

Note that filtering is only supported by the DOMConfigurator. */ class LOG4CXX_EXPORT Filter -#if LOG4CXX_ABI_VERSION <= 15 - : public virtual OptionHandler -#else : public OptionHandler -#endif { protected: LOG4CXX_DECLARE_PRIVATE_MEMBER_PTR(FilterPrivate, m_priv) diff --git a/src/main/include/log4cxx/spi/loggerfactory.h b/src/main/include/log4cxx/spi/loggerfactory.h index ed502b1b7..f6f05f029 100644 --- a/src/main/include/log4cxx/spi/loggerfactory.h +++ b/src/main/include/log4cxx/spi/loggerfactory.h @@ -32,24 +32,13 @@ a sub-class of Logger. class LOG4CXX_EXPORT LoggerFactory : public virtual helpers::Object { public: -#if LOG4CXX_ABI_VERSION <= 15 - DECLARE_ABSTRACT_LOG4CXX_OBJECT(LoggerFactory) -#else DECLARE_LOG4CXX_OBJECT(LoggerFactory) BEGIN_LOG4CXX_CAST_MAP() LOG4CXX_CAST_ENTRY(LoggerFactory) END_LOG4CXX_CAST_MAP() -#endif virtual ~LoggerFactory() {} -#if LOG4CXX_ABI_VERSION <= 15 - [[ deprecated( "Pool is no longer required" ) ]] - virtual LoggerPtr makeNewLoggerInstance(helpers::Pool& pool, const LogString& name) const = 0; - - LoggerPtr makeNewLoggerInstance(const LogString& name) const; -#else virtual LoggerPtr makeNewLoggerInstance(const LogString& name) const; -#endif }; diff --git a/src/main/include/log4cxx/spi/loggerrepository.h b/src/main/include/log4cxx/spi/loggerrepository.h index 40f5e5cfc..bd7a42773 100644 --- a/src/main/include/log4cxx/spi/loggerrepository.h +++ b/src/main/include/log4cxx/spi/loggerrepository.h @@ -43,11 +43,9 @@ class LOG4CXX_EXPORT LoggerRepository : public virtual helpers::Object { public: DECLARE_ABSTRACT_LOG4CXX_OBJECT(LoggerRepository) -#if 15 < LOG4CXX_ABI_VERSION BEGIN_LOG4CXX_CAST_MAP() LOG4CXX_CAST_ENTRY(LoggerRepository) END_LOG4CXX_CAST_MAP() -#endif virtual ~LoggerRepository() {} /** @@ -57,13 +55,11 @@ class LOG4CXX_EXPORT LoggerRepository : public virtual helpers::Object virtual void addHierarchyEventListener(const HierarchyEventListenerPtr& listener) = 0; -#if 15 < LOG4CXX_ABI_VERSION /** * Remove a previously added HierarchyEventListener from the repository. * */ virtual void removeHierarchyEventListener(const spi::HierarchyEventListenerPtr& listener) = 0; -#endif /** * Call \c configurator if not yet configured. @@ -115,7 +111,6 @@ class LOG4CXX_EXPORT LoggerRepository : public virtual helpers::Object virtual LoggerPtr getLogger(const LogString& name, const spi::LoggerFactoryPtr& factory) = 0; -#if 15 < LOG4CXX_ABI_VERSION /** Remove the \c name Logger from the repository. @@ -128,7 +123,6 @@ class LOG4CXX_EXPORT LoggerRepository : public virtual helpers::Object @returns true if \c name Logger was removed from the repository. */ virtual bool removeLogger(const LogString& name, bool ifNotUsed = true) = 0; -#endif virtual LoggerPtr getRootLogger() const = 0; diff --git a/src/main/include/log4cxx/spi/loggingevent.h b/src/main/include/log4cxx/spi/loggingevent.h index e40c8a5fe..5ec6c1f2a 100644 --- a/src/main/include/log4cxx/spi/loggingevent.h +++ b/src/main/include/log4cxx/spi/loggingevent.h @@ -173,13 +173,6 @@ class LOG4CXX_EXPORT LoggingEvent : */ KeySet getMDCKeySet() const; -#if LOG4CXX_ABI_VERSION <= 15 - /** - Obtain a copy of the current thread's diagnostic context data. - */ - [[ deprecated( "Use LoadDC instead" ) ]] - void getMDCCopy() const; -#endif /** * Obtain a copy of the current thread's diagnostic context data. diff --git a/src/main/include/log4cxx/spi/optionhandler.h b/src/main/include/log4cxx/spi/optionhandler.h index ef0022137..8e39473b5 100644 --- a/src/main/include/log4cxx/spi/optionhandler.h +++ b/src/main/include/log4cxx/spi/optionhandler.h @@ -49,16 +49,6 @@ class LOG4CXX_EXPORT OptionHandler : public virtual helpers::Object the File and Append options both of which are ambiguous until the other is also set. */ -#if LOG4CXX_ABI_VERSION <= 15 -#define LOG4CXX_ACTIVATE_OPTIONS_FORMAL_PARAMETERS helpers::Pool& p -#define LOG4CXX_ACTIVATE_OPTIONS_PARAMETER p - void activateOptions(); - /** - @deprecated The \c pool parameter is not used and will be removed in a future version. - Implement this method for now, but plan to migrate to activateOptions() without parameters. - */ - virtual void activateOptions(helpers::Pool&) = 0; -#else #define LOG4CXX_ACTIVATE_OPTIONS_FORMAL_PARAMETERS #define LOG4CXX_ACTIVATE_OPTIONS_PARAMETER virtual void activateOptions() = 0; @@ -68,7 +58,6 @@ class LOG4CXX_EXPORT OptionHandler : public virtual helpers::Object */ [[deprecated("Use activateOptions() without parameters instead")]] void activateOptions(helpers::Pool&); -#endif /** Set option to value. @@ -85,10 +74,6 @@ class LOG4CXX_EXPORT OptionHandler : public virtual helpers::Object } // namespace log4cxx -#if 15 < LOG4CXX_ABI_VERSION #define LOG4CXX_16_VIRTUAL_SPECIFIER override -#else -#define LOG4CXX_16_VIRTUAL_SPECIFIER -#endif #endif //_LOG4CXX_SPI_OPTION_HANDLER_H diff --git a/src/main/include/log4cxx/spi/rootlogger.h b/src/main/include/log4cxx/spi/rootlogger.h index 0481cb31f..5351b91b2 100644 --- a/src/main/include/log4cxx/spi/rootlogger.h +++ b/src/main/include/log4cxx/spi/rootlogger.h @@ -42,10 +42,6 @@ class LOG4CXX_EXPORT RootLogger : public Logger */ RootLogger(const LevelPtr& level); -#if LOG4CXX_ABI_VERSION <= 15 - [[ deprecated( "Pool is no longer required" ) ]] - RootLogger(helpers::Pool& pool, const LevelPtr level); -#endif ~RootLogger() {} diff --git a/src/main/include/log4cxx/varia/fallbackerrorhandler.h b/src/main/include/log4cxx/varia/fallbackerrorhandler.h index 0bcc3d780..314244ae2 100644 --- a/src/main/include/log4cxx/varia/fallbackerrorhandler.h +++ b/src/main/include/log4cxx/varia/fallbackerrorhandler.h @@ -19,9 +19,6 @@ #define _LOG4CXX_VARIA_FALLBACK_ERROR_HANDLER_H #include -#if LOG4CXX_ABI_VERSION <= 15 -#include -#endif namespace LOG4CXX_NS { @@ -41,11 +38,7 @@ Here is a sample configuration file that installs this error handler: \include async-fall-back-example.xml */ class LOG4CXX_EXPORT FallbackErrorHandler -#if LOG4CXX_ABI_VERSION <= 15 - : public virtual spi::ErrorHandler -#else : public spi::ErrorHandler -#endif { private: LOG4CXX_DECLARE_PRIVATE_MEMBER_PTR(FallbackErrorHandlerPrivate, m_priv) @@ -73,14 +66,6 @@ class LOG4CXX_EXPORT FallbackErrorHandler */ void setLogger(const LoggerPtr& logger) override; -#if LOG4CXX_ABI_VERSION <= 15 - /** - \copybrief spi::OptionHandler::activateOptions() - - No action is performed in this implementation. - */ - void activateOptions( LOG4CXX_ACTIVATE_OPTIONS_FORMAL_PARAMETERS ) override; -#endif /** \copybrief spi::OptionHandler::setOption() @@ -120,11 +105,7 @@ class LOG4CXX_EXPORT FallbackErrorHandler /** Has an error been reported? */ -#if 15 < LOG4CXX_ABI_VERSION bool errorReported() const override; -#else - bool errorReported() const; -#endif }; LOG4CXX_PTR_DEF(FallbackErrorHandler); diff --git a/src/main/include/log4cxx/writerappender.h b/src/main/include/log4cxx/writerappender.h index ddb0f8886..8e4585f08 100644 --- a/src/main/include/log4cxx/writerappender.h +++ b/src/main/include/log4cxx/writerappender.h @@ -43,12 +43,7 @@ class LOG4CXX_EXPORT WriterAppender : public AppenderSkeleton This default constructor does nothing.*/ WriterAppender(); protected: -#if LOG4CXX_ABI_VERSION <= 15 - WriterAppender(const LayoutPtr& layout, helpers::WriterPtr& writer); - WriterAppender(const LayoutPtr& layout); -#else WriterAppender(const LayoutPtr& layout, const helpers::WriterPtr& writer = helpers::WriterPtr()); -#endif WriterAppender(std::unique_ptr priv); public: @@ -116,13 +111,6 @@ class LOG4CXX_EXPORT WriterAppender : public AppenderSkeleton void close() override; protected: -#if LOG4CXX_ABI_VERSION <= 15 - /** - * Close the underlying {@link log4cxx::helpers::Writer}. - * */ - [[ deprecated( "Use WriterAppenderPriv::close" ) ]] - void closeWriter(); -#endif /** Returns an OutputStreamWriter when passed an OutputStream. The @@ -157,23 +145,6 @@ class LOG4CXX_EXPORT WriterAppender : public AppenderSkeleton */ void setOption(const LogString& option, const LogString& value) override; -#if LOG4CXX_ABI_VERSION <= 15 - /** -

Send log output to \c writer which must be open and be writable. - -

The helpers::Writer will be closed when the - appender instance is closed. - - WARNING: Logging to an unopened Writer will fail. - - @param writer An already opened Writer. - */ - [[ deprecated( "Use WriterAppenderPriv::setWriter" ) ]] - void setWriter(const helpers::WriterPtr& writer); - - [[ deprecated( "Use WriterAppenderPriv::getWriter" ) ]] - const helpers::WriterPtr getWriter() const; -#endif bool requiresLayout() const override; @@ -184,25 +155,6 @@ class LOG4CXX_EXPORT WriterAppender : public AppenderSkeleton virtual void subAppend( LOG4CXX_APPEND_FORMAL_PARAMETERS ); -#if LOG4CXX_ABI_VERSION <= 15 - /** - Write a footer as produced by the embedded layout's - Layout#appendFooter method. */ - [[ deprecated( "Specialize Layout instead of Appender" ) ]] - virtual void writeFooter(helpers::Pool& p); - - /** - Write a header as produced by the embedded layout's - Layout#appendHeader method. */ - [[ deprecated( "Specialize Layout instead of Appender" ) ]] - virtual void writeHeader(helpers::Pool& p); - - /** - * Set the writer. Mutex must already be held. - */ - [[ deprecated( "Use WriterAppenderPriv::setWriter" ) ]] - void setWriterInternal(const helpers::WriterPtr& writer); -#endif private: // // prevent copy and assignment diff --git a/src/main/include/log4cxx/xml/domconfigurator.h b/src/main/include/log4cxx/xml/domconfigurator.h index 028aab40f..db9b18c9a 100644 --- a/src/main/include/log4cxx/xml/domconfigurator.h +++ b/src/main/include/log4cxx/xml/domconfigurator.h @@ -20,18 +20,6 @@ #include #include -#if LOG4CXX_ABI_VERSION <= 15 -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#endif #include #if LOG4CXX_HAS_DOMCONFIGURATOR @@ -64,155 +52,11 @@ files. You can enable log4cxx internal logging by setting the

There are sample XML files included in the package. */ class LOG4CXX_EXPORT DOMConfigurator -#if LOG4CXX_ABI_VERSION <= 15 - : virtual public spi::Configurator -#else : public spi::Configurator -#endif { public: ~DOMConfigurator(); -#if LOG4CXX_ABI_VERSION <= 15 - protected: - typedef std::map AppenderMap; - /** - Used internally to parse appenders by IDREF name. - */ - AppenderPtr findAppenderByName( - LOG4CXX_NS::helpers::Pool& p, - LOG4CXX_NS::helpers::CharsetDecoderPtr& utf8Decoder, - apr_xml_elem* elem, - apr_xml_doc* doc, - const LogString& appenderName, - AppenderMap& appenders); - - /** - Used internally to parse appenders by IDREF element. - */ - AppenderPtr findAppenderByReference( - LOG4CXX_NS::helpers::Pool& p, - LOG4CXX_NS::helpers::CharsetDecoderPtr& utf8Decoder, - apr_xml_elem* appenderRef, - apr_xml_doc* doc, - AppenderMap& appenders); - - /** - Used internally to parse an appender element. - */ - AppenderPtr parseAppender( - LOG4CXX_NS::helpers::Pool& p, - LOG4CXX_NS::helpers::CharsetDecoderPtr& utf8Decoder, - apr_xml_elem* appenderElement, - apr_xml_doc* doc, - AppenderMap& appenders); - - /** - Used internally to parse an {@link spi::ErrorHandler ErrorHandler } element. - */ - void parseErrorHandler( - LOG4CXX_NS::helpers::Pool& p, - LOG4CXX_NS::helpers::CharsetDecoderPtr& utf8Decoder, - apr_xml_elem* element, - AppenderPtr& appender, - apr_xml_doc* doc, - AppenderMap& appenders); - - /** - Used internally to parse a filter element. - */ - void parseFilters( - LOG4CXX_NS::helpers::Pool& p, - LOG4CXX_NS::helpers::CharsetDecoderPtr& utf8Decoder, - apr_xml_elem* element, - std::vector& filters); - - /** - Used internally to parse a logger element. - */ - void parseLogger( - LOG4CXX_NS::helpers::Pool& p, - LOG4CXX_NS::helpers::CharsetDecoderPtr& utf8Decoder, - apr_xml_elem* loggerElement, - apr_xml_doc* doc, - AppenderMap& appenders); - - /** - Used internally to parse the logger factory element. - */ - void parseLoggerFactory( - LOG4CXX_NS::helpers::Pool& p, - LOG4CXX_NS::helpers::CharsetDecoderPtr& utf8Decoder, - apr_xml_elem* factoryElement); - - /** - Used internally to parse the logger factory element. - */ - LOG4CXX_NS::helpers::ObjectPtr parseTriggeringPolicy( - LOG4CXX_NS::helpers::Pool& p, - LOG4CXX_NS::helpers::CharsetDecoderPtr& utf8Decoder, - apr_xml_elem* factoryElement); - - /** - Used internally to parse the logger factory element. - */ - LOG4CXX_NS::rolling::RollingPolicyPtr parseRollingPolicy( - LOG4CXX_NS::helpers::Pool& p, - LOG4CXX_NS::helpers::CharsetDecoderPtr& utf8Decoder, - apr_xml_elem* factoryElement); - - /** - Used internally to parse the root logger element. - */ - void parseRoot(LOG4CXX_NS::helpers::Pool& p, - LOG4CXX_NS::helpers::CharsetDecoderPtr& utf8Decoder, - apr_xml_elem* rootElement, apr_xml_doc* doc, AppenderMap& appenders); - - /** - Used internally to parse the children of a logger element. - */ - void parseChildrenOfLoggerElement( - LOG4CXX_NS::helpers::Pool& p, - LOG4CXX_NS::helpers::CharsetDecoderPtr& utf8Decoder, - apr_xml_elem* catElement, - LoggerPtr logger, bool isRoot, - apr_xml_doc* doc, - AppenderMap& appenders ); - - /** - Used internally to parse a layout element. - */ - LayoutPtr parseLayout( - LOG4CXX_NS::helpers::Pool& p, - LOG4CXX_NS::helpers::CharsetDecoderPtr& utf8Decoder, - apr_xml_elem* layout_element); - - /** - Used internally to parse a level element. - */ - void parseLevel( - LOG4CXX_NS::helpers::Pool& p, - LOG4CXX_NS::helpers::CharsetDecoderPtr& utf8Decoder, - apr_xml_elem* element, - LoggerPtr logger, bool isRoot); - - void setParameter( - LOG4CXX_NS::helpers::Pool& p, - LOG4CXX_NS::helpers::CharsetDecoderPtr& utf8Decoder, - apr_xml_elem* elem, - LOG4CXX_NS::config::PropertySetter& propSetter); - - /** - Used internally to configure the log4cxx framework from - an in-memory representation of an XML document. - */ - void parse( - LOG4CXX_NS::helpers::Pool& p, - LOG4CXX_NS::helpers::CharsetDecoderPtr& utf8Decoder, - apr_xml_elem* element, - apr_xml_doc* doc, - AppenderMap& appenders); -#endif // LOG4CXX_ABI_VERSION <= 15 public: DOMConfigurator(); @@ -222,110 +66,6 @@ class LOG4CXX_EXPORT DOMConfigurator LOG4CXX_CAST_ENTRY(spi::Configurator) END_LOG4CXX_CAST_MAP() -#if LOG4CXX_ABI_VERSION <= 15 - DOMConfigurator(LOG4CXX_NS::helpers::Pool& p); - - /** - A static version of #doConfigure. - */ - static spi::ConfigurationStatus configure(const char* filename) { return configure(std::string(filename)); } - /** - A static version of #doConfigure. - */ - static spi::ConfigurationStatus configure(const std::string& filename); -#if LOG4CXX_WCHAR_T_API - /** - A static version of #doConfigure. - */ - static spi::ConfigurationStatus configure(const wchar_t* filename) { return configure(std::wstring(filename)); } - /** - A static version of #doConfigure. - */ - static spi::ConfigurationStatus configure(const std::wstring& filename); -#endif -#if LOG4CXX_UNICHAR_API || LOG4CXX_LOGCHAR_IS_UNICHAR - /** - A static version of #doConfigure. - */ - static spi::ConfigurationStatus configure(const std::basic_string& filename); -#endif -#if LOG4CXX_CFSTRING_API - /** - A static version of #doConfigure. - */ - static spi::ConfigurationStatus configure(const CFStringRef& filename); -#endif - /** - Like #configureAndWatch(const File& filename, long delay) - except that the default delay as defined by - log4cxx::helpers::FileWatchdog#DEFAULT_DELAY is used. - @param configFilename A configuration file in XML format. - */ - static spi::ConfigurationStatus configureAndWatch(const std::string& configFilename); -#if LOG4CXX_WCHAR_T_API - /** - Like #configureAndWatch(const File& filename, long delay) - except that the default delay as defined by - log4cxx::helpers::FileWatchdog#DEFAULT_DELAY is used. - @param configFilename A configuration file in XML format. - */ - static spi::ConfigurationStatus configureAndWatch(const std::wstring& configFilename); -#endif -#if LOG4CXX_UNICHAR_API || LOG4CXX_LOGCHAR_IS_UNICHAR - /** - Like #configureAndWatch(const File& filename, long delay) - except that the default delay as defined by - log4cxx::helpers::FileWatchdog#DEFAULT_DELAY is used. - @param configFilename A configuration file in XML format. - */ - static spi::ConfigurationStatus configureAndWatch(const std::basic_string& configFilename); -#endif -#if LOG4CXX_CFSTRING_API - /** - Like #configureAndWatch(const File& filename, long delay) - except that the default delay as defined by - log4cxx::helpers::FileWatchdog#DEFAULT_DELAY is used. - @param configFilename A configuration file in XML format. - */ - static spi::ConfigurationStatus configureAndWatch(const CFStringRef& configFilename); -#endif - /** - Read the configuration file configFilename if it - exists. Moreover, a thread will be created that will periodically - check if configFilename has been created or - modified. The period is determined by the delay - argument. If a change or file creation is detected, then - configFilename is read to configure log4cxx. - - The thread will be stopped by a LogManager::shutdown call. - - @param configFilename A configuration file in XML format. - @param delay The delay in milliseconds to wait between each check. - */ - static spi::ConfigurationStatus configureAndWatch(const std::string& configFilename, - long delay); -#if LOG4CXX_WCHAR_T_API - /** - Refer #configureAndWatch(const File& filename, long delay) - */ - static spi::ConfigurationStatus configureAndWatch(const std::wstring& configFilename, - long delay); -#endif -#if LOG4CXX_UNICHAR_API || LOG4CXX_LOGCHAR_IS_UNICHAR - /** - Refer #configureAndWatch(const File& filename, long delay) - */ - static spi::ConfigurationStatus configureAndWatch(const std::basic_string& configFilename, - long delay); -#endif -#if LOG4CXX_CFSTRING_API - /** - Refer #configureAndWatch(const File& filename, long delay) - */ - static spi::ConfigurationStatus configureAndWatch(const CFStringRef& configFilename, - long delay); -#endif -#endif // LOG4CXX_ABI_VERSION <= 15 /** Interpret \c filename as an XML file and set up Log4cxx accordingly. @@ -341,11 +81,7 @@ class LOG4CXX_EXPORT DOMConfigurator */ spi::ConfigurationStatus doConfigure ( const File& filename -#if LOG4CXX_ABI_VERSION <= 15 - , spi::LoggerRepositoryPtr repository -#else , const spi::LoggerRepositoryPtr& repository = spi::LoggerRepositoryPtr() -#endif ) override; /** @@ -370,15 +106,6 @@ class LOG4CXX_EXPORT DOMConfigurator */ static spi::ConfigurationStatus configureAndWatch(const File& configFilename, long delay = 0); -#if LOG4CXX_ABI_VERSION <= 15 - protected: - static LogString getAttribute( - LOG4CXX_NS::helpers::CharsetDecoderPtr& utf8Decoder, - apr_xml_elem*, - const std::string& attrName); - - LogString subst(const LogString& value); -#endif private: // prevent assignment or copy statements diff --git a/src/main/include/log4cxx/xml/xmllayout.h b/src/main/include/log4cxx/xml/xmllayout.h index f135f8950..acd7f7e1b 100644 --- a/src/main/include/log4cxx/xml/xmllayout.h +++ b/src/main/include/log4cxx/xml/xmllayout.h @@ -97,15 +97,6 @@ class LOG4CXX_EXPORT XMLLayout : public Layout */ bool getProperties(); -#if LOG4CXX_ABI_VERSION <= 15 - using Layout::activateOptions; - /** - \copybrief spi::OptionHandler::activateOptions() - - No action is performed in this implementation. - */ - void activateOptions( LOG4CXX_ACTIVATE_OPTIONS_FORMAL_PARAMETERS ) override { } -#endif /** \copybrief spi::OptionHandler::setOption() diff --git a/src/test/cpp/customlogger/xlogger.cpp b/src/test/cpp/customlogger/xlogger.cpp index 1c1dcc43c..19da5e358 100644 --- a/src/test/cpp/customlogger/xlogger.cpp +++ b/src/test/cpp/customlogger/xlogger.cpp @@ -104,12 +104,6 @@ XFactory::XFactory() { } -#if LOG4CXX_ABI_VERSION <= 15 -LoggerPtr XFactory::makeNewLoggerInstance(helpers::Pool&, const LogString& name) const -{ - return LoggerPtr(new XLogger(name)); -} -#endif LoggerPtr XFactory::makeNewLoggerInstance(const LogString& name) const { diff --git a/src/test/cpp/customlogger/xlogger.h b/src/test/cpp/customlogger/xlogger.h index da32270ac..7bb6f8ed4 100644 --- a/src/test/cpp/customlogger/xlogger.h +++ b/src/test/cpp/customlogger/xlogger.h @@ -43,15 +43,7 @@ class XFactory XFactory(); -#if LOG4CXX_ABI_VERSION <= 15 - LoggerPtr makeNewLoggerInstance( - helpers::Pool& pool, - const LogString& name) const override; - - LoggerPtr makeNewLoggerInstance(const LogString& name) const; -#else LoggerPtr makeNewLoggerInstance(const LogString& name) const override; -#endif }; typedef std::shared_ptr XFactoryPtr; diff --git a/src/test/cpp/helpers/propertiestestcase.cpp b/src/test/cpp/helpers/propertiestestcase.cpp index 9a53f59d4..3a21ddb0d 100644 --- a/src/test/cpp/helpers/propertiestestcase.cpp +++ b/src/test/cpp/helpers/propertiestestcase.cpp @@ -302,12 +302,8 @@ LOGUNIT_CLASS(PropertiesTestCase) properties.setProperty(LOG4CXX_STR("Key"), LOG4CXX_STR("value2")); auto keys = properties.propertyNames(); auto keyCount = static_cast(keys.size()); -#if LOG4CXX_ABI_VERSION < 15 - LOGUNIT_ASSERT_EQUAL(keyCount, 2); -#else LOGUNIT_ASSERT_EQUAL(keyCount, 1); LOGUNIT_ASSERT_EQUAL(properties.get(LOG4CXX_STR("key")), LOG4CXX_STR("value2")); -#endif } }; diff --git a/src/test/cpp/loggerthresholdtests.cpp b/src/test/cpp/loggerthresholdtests.cpp index 1e4251cd8..9d9928d17 100644 --- a/src/test/cpp/loggerthresholdtests.cpp +++ b/src/test/cpp/loggerthresholdtests.cpp @@ -19,11 +19,7 @@ #include #include #include "logunit.h" -#if LOG4CXX_ABI_VERSION <= 15 -#include -#else #include -#endif #include /**** @@ -1902,11 +1898,7 @@ LOGUNIT_CLASS(LoggerThresholdConsistencyTest) LoggerPtr root = hierarchy->getRootLogger(); root->setLevel(Level::getWarn()); spi::LoggerFactoryPtr factory = -#if LOG4CXX_ABI_VERSION <= 15 - std::make_shared(); -#else std::make_shared(); -#endif LoggerPtr logger1 = hierarchy->getLogger(LOG4CXX_STR("factory.test1"), factory); LoggerPtr logger2 = hierarchy->getLogger(LOG4CXX_STR("factory.test2"), factory); diff --git a/src/test/cpp/net/socketappendertestcase.cpp b/src/test/cpp/net/socketappendertestcase.cpp index 10a00ef18..12f872b5c 100644 --- a/src/test/cpp/net/socketappendertestcase.cpp +++ b/src/test/cpp/net/socketappendertestcase.cpp @@ -46,9 +46,7 @@ class SocketAppenderTestCase : public AppenderSkeletonTestCase LOGUNIT_TEST(testDefaultThreshold); LOGUNIT_TEST(testSetOptionThreshold); LOGUNIT_TEST(testRetryConnectDefault); -#if 15 < LOG4CXX_ABI_VERSION LOGUNIT_TEST(testRetryConnectBSD); -#endif LOGUNIT_TEST_SUITE_END(); #ifdef _DEBUG @@ -81,10 +79,8 @@ class SocketAppenderTestCase : public AppenderSkeletonTestCase appender->setRemoteHost(LOG4CXX_STR("localhost")); appender->setReconnectionDelay(millisecondDelay); appender->setPort(tcpPort); -#if 15 < LOG4CXX_ABI_VERSION if (!socketImpl.empty()) appender->setSocketSubclass(socketImpl); -#endif appender->activateOptions(); BasicConfigurator::configure(appender); @@ -197,12 +193,10 @@ class SocketAppenderTestCase : public AppenderSkeletonTestCase testRetryConnect(); } -#if 15 < LOG4CXX_ABI_VERSION void testRetryConnectBSD() { testRetryConnect(LOG4CXX_STR("BSDSocket")); } -#endif }; LOGUNIT_TEST_SUITE_REGISTRATION(SocketAppenderTestCase); diff --git a/src/test/cpp/optionhandlertest.cpp b/src/test/cpp/optionhandlertest.cpp index 9e4d22068..80195dc20 100644 --- a/src/test/cpp/optionhandlertest.cpp +++ b/src/test/cpp/optionhandlertest.cpp @@ -113,7 +113,6 @@ class ABI_15_Specialized_Appender : public BaseAppender bool m_activated{ false }; }; -#if 15 < LOG4CXX_ABI_VERSION class ABI_16_Appender : public BaseAppender { public: @@ -132,18 +131,13 @@ class ABI_16_Appender : public BaseAppender bool m_activated{ false }; }; -#endif LOGUNIT_CLASS(OptionHandlerTest) { LOGUNIT_TEST_SUITE(OptionHandlerTest); LOGUNIT_TEST(ABI_15_AppenderTest); LOGUNIT_TEST(ABI_15_Specialized_AppenderTest); -#if LOG4CXX_ABI_VERSION <= 15 - LOGUNIT_TEST(ABI_15_Specialized_Appender_unagumented_activate_Test); -#else LOGUNIT_TEST(ABI_16_AppenderTest); -#endif LOGUNIT_TEST_SUITE_END(); public: @@ -169,19 +163,6 @@ LOGUNIT_CLASS(OptionHandlerTest) LOGUNIT_ASSERT(a15s.isActivated()); } -#if LOG4CXX_ABI_VERSION <= 15 - /** - * Checks all levels of the appender heirarchy are activated - */ - void ABI_15_Specialized_Appender_unagumented_activate_Test() - { - helpers::Pool p; - ABI_15_Specialized_Appender a15s; - a15s.activateOptions(); - LOGUNIT_ASSERT(a15s.isActivated()); - } - -#else /** * Checks all levels of the appender heirarchy are activated */ @@ -191,7 +172,6 @@ LOGUNIT_CLASS(OptionHandlerTest) a16.activateOptions(); LOGUNIT_ASSERT(a16.isActivated()); } -#endif }; From 988e55e7eb9ea0a823c8611379e81b0d8559e920 Mon Sep 17 00:00:00 2001 From: Stephen Webb Date: Fri, 18 Sep 2026 17:29:24 +1000 Subject: [PATCH 2/4] Replace conditional parameter-list variables with explicit types --- src/examples/cpp/custom-appender.cpp | 2 +- src/fuzzers/cpp/PatternLayoutFuzzer.cpp | 2 +- src/main/cpp/appenderskeleton.cpp | 10 ++++---- src/main/cpp/asyncappender.cpp | 6 ++--- src/main/cpp/bufferedwriter.cpp | 6 ++--- src/main/cpp/bytearrayoutputstream.cpp | 6 ++--- src/main/cpp/cacheddateformat.cpp | 4 ++-- src/main/cpp/classnamepatternconverter.cpp | 2 +- src/main/cpp/colorendpatternconverter.cpp | 2 +- src/main/cpp/colorstartpatternconverter.cpp | 2 +- src/main/cpp/consoleappender.cpp | 2 +- src/main/cpp/datepatternconverter.cpp | 6 ++--- src/main/cpp/dbappender.cpp | 4 ++-- src/main/cpp/errorhandler.cpp | 2 +- src/main/cpp/fileappender.cpp | 2 +- src/main/cpp/filelocationpatternconverter.cpp | 2 +- src/main/cpp/fileoutputstream.cpp | 6 ++--- src/main/cpp/filter.cpp | 2 +- src/main/cpp/filterbasedtriggeringpolicy.cpp | 2 +- src/main/cpp/fixedwindowrollingpolicy.cpp | 6 ++--- src/main/cpp/fmtlayout.cpp | 4 ++-- src/main/cpp/fulllocationpatternconverter.cpp | 2 +- src/main/cpp/gzcompressaction.cpp | 2 +- src/main/cpp/htmllayout.cpp | 6 ++--- src/main/cpp/inputstreamreader.cpp | 4 ++-- src/main/cpp/integerpatternconverter.cpp | 2 +- src/main/cpp/jsonlayout.cpp | 4 ++-- src/main/cpp/layout.cpp | 2 +- src/main/cpp/levelpatternconverter.cpp | 2 +- src/main/cpp/linelocationpatternconverter.cpp | 2 +- .../cpp/lineseparatorpatternconverter.cpp | 4 ++-- src/main/cpp/literalpatternconverter.cpp | 4 ++-- src/main/cpp/loggerpatternconverter.cpp | 2 +- src/main/cpp/loggingeventpatternconverter.cpp | 4 ++-- src/main/cpp/manualtriggeringpolicy.cpp | 2 +- src/main/cpp/mdcpatternconverter.cpp | 2 +- src/main/cpp/messagepatternconverter.cpp | 4 ++-- .../cpp/methodlocationpatternconverter.cpp | 2 +- .../cpp/multiprocessrollingfileappender.cpp | 6 ++--- src/main/cpp/ndcpatternconverter.cpp | 2 +- src/main/cpp/nteventlogappender.cpp | 4 ++-- src/main/cpp/odbcappender.cpp | 4 ++-- src/main/cpp/outputdebugstringappender.cpp | 2 +- src/main/cpp/outputstreamwriter.cpp | 6 ++--- src/main/cpp/patternlayout.cpp | 4 ++-- src/main/cpp/propertiespatternconverter.cpp | 2 +- src/main/cpp/relativetimedateformat.cpp | 2 +- src/main/cpp/relativetimepatternconverter.cpp | 2 +- src/main/cpp/rollingfileappender.cpp | 12 +++++----- src/main/cpp/rollingpolicybase.cpp | 2 +- .../cpp/shortfilelocationpatternconverter.cpp | 2 +- src/main/cpp/simpledateformat.cpp | 2 +- src/main/cpp/simplelayout.cpp | 2 +- src/main/cpp/sizebasedtriggeringpolicy.cpp | 2 +- src/main/cpp/smtpappender.cpp | 4 ++-- src/main/cpp/socketappenderskeleton.cpp | 2 +- src/main/cpp/socketoutputstream.cpp | 6 ++--- src/main/cpp/strftimedateformat.cpp | 2 +- src/main/cpp/syslogappender.cpp | 2 +- src/main/cpp/systemerrwriter.cpp | 6 ++--- src/main/cpp/systemoutwriter.cpp | 6 ++--- src/main/cpp/telnetappender.cpp | 4 ++-- src/main/cpp/threadpatternconverter.cpp | 2 +- .../cpp/threadusernamepatternconverter.cpp | 2 +- .../throwableinformationpatternconverter.cpp | 2 +- src/main/cpp/timebasedrollingpolicy.cpp | 6 ++--- src/main/cpp/writerappender.cpp | 8 +++---- src/main/cpp/xmllayout.cpp | 2 +- src/main/cpp/xmlsocketappender.cpp | 2 +- src/main/cpp/zipcompressaction.cpp | 2 +- src/main/include/log4cxx/appender.h | 2 -- src/main/include/log4cxx/appenderskeleton.h | 8 +++---- src/main/include/log4cxx/asyncappender.h | 4 ++-- src/main/include/log4cxx/consoleappender.h | 2 +- src/main/include/log4cxx/db/dbappender.h | 4 ++-- src/main/include/log4cxx/db/odbcappender.h | 4 ++-- src/main/include/log4cxx/fileappender.h | 2 +- .../include/log4cxx/filter/expressionfilter.h | 2 +- src/main/include/log4cxx/fmtlayout.h | 4 ++-- .../include/log4cxx/helpers/bufferedwriter.h | 6 ++--- .../log4cxx/helpers/bytearrayoutputstream.h | 6 ++--- .../log4cxx/helpers/cacheddateformat.h | 4 ++-- src/main/include/log4cxx/helpers/dateformat.h | 2 -- .../log4cxx/helpers/fileoutputstream.h | 6 ++--- .../log4cxx/helpers/inputstreamreader.h | 4 ++-- .../include/log4cxx/helpers/outputstream.h | 3 --- .../log4cxx/helpers/outputstreamwriter.h | 6 ++--- src/main/include/log4cxx/helpers/reader.h | 2 -- .../log4cxx/helpers/relativetimedateformat.h | 2 +- .../log4cxx/helpers/simpledateformat.h | 2 +- .../log4cxx/helpers/socketoutputstream.h | 6 ++--- .../log4cxx/helpers/strftimedateformat.h | 2 +- .../include/log4cxx/helpers/systemerrwriter.h | 6 ++--- .../include/log4cxx/helpers/systemoutwriter.h | 6 ++--- src/main/include/log4cxx/helpers/writer.h | 3 --- src/main/include/log4cxx/htmllayout.h | 6 ++--- src/main/include/log4cxx/jsonlayout.h | 4 ++-- src/main/include/log4cxx/layout.h | 5 +--- src/main/include/log4cxx/net/smtpappender.h | 4 ++-- .../log4cxx/net/socketappenderskeleton.h | 2 +- src/main/include/log4cxx/net/syslogappender.h | 2 +- src/main/include/log4cxx/net/telnetappender.h | 4 ++-- .../include/log4cxx/net/xmlsocketappender.h | 2 +- .../include/log4cxx/nt/nteventlogappender.h | 4 ++-- .../log4cxx/nt/outputdebugstringappender.h | 2 +- .../pattern/classnamepatternconverter.h | 2 +- .../pattern/colorendpatternconverter.h | 2 +- .../pattern/colorstartpatternconverter.h | 2 +- .../log4cxx/pattern/datepatternconverter.h | 4 ++-- .../pattern/filelocationpatternconverter.h | 2 +- .../pattern/fulllocationpatternconverter.h | 2 +- .../log4cxx/pattern/integerpatternconverter.h | 2 +- .../log4cxx/pattern/levelpatternconverter.h | 2 +- .../pattern/linelocationpatternconverter.h | 2 +- .../pattern/lineseparatorpatternconverter.h | 4 ++-- .../log4cxx/pattern/literalpatternconverter.h | 4 ++-- .../log4cxx/pattern/loggerpatternconverter.h | 2 +- .../pattern/loggingeventpatternconverter.h | 4 +--- .../log4cxx/pattern/mdcpatternconverter.h | 2 +- .../log4cxx/pattern/messagepatternconverter.h | 2 +- .../pattern/methodlocationpatternconverter.h | 2 +- .../log4cxx/pattern/ndcpatternconverter.h | 2 +- .../log4cxx/pattern/patternconverter.h | 1 - .../pattern/propertiespatternconverter.h | 2 +- .../pattern/relativetimepatternconverter.h | 2 +- .../shortfilelocationpatternconverter.h | 2 +- .../log4cxx/pattern/threadpatternconverter.h | 2 +- .../pattern/threadusernamepatternconverter.h | 2 +- .../throwableinformationpatternconverter.h | 2 +- src/main/include/log4cxx/patternlayout.h | 4 ++-- src/main/include/log4cxx/rolling/action.h | 1 - .../log4cxx/rolling/filerenameaction.h | 2 +- .../rolling/filterbasedtriggeringpolicy.h | 2 +- .../rolling/fixedwindowrollingpolicy.h | 6 ++--- .../log4cxx/rolling/gzcompressaction.h | 2 +- .../log4cxx/rolling/manualtriggeringpolicy.h | 2 +- .../rolling/multiprocessrollingfileappender.h | 4 ++-- .../log4cxx/rolling/rollingfileappender.h | 4 ++-- .../include/log4cxx/rolling/rollingpolicy.h | 2 -- .../log4cxx/rolling/rollingpolicybase.h | 2 +- .../rolling/sizebasedtriggeringpolicy.h | 2 +- .../log4cxx/rolling/timebasedrollingpolicy.h | 6 ++--- .../log4cxx/rolling/zipcompressaction.h | 2 +- src/main/include/log4cxx/simplelayout.h | 2 +- src/main/include/log4cxx/spi/errorhandler.h | 2 +- src/main/include/log4cxx/spi/filter.h | 2 +- src/main/include/log4cxx/spi/optionhandler.h | 2 -- src/main/include/log4cxx/writerappender.h | 6 ++--- src/main/include/log4cxx/xml/xmllayout.h | 2 +- src/site/doxy/Doxyfile.in | 23 ------------------- src/test/cpp/asyncappendertestcase.cpp | 14 +++++------ src/test/cpp/benchmark/benchmark.cpp | 2 +- src/test/cpp/levelchangetestcase.cpp | 2 +- src/test/cpp/loggertestcase.cpp | 2 +- .../cpp/nt/nteventlogappendertestcase.cpp | 2 +- src/test/cpp/optionhandlertest.cpp | 8 +++---- .../cpp/pattern/num343patternconverter.cpp | 2 +- src/test/cpp/pattern/num343patternconverter.h | 2 +- src/test/cpp/vectorappender.cpp | 2 +- src/test/cpp/vectorappender.h | 2 +- 160 files changed, 252 insertions(+), 298 deletions(-) diff --git a/src/examples/cpp/custom-appender.cpp b/src/examples/cpp/custom-appender.cpp index 879e16576..9594b67a3 100644 --- a/src/examples/cpp/custom-appender.cpp +++ b/src/examples/cpp/custom-appender.cpp @@ -40,7 +40,7 @@ class NullWriterAppender : public AppenderSkeleton { return false; } - void append( LOG4CXX_APPEND_FORMAL_PARAMETERS ) override { + void append( const spi::LoggingEventPtr& event ) override { // This gets called whenever there is a valid event for our appender. } diff --git a/src/fuzzers/cpp/PatternLayoutFuzzer.cpp b/src/fuzzers/cpp/PatternLayoutFuzzer.cpp index ad4d1d6d4..05019c1d9 100644 --- a/src/fuzzers/cpp/PatternLayoutFuzzer.cpp +++ b/src/fuzzers/cpp/PatternLayoutFuzzer.cpp @@ -49,7 +49,7 @@ class EncodingAppender : public AppenderSkeleton { return true; } - void append( LOG4CXX_APPEND_FORMAL_PARAMETERS ) override { + void append( const spi::LoggingEventPtr& event ) override { LogString msg; getLayout()->format(msg, event); } diff --git a/src/main/cpp/appenderskeleton.cpp b/src/main/cpp/appenderskeleton.cpp index 716fa6e0d..782d221e2 100644 --- a/src/main/cpp/appenderskeleton.cpp +++ b/src/main/cpp/appenderskeleton.cpp @@ -50,7 +50,7 @@ AppenderSkeleton::AppenderSkeleton(const LayoutPtr& layout) AppenderSkeleton::~AppenderSkeleton() {} -void AppenderSkeleton::activateOptions( LOG4CXX_ACTIVATE_OPTIONS_FORMAL_PARAMETERS ) +void AppenderSkeleton::activateOptions( ) { } @@ -81,14 +81,14 @@ bool AppenderSkeleton::isAsSevereAsThreshold(const LevelPtr& level) const return ((level == 0) || level->isGreaterOrEqual(m_priv->threshold)); } -void AppenderSkeleton::doAppend( LOG4CXX_APPEND_FORMAL_PARAMETERS ) +void AppenderSkeleton::doAppend( const spi::LoggingEventPtr& event ) { std::lock_guard lock(m_priv->mutex); - doAppendImpl( LOG4CXX_APPEND_PARAMETERS ); + doAppendImpl( event ); } -void AppenderSkeleton::doAppendImpl( LOG4CXX_APPEND_FORMAL_PARAMETERS ) +void AppenderSkeleton::doAppendImpl( const spi::LoggingEventPtr& event ) { if (m_priv->closed) { @@ -97,7 +97,7 @@ void AppenderSkeleton::doAppendImpl( LOG4CXX_APPEND_FORMAL_PARAMETERS ) } else if (isAsSevereAsThreshold(event->getLevel()) && isAccepted(event)) { - append( LOG4CXX_APPEND_PARAMETERS ); + append( event ); } } diff --git a/src/main/cpp/asyncappender.cpp b/src/main/cpp/asyncappender.cpp index 31872f7e4..d64a37633 100644 --- a/src/main/cpp/asyncappender.cpp +++ b/src/main/cpp/asyncappender.cpp @@ -336,12 +336,12 @@ void AsyncAppender::setOption(const LogString& option, } -void AsyncAppender::doAppend( LOG4CXX_APPEND_FORMAL_PARAMETERS ) +void AsyncAppender::doAppend( const spi::LoggingEventPtr& event ) { - doAppendImpl( LOG4CXX_APPEND_PARAMETERS ); + doAppendImpl( event ); } -void AsyncAppender::append( LOG4CXX_APPEND_FORMAL_PARAMETERS ) +void AsyncAppender::append( const spi::LoggingEventPtr& event ) { if (priv->bufferSize <= 0) { diff --git a/src/main/cpp/bufferedwriter.cpp b/src/main/cpp/bufferedwriter.cpp index db4d3e6c7..ff8fb10af 100644 --- a/src/main/cpp/bufferedwriter.cpp +++ b/src/main/cpp/bufferedwriter.cpp @@ -49,13 +49,13 @@ BufferedWriter::~BufferedWriter() { } -void BufferedWriter::close( LOG4CXX_CLOSE_WRITER_FORMAL_PARAMETERS ) +void BufferedWriter::close( ) { flush(); m_priv->out->close(); } -void BufferedWriter::flush( LOG4CXX_FLUSH_WRITER_FORMAL_PARAMETERS ) +void BufferedWriter::flush( ) { if (m_priv->buf.length() > 0) { @@ -64,7 +64,7 @@ void BufferedWriter::flush( LOG4CXX_FLUSH_WRITER_FORMAL_PARAMETERS ) } } -void BufferedWriter::write( LOG4CXX_WRITE_WRITER_FORMAL_PARAMETERS ) +void BufferedWriter::write( const LogString& str ) { if (m_priv->buf.length() + str.length() > m_priv->sz) { diff --git a/src/main/cpp/bytearrayoutputstream.cpp b/src/main/cpp/bytearrayoutputstream.cpp index 2c74a23b2..738b438e5 100644 --- a/src/main/cpp/bytearrayoutputstream.cpp +++ b/src/main/cpp/bytearrayoutputstream.cpp @@ -39,15 +39,15 @@ ByteArrayOutputStream::~ByteArrayOutputStream() { } -void ByteArrayOutputStream::close( LOG4CXX_CLOSE_OUTPUT_STREAM_FORMAL_PARAMETERS ) +void ByteArrayOutputStream::close( ) { } -void ByteArrayOutputStream::flush( LOG4CXX_FLUSH_OUTPUT_STREAM_FORMAL_PARAMETERS ) +void ByteArrayOutputStream::flush( ) { } -void ByteArrayOutputStream::write( LOG4CXX_WRITE_OUTPUT_STREAM_FORMAL_PARAMETERS ) +void ByteArrayOutputStream::write( ByteBuffer& buf ) { const size_t count = buf.remaining(); diff --git a/src/main/cpp/cacheddateformat.cpp b/src/main/cpp/cacheddateformat.cpp index b7daf8fd7..2938b085f 100644 --- a/src/main/cpp/cacheddateformat.cpp +++ b/src/main/cpp/cacheddateformat.cpp @@ -238,7 +238,7 @@ int CachedDateFormat::findMillisecondStart( * @param now Number of milliseconds after midnight 1 Jan 1970 GMT. * @param sbuf the string buffer to write to */ -void CachedDateFormat::format( LOG4CXX_FORMAT_TIME_FORMAL_PARAMETERS ) const +void CachedDateFormat::format( LogString& toAppendTo, log4cxx_time_t tm ) const { // @@ -338,7 +338,7 @@ void CachedDateFormat::setTimeZone(const TimeZonePtr& timeZone) -void CachedDateFormat::numberFormat( LOG4CXX_FORMAT_NUMBER_FORMAL_PARAMETERS ) const +void CachedDateFormat::numberFormat( LogString& toAppendTo, int n ) const { m_priv->formatter->numberFormat(toAppendTo, n); } diff --git a/src/main/cpp/classnamepatternconverter.cpp b/src/main/cpp/classnamepatternconverter.cpp index 1972d7dee..aad402bf9 100644 --- a/src/main/cpp/classnamepatternconverter.cpp +++ b/src/main/cpp/classnamepatternconverter.cpp @@ -40,7 +40,7 @@ PatternConverterPtr ClassNamePatternConverter::newInstance( return std::make_shared(options); } -void ClassNamePatternConverter::format( LOG4CXX_FORMAT_EVENT_FORMAL_PARAMETERS ) const +void ClassNamePatternConverter::format( const spi::LoggingEventPtr& event, LogString& toAppendTo ) const { auto initialLength = toAppendTo.length(); append(toAppendTo, event->getLocationInformation().getClassName()); diff --git a/src/main/cpp/colorendpatternconverter.cpp b/src/main/cpp/colorendpatternconverter.cpp index 24695cb5b..60d7db18e 100644 --- a/src/main/cpp/colorendpatternconverter.cpp +++ b/src/main/cpp/colorendpatternconverter.cpp @@ -41,7 +41,7 @@ PatternConverterPtr ColorEndPatternConverter::newInstance( return instance; } -void ColorEndPatternConverter::format( LOG4CXX_FORMAT_EVENT_FORMAL_PARAMETERS ) const +void ColorEndPatternConverter::format( const spi::LoggingEventPtr& event, LogString& toAppendTo ) const { // Reset all colors on the output(code 0) diff --git a/src/main/cpp/colorstartpatternconverter.cpp b/src/main/cpp/colorstartpatternconverter.cpp index 578797696..93c2c956c 100644 --- a/src/main/cpp/colorstartpatternconverter.cpp +++ b/src/main/cpp/colorstartpatternconverter.cpp @@ -158,7 +158,7 @@ PatternConverterPtr ColorStartPatternConverter::newInstance( return instance; } -void ColorStartPatternConverter::format( LOG4CXX_FORMAT_EVENT_FORMAL_PARAMETERS ) const +void ColorStartPatternConverter::format( const spi::LoggingEventPtr& event, LogString& toAppendTo ) const { LOG4CXX_NS::LevelPtr lvl = event->getLevel(); diff --git a/src/main/cpp/consoleappender.cpp b/src/main/cpp/consoleappender.cpp index f2a2da710..dbb4e5373 100644 --- a/src/main/cpp/consoleappender.cpp +++ b/src/main/cpp/consoleappender.cpp @@ -109,7 +109,7 @@ void ConsoleAppender::targetWarn(const LogString& val) LogLog::warn(LOG4CXX_STR("Using previously set target, System.out by default.")); } -void ConsoleAppender::activateOptions( LOG4CXX_ACTIVATE_OPTIONS_FORMAL_PARAMETERS ) +void ConsoleAppender::activateOptions( ) { if (StringHelper::equalsIgnoreCase(_priv->target, LOG4CXX_STR("SYSTEM.OUT"), LOG4CXX_STR("system.out"))) diff --git a/src/main/cpp/datepatternconverter.cpp b/src/main/cpp/datepatternconverter.cpp index f4e823dcc..8e238f075 100644 --- a/src/main/cpp/datepatternconverter.cpp +++ b/src/main/cpp/datepatternconverter.cpp @@ -144,7 +144,7 @@ PatternConverterPtr DatePatternConverter::newInstance( return std::make_shared(options); } -void DatePatternConverter::format( LOG4CXX_FORMAT_EVENT_FORMAL_PARAMETERS ) const +void DatePatternConverter::format( const spi::LoggingEventPtr& event, LogString& toAppendTo ) const { priv->df->format(toAppendTo, event->getTimeStamp()); } @@ -152,7 +152,7 @@ void DatePatternConverter::format( LOG4CXX_FORMAT_EVENT_FORMAL_PARAMETERS ) cons /** * {@inheritDoc} */ -void DatePatternConverter::format( LOG4CXX_FORMAT_OBJECT_FORMAL_PARAMETERS ) const +void DatePatternConverter::format( const helpers::ObjectPtr& obj, LogString& toAppendTo ) const { if (auto date = LOG4CXX_NS::cast(obj)) { @@ -160,7 +160,7 @@ void DatePatternConverter::format( LOG4CXX_FORMAT_OBJECT_FORMAL_PARAMETERS ) con } else if (auto event = LOG4CXX_NS::cast(obj)) { - format( LOG4CXX_FORMAT_EVENT_PARAMETERS ); + format( event, toAppendTo ); } } diff --git a/src/main/cpp/dbappender.cpp b/src/main/cpp/dbappender.cpp index 7552aa7b3..223656aa4 100644 --- a/src/main/cpp/dbappender.cpp +++ b/src/main/cpp/dbappender.cpp @@ -154,7 +154,7 @@ void DBAppender::setOption(const LogString& option, const LogString& value){ } } -void DBAppender::activateOptions( LOG4CXX_ACTIVATE_OPTIONS_FORMAL_PARAMETERS ) +void DBAppender::activateOptions( ) { apr_status_t stat = apr_dbd_get_driver(_priv->m_pool.getAPRPool(), _priv->driverName.c_str(), @@ -219,7 +219,7 @@ void DBAppender::activateOptions( LOG4CXX_ACTIVATE_OPTIONS_FORMAL_PARAMETERS ) } } -void DBAppender::append( LOG4CXX_APPEND_FORMAL_PARAMETERS ){ +void DBAppender::append( const spi::LoggingEventPtr& event ){ std::vector ls_args; std::vector args; int stat; diff --git a/src/main/cpp/errorhandler.cpp b/src/main/cpp/errorhandler.cpp index 7c0a2c9bc..4dbb47d8e 100644 --- a/src/main/cpp/errorhandler.cpp +++ b/src/main/cpp/errorhandler.cpp @@ -19,6 +19,6 @@ using namespace LOG4CXX_NS; using namespace LOG4CXX_NS::helpers; -void spi::ErrorHandler::activateOptions( LOG4CXX_ACTIVATE_OPTIONS_FORMAL_PARAMETERS ) +void spi::ErrorHandler::activateOptions( ) { } diff --git a/src/main/cpp/fileappender.cpp b/src/main/cpp/fileappender.cpp index 6ecefd11b..65fd53d28 100644 --- a/src/main/cpp/fileappender.cpp +++ b/src/main/cpp/fileappender.cpp @@ -159,7 +159,7 @@ void FileAppender::setOption(const LogString& option, } } -void FileAppender::activateOptions( LOG4CXX_ACTIVATE_OPTIONS_FORMAL_PARAMETERS ) +void FileAppender::activateOptions( ) { std::lock_guard lock(_priv->mutex); activateOptionsInternal(); diff --git a/src/main/cpp/filelocationpatternconverter.cpp b/src/main/cpp/filelocationpatternconverter.cpp index b0fc4062a..30cb62fdc 100644 --- a/src/main/cpp/filelocationpatternconverter.cpp +++ b/src/main/cpp/filelocationpatternconverter.cpp @@ -38,7 +38,7 @@ PatternConverterPtr FileLocationPatternConverter::newInstance( return std::make_shared(); } -void FileLocationPatternConverter::format( LOG4CXX_FORMAT_EVENT_FORMAL_PARAMETERS ) const +void FileLocationPatternConverter::format( const spi::LoggingEventPtr& event, LogString& toAppendTo ) const { append(toAppendTo, event->getLocationInformation().getFileName()); } diff --git a/src/main/cpp/fileoutputstream.cpp b/src/main/cpp/fileoutputstream.cpp index ef6adf129..e72dd595c 100644 --- a/src/main/cpp/fileoutputstream.cpp +++ b/src/main/cpp/fileoutputstream.cpp @@ -81,7 +81,7 @@ FileOutputStream::~FileOutputStream() } } -void FileOutputStream::close( LOG4CXX_CLOSE_OUTPUT_STREAM_FORMAL_PARAMETERS ) +void FileOutputStream::close( ) { if (m_priv->fileptr) { @@ -96,11 +96,11 @@ void FileOutputStream::close( LOG4CXX_CLOSE_OUTPUT_STREAM_FORMAL_PARAMETERS ) } } -void FileOutputStream::flush( LOG4CXX_FLUSH_OUTPUT_STREAM_FORMAL_PARAMETERS ) +void FileOutputStream::flush( ) { } -void FileOutputStream::write( LOG4CXX_WRITE_OUTPUT_STREAM_FORMAL_PARAMETERS ) +void FileOutputStream::write( ByteBuffer& buf ) { if (m_priv->fileptr == NULL) { diff --git a/src/main/cpp/filter.cpp b/src/main/cpp/filter.cpp index 5a9e838dd..8d011f7b2 100644 --- a/src/main/cpp/filter.cpp +++ b/src/main/cpp/filter.cpp @@ -45,7 +45,7 @@ void Filter::setNext(const FilterPtr& newNext) m_priv->next = newNext; } -void Filter::activateOptions( LOG4CXX_ACTIVATE_OPTIONS_FORMAL_PARAMETERS ) +void Filter::activateOptions( ) { } diff --git a/src/main/cpp/filterbasedtriggeringpolicy.cpp b/src/main/cpp/filterbasedtriggeringpolicy.cpp index 0d77c881b..4a45d5d06 100644 --- a/src/main/cpp/filterbasedtriggeringpolicy.cpp +++ b/src/main/cpp/filterbasedtriggeringpolicy.cpp @@ -111,7 +111,7 @@ LOG4CXX_NS::spi::FilterPtr& FilterBasedTriggeringPolicy::getFilter() /** * Prepares the instance for use. */ -void FilterBasedTriggeringPolicy::activateOptions( LOG4CXX_ACTIVATE_OPTIONS_FORMAL_PARAMETERS ) +void FilterBasedTriggeringPolicy::activateOptions( ) { for (LOG4CXX_NS::spi::FilterPtr f = m_priv->headFilter; f != NULL; f = f->getNext()) { diff --git a/src/main/cpp/fixedwindowrollingpolicy.cpp b/src/main/cpp/fixedwindowrollingpolicy.cpp index ff0162dd4..77a720244 100644 --- a/src/main/cpp/fixedwindowrollingpolicy.cpp +++ b/src/main/cpp/fixedwindowrollingpolicy.cpp @@ -99,7 +99,7 @@ void FixedWindowRollingPolicy::setOption(const LogString& option, /** * {@inheritDoc} */ -void FixedWindowRollingPolicy::activateOptions( LOG4CXX_ACTIVATE_OPTIONS_FORMAL_PARAMETERS ) +void FixedWindowRollingPolicy::activateOptions( ) { priv->activateOptions(getFormatSpecifiers()); @@ -127,7 +127,7 @@ void FixedWindowRollingPolicy::activateOptions( LOG4CXX_ACTIVATE_OPTIONS_FORMAL_ /** * {@inheritDoc} */ -RolloverDescriptionPtr FixedWindowRollingPolicy::initialize( LOG4CXX_ROLLING_POLICY_INITIALIZE_FORMAL_PARAMETERS ) +RolloverDescriptionPtr FixedWindowRollingPolicy::initialize( const LogString& currentActiveFile, bool append ) { LogString newActiveFile(currentActiveFile); priv->explicitActiveFile = false; @@ -154,7 +154,7 @@ RolloverDescriptionPtr FixedWindowRollingPolicy::initialize( LOG4CXX_ROLLING_POL /** * {@inheritDoc} */ -RolloverDescriptionPtr FixedWindowRollingPolicy::rollover( LOG4CXX_ROLLING_POLICY_ROLLOVER_FORMAL_PARAMETERS ) +RolloverDescriptionPtr FixedWindowRollingPolicy::rollover( const LogString& currentActiveFile, bool append ) { RolloverDescriptionPtr desc; diff --git a/src/main/cpp/fmtlayout.cpp b/src/main/cpp/fmtlayout.cpp index 80b9e6454..46005630b 100644 --- a/src/main/cpp/fmtlayout.cpp +++ b/src/main/cpp/fmtlayout.cpp @@ -83,12 +83,12 @@ void FMTLayout::setOption(const LogString& option, const LogString& value) Layout::setOption(option, value); } -void FMTLayout::activateOptions( LOG4CXX_ACTIVATE_OPTIONS_FORMAL_PARAMETERS ) +void FMTLayout::activateOptions( ) { m_priv->expectedPatternLength = priv::doubledLayoutSize(getFormattedEventCharacterCount()); } -void FMTLayout::format( LOG4CXX_FORMAT_LAYOUT_FORMAL_PARAMETERS ) const +void FMTLayout::format( LogString& output, const spi::LoggingEventPtr& event ) const { auto& lsMsg = event->getRenderedMessage(); priv::reserveFormattedEvent(output, m_priv->expectedPatternLength, lsMsg.size()); diff --git a/src/main/cpp/fulllocationpatternconverter.cpp b/src/main/cpp/fulllocationpatternconverter.cpp index fe7aee5d3..42923c38d 100644 --- a/src/main/cpp/fulllocationpatternconverter.cpp +++ b/src/main/cpp/fulllocationpatternconverter.cpp @@ -40,7 +40,7 @@ PatternConverterPtr FullLocationPatternConverter::newInstance( return std::make_shared(); } -void FullLocationPatternConverter::format( LOG4CXX_FORMAT_EVENT_FORMAL_PARAMETERS ) const +void FullLocationPatternConverter::format( const spi::LoggingEventPtr& event, LogString& toAppendTo ) const { append(toAppendTo, event->getLocationInformation().getFileName()); toAppendTo.append(1, (logchar) 0x28 /* '(' */); diff --git a/src/main/cpp/gzcompressaction.cpp b/src/main/cpp/gzcompressaction.cpp index 8747cdcef..cf0472c87 100644 --- a/src/main/cpp/gzcompressaction.cpp +++ b/src/main/cpp/gzcompressaction.cpp @@ -60,7 +60,7 @@ GZCompressAction::GZCompressAction(const File& src, GZCompressAction::~GZCompressAction() {} -bool GZCompressAction::execute( LOG4CXX_EXECUTE_ACTION_FORMAL_PARAMETERS ) const +bool GZCompressAction::execute( ) const { if (priv->source.exists()) { diff --git a/src/main/cpp/htmllayout.cpp b/src/main/cpp/htmllayout.cpp index 67e9c4856..053b15643 100644 --- a/src/main/cpp/htmllayout.cpp +++ b/src/main/cpp/htmllayout.cpp @@ -83,7 +83,7 @@ void HTMLLayout::setOption(const LogString& option, Layout::setOption(option, value); } -void HTMLLayout::format( LOG4CXX_FORMAT_LAYOUT_FORMAL_PARAMETERS ) const +void HTMLLayout::format( LogString& output, const spi::LoggingEventPtr& event ) const { auto& lsMsg = event->getRenderedMessage(); priv::reserveFormattedEvent(output, m_priv->expectedPatternLength, lsMsg.size()); @@ -174,7 +174,7 @@ void HTMLLayout::format( LOG4CXX_FORMAT_LAYOUT_FORMAL_PARAMETERS ) const } } -void HTMLLayout::appendHeader( LOG4CXX_APPEND_HEADER_FORMAL_PARAMETERS ) +void HTMLLayout::appendHeader( LogString& output ) { output.append(LOG4CXX_STR("")); output.append(LOG4CXX_EOL); diff --git a/src/main/cpp/inputstreamreader.cpp b/src/main/cpp/inputstreamreader.cpp index d18deb3bd..671ed090a 100644 --- a/src/main/cpp/inputstreamreader.cpp +++ b/src/main/cpp/inputstreamreader.cpp @@ -65,12 +65,12 @@ InputStreamReader::~InputStreamReader() { } -void InputStreamReader::close( LOG4CXX_CLOSE_READER_FORMAL_PARAMETERS ) +void InputStreamReader::close( ) { m_priv->in->close(); } -LogString InputStreamReader::read( LOG4CXX_READ_READER_FORMAL_PARAMETERS ) +LogString InputStreamReader::read( ) { const size_t BUFSIZE = 4096; char stackStorage[BUFSIZE]; diff --git a/src/main/cpp/integerpatternconverter.cpp b/src/main/cpp/integerpatternconverter.cpp index 284c6d36a..b55ef457e 100644 --- a/src/main/cpp/integerpatternconverter.cpp +++ b/src/main/cpp/integerpatternconverter.cpp @@ -38,7 +38,7 @@ PatternConverterPtr IntegerPatternConverter::newInstance( return std::make_shared(); } -void IntegerPatternConverter::format( LOG4CXX_FORMAT_OBJECT_FORMAL_PARAMETERS ) const +void IntegerPatternConverter::format( const helpers::ObjectPtr& obj, LogString& toAppendTo ) const { IntegerPtr i = LOG4CXX_NS::cast(obj); diff --git a/src/main/cpp/jsonlayout.cpp b/src/main/cpp/jsonlayout.cpp index 49763b60b..ad04b76cc 100644 --- a/src/main/cpp/jsonlayout.cpp +++ b/src/main/cpp/jsonlayout.cpp @@ -105,7 +105,7 @@ LogString JSONLayout::getContentType() const return LOG4CXX_STR("application/json"); } -void JSONLayout::activateOptions( LOG4CXX_ACTIVATE_OPTIONS_FORMAL_PARAMETERS ) +void JSONLayout::activateOptions( ) { m_priv->expectedPatternLength = priv::doubledLayoutSize(getFormattedEventCharacterCount()); } @@ -131,7 +131,7 @@ void JSONLayout::setOption(const LogString& option, const LogString& value) Layout::setOption(option, value); } -void JSONLayout::format( LOG4CXX_FORMAT_LAYOUT_FORMAL_PARAMETERS ) const +void JSONLayout::format( LogString& output, const spi::LoggingEventPtr& event ) const { auto& lsMsg = event->getRenderedMessage(); priv::reserveFormattedEvent(output, m_priv->expectedPatternLength, lsMsg.size()); diff --git a/src/main/cpp/layout.cpp b/src/main/cpp/layout.cpp index ffe43b0ce..c04c5a0c6 100644 --- a/src/main/cpp/layout.cpp +++ b/src/main/cpp/layout.cpp @@ -67,6 +67,6 @@ size_t Layout::getFormattedEventCharacterCount() const return text.size(); } -void Layout::activateOptions( LOG4CXX_ACTIVATE_OPTIONS_FORMAL_PARAMETERS ) +void Layout::activateOptions( ) { } diff --git a/src/main/cpp/levelpatternconverter.cpp b/src/main/cpp/levelpatternconverter.cpp index 2994d091e..1260dba1e 100644 --- a/src/main/cpp/levelpatternconverter.cpp +++ b/src/main/cpp/levelpatternconverter.cpp @@ -41,7 +41,7 @@ PatternConverterPtr LevelPatternConverter::newInstance( return std::make_shared(); } -void LevelPatternConverter::format( LOG4CXX_FORMAT_EVENT_FORMAL_PARAMETERS ) const +void LevelPatternConverter::format( const spi::LoggingEventPtr& event, LogString& toAppendTo ) const { toAppendTo.append(event->getLevel()->toString()); } diff --git a/src/main/cpp/linelocationpatternconverter.cpp b/src/main/cpp/linelocationpatternconverter.cpp index 7e22bb5ac..b6b1ab7b1 100644 --- a/src/main/cpp/linelocationpatternconverter.cpp +++ b/src/main/cpp/linelocationpatternconverter.cpp @@ -40,7 +40,7 @@ PatternConverterPtr LineLocationPatternConverter::newInstance( return std::make_shared(); } -void LineLocationPatternConverter::format( LOG4CXX_FORMAT_EVENT_FORMAL_PARAMETERS ) const +void LineLocationPatternConverter::format( const spi::LoggingEventPtr& event, LogString& toAppendTo ) const { StringHelper::toString( event->getLocationInformation().getLineNumber(), diff --git a/src/main/cpp/lineseparatorpatternconverter.cpp b/src/main/cpp/lineseparatorpatternconverter.cpp index 624dc0da1..9716f6782 100644 --- a/src/main/cpp/lineseparatorpatternconverter.cpp +++ b/src/main/cpp/lineseparatorpatternconverter.cpp @@ -39,12 +39,12 @@ PatternConverterPtr LineSeparatorPatternConverter::newInstance( return std::make_shared(); } -void LineSeparatorPatternConverter::format( LOG4CXX_FORMAT_EVENT_FORMAL_PARAMETERS ) const +void LineSeparatorPatternConverter::format( const spi::LoggingEventPtr& event, LogString& toAppendTo ) const { toAppendTo.append(LOG4CXX_EOL); } -void LineSeparatorPatternConverter::format( LOG4CXX_FORMAT_OBJECT_FORMAL_PARAMETERS ) const +void LineSeparatorPatternConverter::format( const helpers::ObjectPtr& obj, LogString& toAppendTo ) const { toAppendTo.append(LOG4CXX_EOL); } diff --git a/src/main/cpp/literalpatternconverter.cpp b/src/main/cpp/literalpatternconverter.cpp index 04ef8f238..0a81234c5 100644 --- a/src/main/cpp/literalpatternconverter.cpp +++ b/src/main/cpp/literalpatternconverter.cpp @@ -60,12 +60,12 @@ PatternConverterPtr LiteralPatternConverter::newInstance( return std::make_shared(literal); } -void LiteralPatternConverter::format( LOG4CXX_FORMAT_EVENT_FORMAL_PARAMETERS ) const +void LiteralPatternConverter::format( const spi::LoggingEventPtr& event, LogString& toAppendTo ) const { toAppendTo.append(priv->literal); } -void LiteralPatternConverter::format( LOG4CXX_FORMAT_OBJECT_FORMAL_PARAMETERS ) const +void LiteralPatternConverter::format( const helpers::ObjectPtr& obj, LogString& toAppendTo ) const { toAppendTo.append(priv->literal); } diff --git a/src/main/cpp/loggerpatternconverter.cpp b/src/main/cpp/loggerpatternconverter.cpp index 3704b7dc3..418139d64 100644 --- a/src/main/cpp/loggerpatternconverter.cpp +++ b/src/main/cpp/loggerpatternconverter.cpp @@ -40,7 +40,7 @@ PatternConverterPtr LoggerPatternConverter::newInstance( return std::make_shared(options); } -void LoggerPatternConverter::format( LOG4CXX_FORMAT_EVENT_FORMAL_PARAMETERS ) const +void LoggerPatternConverter::format( const spi::LoggingEventPtr& event, LogString& toAppendTo ) const { auto initialLength = toAppendTo.length(); toAppendTo.append(event->getLoggerName()); diff --git a/src/main/cpp/loggingeventpatternconverter.cpp b/src/main/cpp/loggingeventpatternconverter.cpp index 827b82a84..75b771ed8 100644 --- a/src/main/cpp/loggingeventpatternconverter.cpp +++ b/src/main/cpp/loggingeventpatternconverter.cpp @@ -40,11 +40,11 @@ LoggingEventPatternConverter::LoggingEventPatternConverter(std::unique_ptr(obj)) { - format( LOG4CXX_FORMAT_EVENT_PARAMETERS ); + format( event, toAppendTo ); } } diff --git a/src/main/cpp/manualtriggeringpolicy.cpp b/src/main/cpp/manualtriggeringpolicy.cpp index 3557320f6..b88a01505 100644 --- a/src/main/cpp/manualtriggeringpolicy.cpp +++ b/src/main/cpp/manualtriggeringpolicy.cpp @@ -37,7 +37,7 @@ bool ManualTriggeringPolicy::isTriggeringEvent(Appender* /* appender */, return false; } -void ManualTriggeringPolicy::activateOptions( LOG4CXX_ACTIVATE_OPTIONS_FORMAL_PARAMETERS ) +void ManualTriggeringPolicy::activateOptions( ) { } diff --git a/src/main/cpp/mdcpatternconverter.cpp b/src/main/cpp/mdcpatternconverter.cpp index aafd4a3a3..bf6c581fb 100644 --- a/src/main/cpp/mdcpatternconverter.cpp +++ b/src/main/cpp/mdcpatternconverter.cpp @@ -42,7 +42,7 @@ PatternConverterPtr MDCPatternConverter::newInstance( return std::make_shared(LogString(), options.front()); } -void MDCPatternConverter::format( LOG4CXX_FORMAT_EVENT_FORMAL_PARAMETERS ) const +void MDCPatternConverter::format( const spi::LoggingEventPtr& event, LogString& toAppendTo ) const { size_t startIndex = toAppendTo.size(); auto& info = getFormattingInfo(); diff --git a/src/main/cpp/messagepatternconverter.cpp b/src/main/cpp/messagepatternconverter.cpp index aae8f9159..2c9783f0d 100644 --- a/src/main/cpp/messagepatternconverter.cpp +++ b/src/main/cpp/messagepatternconverter.cpp @@ -42,7 +42,7 @@ class QuotedMessagePatternConverter : public LoggingEventPatternConverter using LoggingEventPatternConverter::format; // Duplicate any quote character in the event message - void format( LOG4CXX_FORMAT_EVENT_FORMAL_PARAMETERS ) const override + void format( const spi::LoggingEventPtr& event, LogString& toAppendTo ) const override { auto& input = event->getRenderedMessage(); size_t endIndex, startIndex = 0; @@ -73,7 +73,7 @@ PatternConverterPtr MessagePatternConverter::newInstance( return std::make_shared(options.front().front()); } -void MessagePatternConverter::format( LOG4CXX_FORMAT_EVENT_FORMAL_PARAMETERS ) const +void MessagePatternConverter::format( const spi::LoggingEventPtr& event, LogString& toAppendTo ) const { auto& msg = event->getRenderedMessage(); auto& info = getFormattingInfo(); diff --git a/src/main/cpp/methodlocationpatternconverter.cpp b/src/main/cpp/methodlocationpatternconverter.cpp index f6415e71f..7e57ce063 100644 --- a/src/main/cpp/methodlocationpatternconverter.cpp +++ b/src/main/cpp/methodlocationpatternconverter.cpp @@ -39,7 +39,7 @@ PatternConverterPtr MethodLocationPatternConverter::newInstance( return std::make_shared(); } -void MethodLocationPatternConverter::format( LOG4CXX_FORMAT_EVENT_FORMAL_PARAMETERS ) const +void MethodLocationPatternConverter::format( const spi::LoggingEventPtr& event, LogString& toAppendTo ) const { append(toAppendTo, event->getLocationInformation().getMethodName()); } diff --git a/src/main/cpp/multiprocessrollingfileappender.cpp b/src/main/cpp/multiprocessrollingfileappender.cpp index a15955216..eb847993f 100644 --- a/src/main/cpp/multiprocessrollingfileappender.cpp +++ b/src/main/cpp/multiprocessrollingfileappender.cpp @@ -153,7 +153,7 @@ MultiprocessRollingFileAppender::MultiprocessRollingFileAppender() /** * Prepare instance of use. */ -void MultiprocessRollingFileAppender::activateOptions( LOG4CXX_ACTIVATE_OPTIONS_FORMAL_PARAMETERS ) +void MultiprocessRollingFileAppender::activateOptions( ) { if (_priv->activateOptions()) { @@ -410,7 +410,7 @@ void MultiprocessRollingFileAppender::reopenFile(const LogString& fileName) /** * {@inheritDoc} */ -void MultiprocessRollingFileAppender::subAppend( LOG4CXX_APPEND_FORMAL_PARAMETERS ) +void MultiprocessRollingFileAppender::subAppend( const spi::LoggingEventPtr& event ) { // The rollover check must precede actual writing. This is the // only correct behavior for time driven triggers. @@ -440,7 +440,7 @@ void MultiprocessRollingFileAppender::subAppend( LOG4CXX_APPEND_FORMAL_PARAMETER else if (isAlreadyRolled(fileName, &_priv->fileLength)) reopenFile(fileName); - FileAppender::subAppend( LOG4CXX_APPEND_PARAMETERS ); + FileAppender::subAppend( event ); } /** diff --git a/src/main/cpp/ndcpatternconverter.cpp b/src/main/cpp/ndcpatternconverter.cpp index 5e7a98a22..d2696ecac 100644 --- a/src/main/cpp/ndcpatternconverter.cpp +++ b/src/main/cpp/ndcpatternconverter.cpp @@ -39,7 +39,7 @@ PatternConverterPtr NDCPatternConverter::newInstance( return std::make_shared(); } -void NDCPatternConverter::format( LOG4CXX_FORMAT_EVENT_FORMAL_PARAMETERS ) const +void NDCPatternConverter::format( const spi::LoggingEventPtr& event, LogString& toAppendTo ) const { LogString value; if (event->getNDC(value)) diff --git a/src/main/cpp/nteventlogappender.cpp b/src/main/cpp/nteventlogappender.cpp index 33ca9680d..26e283e13 100644 --- a/src/main/cpp/nteventlogappender.cpp +++ b/src/main/cpp/nteventlogappender.cpp @@ -175,7 +175,7 @@ void NTEventLogAppender::setOption(const LogString& option, const LogString& val } } -void NTEventLogAppender::activateOptions( LOG4CXX_ACTIVATE_OPTIONS_FORMAL_PARAMETERS ) +void NTEventLogAppender::activateOptions( ) { if (priv->source.empty()) { @@ -214,7 +214,7 @@ void NTEventLogAppender::activateOptions( LOG4CXX_ACTIVATE_OPTIONS_FORMAL_PARAME } } -void NTEventLogAppender::append( LOG4CXX_APPEND_FORMAL_PARAMETERS ) +void NTEventLogAppender::append( const spi::LoggingEventPtr& event ) { if (priv->hEventLog == NULL) { diff --git a/src/main/cpp/odbcappender.cpp b/src/main/cpp/odbcappender.cpp index 9f3e5970c..c63aad73d 100644 --- a/src/main/cpp/odbcappender.cpp +++ b/src/main/cpp/odbcappender.cpp @@ -218,7 +218,7 @@ bool ODBCAppender::requiresLayout() const return false; } -void ODBCAppender::activateOptions( LOG4CXX_ACTIVATE_OPTIONS_FORMAL_PARAMETERS ) +void ODBCAppender::activateOptions( ) { #if !LOG4CXX_HAVE_ODBC || LOG4CXX_LOGCHAR_IS_UNICHAR LogLog::error(LOG4CXX_STR("Can not activate ODBCAppender unless compiled with ODBC support.")); @@ -260,7 +260,7 @@ void ODBCAppender::activateOptions( LOG4CXX_ACTIVATE_OPTIONS_FORMAL_PARAMETERS ) } -void ODBCAppender::append( LOG4CXX_APPEND_FORMAL_PARAMETERS ) +void ODBCAppender::append( const spi::LoggingEventPtr& event ) { #if LOG4CXX_HAVE_ODBC && !LOG4CXX_LOGCHAR_IS_UNICHAR _priv->buffer.push_back(event); diff --git a/src/main/cpp/outputdebugstringappender.cpp b/src/main/cpp/outputdebugstringappender.cpp index bf862ae20..10ab78d27 100644 --- a/src/main/cpp/outputdebugstringappender.cpp +++ b/src/main/cpp/outputdebugstringappender.cpp @@ -32,7 +32,7 @@ OutputDebugStringAppender::OutputDebugStringAppender() { } -void OutputDebugStringAppender::append( LOG4CXX_APPEND_FORMAL_PARAMETERS ) +void OutputDebugStringAppender::append( const spi::LoggingEventPtr& event ) { LogString buf; this->m_priv->layout->format(buf, event); diff --git a/src/main/cpp/outputstreamwriter.cpp b/src/main/cpp/outputstreamwriter.cpp index 51d0f4275..a0f778b5e 100644 --- a/src/main/cpp/outputstreamwriter.cpp +++ b/src/main/cpp/outputstreamwriter.cpp @@ -71,17 +71,17 @@ OutputStreamWriter::~OutputStreamWriter() { } -void OutputStreamWriter::close( LOG4CXX_CLOSE_WRITER_FORMAL_PARAMETERS ) +void OutputStreamWriter::close( ) { m_priv->out->close(); } -void OutputStreamWriter::flush( LOG4CXX_FLUSH_WRITER_FORMAL_PARAMETERS ) +void OutputStreamWriter::flush( ) { m_priv->out->flush(); } -void OutputStreamWriter::write( LOG4CXX_WRITE_WRITER_FORMAL_PARAMETERS ) +void OutputStreamWriter::write( const LogString& str ) { if (str.empty()) return; diff --git a/src/main/cpp/patternlayout.cpp b/src/main/cpp/patternlayout.cpp index 06403e078..dd0ae7559 100644 --- a/src/main/cpp/patternlayout.cpp +++ b/src/main/cpp/patternlayout.cpp @@ -112,7 +112,7 @@ void PatternLayout::setConversionPattern(const LogString& pattern) activateOptions(); } -void PatternLayout::format( LOG4CXX_FORMAT_LAYOUT_FORMAL_PARAMETERS ) const +void PatternLayout::format( LogString& output, const spi::LoggingEventPtr& event ) const { auto& lsMsg = event->getRenderedMessage(); priv::reserveFormattedEvent(output, m_priv->expectedPatternLength, lsMsg.size()); @@ -168,7 +168,7 @@ void PatternLayout::setOption(const LogString& option, const LogString& value) Layout::setOption(option, value); } -void PatternLayout::activateOptions( LOG4CXX_ACTIVATE_OPTIONS_FORMAL_PARAMETERS ) +void PatternLayout::activateOptions( ) { LogString pat(m_priv->conversionPattern); diff --git a/src/main/cpp/propertiespatternconverter.cpp b/src/main/cpp/propertiespatternconverter.cpp index efa47a734..b40110630 100644 --- a/src/main/cpp/propertiespatternconverter.cpp +++ b/src/main/cpp/propertiespatternconverter.cpp @@ -66,7 +66,7 @@ PatternConverterPtr PropertiesPatternConverter::newInstance( return std::make_shared(converterName, options[0]); } -void PropertiesPatternConverter::format( LOG4CXX_FORMAT_EVENT_FORMAL_PARAMETERS ) const +void PropertiesPatternConverter::format( const spi::LoggingEventPtr& event, LogString& toAppendTo ) const { if (priv->option.length() == 0) { diff --git a/src/main/cpp/relativetimedateformat.cpp b/src/main/cpp/relativetimedateformat.cpp index bcf93d347..6a703f981 100644 --- a/src/main/cpp/relativetimedateformat.cpp +++ b/src/main/cpp/relativetimedateformat.cpp @@ -26,7 +26,7 @@ LOG4CXX_NS::helpers::RelativeTimeDateFormat::RelativeTimeDateFormat() { } -void LOG4CXX_NS::helpers::RelativeTimeDateFormat::format( LOG4CXX_FORMAT_TIME_FORMAL_PARAMETERS ) const +void LOG4CXX_NS::helpers::RelativeTimeDateFormat::format( LogString& toAppendTo, log4cxx_time_t tm ) const { int64_t interval = (tm - startTime) / int64_t(1000); StringHelper::toString(interval, toAppendTo); diff --git a/src/main/cpp/relativetimepatternconverter.cpp b/src/main/cpp/relativetimepatternconverter.cpp index e99f5c8f7..cd581c217 100644 --- a/src/main/cpp/relativetimepatternconverter.cpp +++ b/src/main/cpp/relativetimepatternconverter.cpp @@ -41,7 +41,7 @@ PatternConverterPtr RelativeTimePatternConverter::newInstance( return def; } -void RelativeTimePatternConverter::format( LOG4CXX_FORMAT_EVENT_FORMAL_PARAMETERS ) const +void RelativeTimePatternConverter::format( const spi::LoggingEventPtr& event, LogString& toAppendTo ) const { log4cxx_time_t delta = (event->getTimeStamp() - LoggingEvent::getStartTime()) / 1000; StringHelper::toString(delta, toAppendTo); diff --git a/src/main/cpp/rollingfileappender.cpp b/src/main/cpp/rollingfileappender.cpp index 5926d6867..db30928ea 100644 --- a/src/main/cpp/rollingfileappender.cpp +++ b/src/main/cpp/rollingfileappender.cpp @@ -180,7 +180,7 @@ void RollingFileAppender::setDatePattern(const LogString& newPattern) /** * Prepare instance of use. */ -void RollingFileAppender::activateOptions( LOG4CXX_ACTIVATE_OPTIONS_FORMAL_PARAMETERS ) +void RollingFileAppender::activateOptions( ) { if (_priv->activateOptions()) { @@ -442,7 +442,7 @@ bool RollingFileAppender::rolloverInternal() /** * {@inheritDoc} */ -void RollingFileAppender::subAppend( LOG4CXX_APPEND_FORMAL_PARAMETERS ) +void RollingFileAppender::subAppend( const spi::LoggingEventPtr& event ) { // The rollover check must precede actual writing. This is the // only correct behavior for time driven triggers. @@ -469,7 +469,7 @@ void RollingFileAppender::subAppend( LOG4CXX_APPEND_FORMAL_PARAMETERS ) } } - FileAppender::subAppend( LOG4CXX_APPEND_PARAMETERS ); + FileAppender::subAppend( event ); } /** @@ -555,7 +555,7 @@ class CountingOutputStream : public OutputStream /** * {@inheritDoc} */ - void close( LOG4CXX_CLOSE_OUTPUT_STREAM_FORMAL_PARAMETERS ) override + void close( ) override { os->close(); rfa = 0; @@ -564,7 +564,7 @@ class CountingOutputStream : public OutputStream /** * {@inheritDoc} */ - void flush( LOG4CXX_FLUSH_OUTPUT_STREAM_FORMAL_PARAMETERS ) override + void flush( ) override { os->flush(); } @@ -572,7 +572,7 @@ class CountingOutputStream : public OutputStream /** * {@inheritDoc} */ - void write( LOG4CXX_WRITE_OUTPUT_STREAM_FORMAL_PARAMETERS ) override + void write( ByteBuffer& buf ) override { os->write(buf); diff --git a/src/main/cpp/rollingpolicybase.cpp b/src/main/cpp/rollingpolicybase.cpp index 5202757c4..a66c93cb6 100644 --- a/src/main/cpp/rollingpolicybase.cpp +++ b/src/main/cpp/rollingpolicybase.cpp @@ -47,7 +47,7 @@ RollingPolicyBase::~RollingPolicyBase() { } -void RollingPolicyBase::activateOptions( LOG4CXX_ACTIVATE_OPTIONS_FORMAL_PARAMETERS ) +void RollingPolicyBase::activateOptions( ) { m_priv->activateOptions(getFormatSpecifiers()); } diff --git a/src/main/cpp/shortfilelocationpatternconverter.cpp b/src/main/cpp/shortfilelocationpatternconverter.cpp index f568beccc..d2b0a3820 100644 --- a/src/main/cpp/shortfilelocationpatternconverter.cpp +++ b/src/main/cpp/shortfilelocationpatternconverter.cpp @@ -37,6 +37,6 @@ PatternConverterPtr ShortFileLocationPatternConverter::newInstance( return PatternConverterPtr(new ShortFileLocationPatternConverter()); } -void ShortFileLocationPatternConverter::format( LOG4CXX_FORMAT_EVENT_FORMAL_PARAMETERS ) const { +void ShortFileLocationPatternConverter::format( const spi::LoggingEventPtr& event, LogString& toAppendTo ) const { append(toAppendTo, event->getLocationInformation().getShortFileName()); } diff --git a/src/main/cpp/simpledateformat.cpp b/src/main/cpp/simpledateformat.cpp index cc1e898d9..10e4f535a 100644 --- a/src/main/cpp/simpledateformat.cpp +++ b/src/main/cpp/simpledateformat.cpp @@ -856,7 +856,7 @@ SimpleDateFormat::~SimpleDateFormat() } -void SimpleDateFormat::format( LOG4CXX_FORMAT_TIME_FORMAL_PARAMETERS ) const +void SimpleDateFormat::format( LogString& toAppendTo, log4cxx_time_t tm ) const { helpers::Pool tempPool; apr_time_exp_t exploded; diff --git a/src/main/cpp/simplelayout.cpp b/src/main/cpp/simplelayout.cpp index a9e2a72a3..2dc343188 100644 --- a/src/main/cpp/simplelayout.cpp +++ b/src/main/cpp/simplelayout.cpp @@ -26,7 +26,7 @@ IMPLEMENT_LOG4CXX_OBJECT(SimpleLayout) -void SimpleLayout::format( LOG4CXX_FORMAT_LAYOUT_FORMAL_PARAMETERS ) const +void SimpleLayout::format( LogString& output, const spi::LoggingEventPtr& event ) const { output.append(event->getLevel()->toString()); output.append(LOG4CXX_STR(" - ")); diff --git a/src/main/cpp/sizebasedtriggeringpolicy.cpp b/src/main/cpp/sizebasedtriggeringpolicy.cpp index 34938604f..aafb0409b 100644 --- a/src/main/cpp/sizebasedtriggeringpolicy.cpp +++ b/src/main/cpp/sizebasedtriggeringpolicy.cpp @@ -48,7 +48,7 @@ void SizeBasedTriggeringPolicy::setMaxFileSize(size_t l) maxFileSize = l; } -void SizeBasedTriggeringPolicy::activateOptions( LOG4CXX_ACTIVATE_OPTIONS_FORMAL_PARAMETERS ) +void SizeBasedTriggeringPolicy::activateOptions( ) { } diff --git a/src/main/cpp/smtpappender.cpp b/src/main/cpp/smtpappender.cpp index 6eb449074..bc6350e89 100644 --- a/src/main/cpp/smtpappender.cpp +++ b/src/main/cpp/smtpappender.cpp @@ -798,7 +798,7 @@ bool SMTPAppender::asciiCheck(const LogString& value, const LogString& field) /** Activate the specified options, such as the smtp host, the recipient, from, etc. */ -void SMTPAppender::activateOptions( LOG4CXX_ACTIVATE_OPTIONS_FORMAL_PARAMETERS ) +void SMTPAppender::activateOptions( ) { if (_priv->layout == 0) { @@ -837,7 +837,7 @@ void SMTPAppender::activateOptions( LOG4CXX_ACTIVATE_OPTIONS_FORMAL_PARAMETERS ) Perform SMTPAppender specific appending actions, mainly adding the event to a cyclic buffer and checking if the event triggers an e-mail to be sent. */ -void SMTPAppender::append( LOG4CXX_APPEND_FORMAL_PARAMETERS ) +void SMTPAppender::append( const spi::LoggingEventPtr& event ) { if (!checkEntryConditions()) { diff --git a/src/main/cpp/socketappenderskeleton.cpp b/src/main/cpp/socketappenderskeleton.cpp index a16163988..9b13e0617 100644 --- a/src/main/cpp/socketappenderskeleton.cpp +++ b/src/main/cpp/socketappenderskeleton.cpp @@ -62,7 +62,7 @@ SocketAppenderSkeleton::~SocketAppenderSkeleton() { } -void SocketAppenderSkeleton::activateOptions( LOG4CXX_ACTIVATE_OPTIONS_FORMAL_PARAMETERS ) +void SocketAppenderSkeleton::activateOptions( ) { _priv->connect(); } diff --git a/src/main/cpp/socketoutputstream.cpp b/src/main/cpp/socketoutputstream.cpp index bf4db8f63..707f76a41 100644 --- a/src/main/cpp/socketoutputstream.cpp +++ b/src/main/cpp/socketoutputstream.cpp @@ -45,13 +45,13 @@ SocketOutputStream::~SocketOutputStream() { } -void SocketOutputStream::close( LOG4CXX_CLOSE_OUTPUT_STREAM_FORMAL_PARAMETERS ) +void SocketOutputStream::close( ) { flush(); m_priv->socket->close(); } -void SocketOutputStream::flush( LOG4CXX_FLUSH_OUTPUT_STREAM_FORMAL_PARAMETERS ) +void SocketOutputStream::flush( ) { if (m_priv->array.size() > 0) { @@ -61,7 +61,7 @@ void SocketOutputStream::flush( LOG4CXX_FLUSH_OUTPUT_STREAM_FORMAL_PARAMETERS ) } } -void SocketOutputStream::write( LOG4CXX_WRITE_OUTPUT_STREAM_FORMAL_PARAMETERS ) +void SocketOutputStream::write( ByteBuffer& buf ) { if (buf.remaining() > 0) { diff --git a/src/main/cpp/strftimedateformat.cpp b/src/main/cpp/strftimedateformat.cpp index 2de79befb..9700ddc1b 100644 --- a/src/main/cpp/strftimedateformat.cpp +++ b/src/main/cpp/strftimedateformat.cpp @@ -48,7 +48,7 @@ StrftimeDateFormat::~StrftimeDateFormat() } -void StrftimeDateFormat::format( LOG4CXX_FORMAT_TIME_FORMAL_PARAMETERS ) const +void StrftimeDateFormat::format( LogString& toAppendTo, log4cxx_time_t tm ) const { apr_time_exp_t exploded; apr_status_t stat = m_priv->timeZone->explode(&exploded, tm); diff --git a/src/main/cpp/syslogappender.cpp b/src/main/cpp/syslogappender.cpp index e465db95f..d8b9a1e60 100644 --- a/src/main/cpp/syslogappender.cpp +++ b/src/main/cpp/syslogappender.cpp @@ -406,7 +406,7 @@ int SyslogAppender::getFacility( } } -void SyslogAppender::append( LOG4CXX_APPEND_FORMAL_PARAMETERS ) +void SyslogAppender::append( const spi::LoggingEventPtr& event ) { LogString msg; _priv->layout->format(msg, event); diff --git a/src/main/cpp/systemerrwriter.cpp b/src/main/cpp/systemerrwriter.cpp index 8d7e8d683..4cd8b6b2b 100644 --- a/src/main/cpp/systemerrwriter.cpp +++ b/src/main/cpp/systemerrwriter.cpp @@ -32,16 +32,16 @@ SystemErrWriter::~SystemErrWriter() { } -void SystemErrWriter::close( LOG4CXX_CLOSE_WRITER_FORMAL_PARAMETERS ) +void SystemErrWriter::close( ) { } -void SystemErrWriter::flush( LOG4CXX_FLUSH_WRITER_FORMAL_PARAMETERS ) +void SystemErrWriter::flush( ) { fflush(stderr); } -void SystemErrWriter::write( LOG4CXX_WRITE_WRITER_FORMAL_PARAMETERS ) +void SystemErrWriter::write( const LogString& str ) { helpers::writeToConsole(str, stderr); } diff --git a/src/main/cpp/systemoutwriter.cpp b/src/main/cpp/systemoutwriter.cpp index d9cd6ba83..b4b798b71 100644 --- a/src/main/cpp/systemoutwriter.cpp +++ b/src/main/cpp/systemoutwriter.cpp @@ -31,16 +31,16 @@ SystemOutWriter::~SystemOutWriter() { } -void SystemOutWriter::close( LOG4CXX_CLOSE_WRITER_FORMAL_PARAMETERS ) +void SystemOutWriter::close( ) { } -void SystemOutWriter::flush( LOG4CXX_FLUSH_WRITER_FORMAL_PARAMETERS ) +void SystemOutWriter::flush( ) { fflush(stdout); } -void SystemOutWriter::write( LOG4CXX_WRITE_WRITER_FORMAL_PARAMETERS ) +void SystemOutWriter::write( const LogString& str ) { helpers::writeToConsole(str, stdout); } diff --git a/src/main/cpp/telnetappender.cpp b/src/main/cpp/telnetappender.cpp index 335b98a0d..0391c5f8a 100644 --- a/src/main/cpp/telnetappender.cpp +++ b/src/main/cpp/telnetappender.cpp @@ -121,7 +121,7 @@ TelnetAppender::~TelnetAppender() _priv->close(); } -void TelnetAppender::activateOptions( LOG4CXX_ACTIVATE_OPTIONS_FORMAL_PARAMETERS ) +void TelnetAppender::activateOptions( ) { if (_priv->serverSocket == NULL) { @@ -269,7 +269,7 @@ void TelnetAppender::writeStatus(const SocketPtr& socket, const LogString& msg, } } -void TelnetAppender::append( LOG4CXX_APPEND_FORMAL_PARAMETERS ) +void TelnetAppender::append( const spi::LoggingEventPtr& event ) { ++_priv->eventCount; if (0 < _priv->activeConnections) diff --git a/src/main/cpp/threadpatternconverter.cpp b/src/main/cpp/threadpatternconverter.cpp index ec799c3ec..725b027cb 100644 --- a/src/main/cpp/threadpatternconverter.cpp +++ b/src/main/cpp/threadpatternconverter.cpp @@ -39,7 +39,7 @@ PatternConverterPtr ThreadPatternConverter::newInstance( return std::make_shared(); } -void ThreadPatternConverter::format( LOG4CXX_FORMAT_EVENT_FORMAL_PARAMETERS ) const +void ThreadPatternConverter::format( const spi::LoggingEventPtr& event, LogString& toAppendTo ) const { toAppendTo.append(event->getThreadName()); } diff --git a/src/main/cpp/threadusernamepatternconverter.cpp b/src/main/cpp/threadusernamepatternconverter.cpp index 3f49daba6..b0f57331a 100644 --- a/src/main/cpp/threadusernamepatternconverter.cpp +++ b/src/main/cpp/threadusernamepatternconverter.cpp @@ -39,7 +39,7 @@ PatternConverterPtr ThreadUsernamePatternConverter::newInstance( return std::make_shared(); } -void ThreadUsernamePatternConverter::format( LOG4CXX_FORMAT_EVENT_FORMAL_PARAMETERS ) const +void ThreadUsernamePatternConverter::format( const spi::LoggingEventPtr& event, LogString& toAppendTo ) const { toAppendTo.append(event->getThreadUserName()); } diff --git a/src/main/cpp/throwableinformationpatternconverter.cpp b/src/main/cpp/throwableinformationpatternconverter.cpp index 38a55fd9b..1739d61a0 100644 --- a/src/main/cpp/throwableinformationpatternconverter.cpp +++ b/src/main/cpp/throwableinformationpatternconverter.cpp @@ -62,7 +62,7 @@ PatternConverterPtr ThrowableInformationPatternConverter::newInstance( return std::make_shared(false); } -void ThrowableInformationPatternConverter::format( LOG4CXX_FORMAT_EVENT_FORMAL_PARAMETERS ) const +void ThrowableInformationPatternConverter::format( const spi::LoggingEventPtr& event, LogString& toAppendTo ) const { } diff --git a/src/main/cpp/timebasedrollingpolicy.cpp b/src/main/cpp/timebasedrollingpolicy.cpp index 0592df660..9ec24e614 100644 --- a/src/main/cpp/timebasedrollingpolicy.cpp +++ b/src/main/cpp/timebasedrollingpolicy.cpp @@ -296,7 +296,7 @@ TimeBasedRollingPolicy::TimeBasedRollingPolicy() : TimeBasedRollingPolicy::~TimeBasedRollingPolicy(){} -void TimeBasedRollingPolicy::activateOptions( LOG4CXX_ACTIVATE_OPTIONS_FORMAL_PARAMETERS ) +void TimeBasedRollingPolicy::activateOptions( ) { // find out period from the filename pattern if (getFileNamePattern().length() > 0) @@ -353,7 +353,7 @@ LOG4CXX_NS::pattern::PatternMap TimeBasedRollingPolicy::getFormatSpecifiers() co /** * {@inheritDoc} */ -RolloverDescriptionPtr TimeBasedRollingPolicy::initialize( LOG4CXX_ROLLING_POLICY_INITIALIZE_FORMAL_PARAMETERS ) +RolloverDescriptionPtr TimeBasedRollingPolicy::initialize( const LogString& currentActiveFile, bool append ) { Date now; log4cxx_time_t n = now.getTime(); @@ -382,7 +382,7 @@ RolloverDescriptionPtr TimeBasedRollingPolicy::initialize( LOG4CXX_ROLLING_POLIC } } -RolloverDescriptionPtr TimeBasedRollingPolicy::rollover( LOG4CXX_ROLLING_POLICY_ROLLOVER_FORMAL_PARAMETERS ) +RolloverDescriptionPtr TimeBasedRollingPolicy::rollover( const LogString& currentActiveFile, bool append ) { Date now; log4cxx_time_t n = now.getTime(); diff --git a/src/main/cpp/writerappender.cpp b/src/main/cpp/writerappender.cpp index 92a80bd21..13fb55407 100644 --- a/src/main/cpp/writerappender.cpp +++ b/src/main/cpp/writerappender.cpp @@ -54,7 +54,7 @@ WriterAppender::~WriterAppender() _priv->close(); } -void WriterAppender::activateOptions( LOG4CXX_ACTIVATE_OPTIONS_FORMAL_PARAMETERS ) +void WriterAppender::activateOptions( ) { _priv->activateOptions(); } @@ -74,7 +74,7 @@ void WriterAppender::WriterAppenderPriv::activateOptions() } } -void WriterAppender::append( LOG4CXX_APPEND_FORMAL_PARAMETERS ) +void WriterAppender::append( const spi::LoggingEventPtr& event ) { if (!checkEntryConditions()) @@ -82,7 +82,7 @@ void WriterAppender::append( LOG4CXX_APPEND_FORMAL_PARAMETERS ) return; } - subAppend( LOG4CXX_APPEND_PARAMETERS ); + subAppend( event ); } /** @@ -192,7 +192,7 @@ void WriterAppender::setEncoding(const LogString& enc) _priv->encoding = enc; } -void WriterAppender::subAppend( LOG4CXX_APPEND_FORMAL_PARAMETERS ) +void WriterAppender::subAppend( const spi::LoggingEventPtr& event ) { #if ENABLE_FAILING_APPENDER_SIMULATION_TESTING if (event->getRenderedMessage() == _priv->exceptionTriggeringMessage) diff --git a/src/main/cpp/xmllayout.cpp b/src/main/cpp/xmllayout.cpp index c50ed7ffe..420bbb0f6 100644 --- a/src/main/cpp/xmllayout.cpp +++ b/src/main/cpp/xmllayout.cpp @@ -77,7 +77,7 @@ void XMLLayout::setOption(const LogString& option, Layout::setOption(option, value); } -void XMLLayout::format( LOG4CXX_FORMAT_LAYOUT_FORMAL_PARAMETERS ) const +void XMLLayout::format( LogString& output, const spi::LoggingEventPtr& event ) const { auto& lsMsg = event->getRenderedMessage(); priv::reserveFormattedEvent(output, m_priv->expectedPatternLength, lsMsg.size()); diff --git a/src/main/cpp/xmlsocketappender.cpp b/src/main/cpp/xmlsocketappender.cpp index 7367c89cf..c5b9dc9dd 100644 --- a/src/main/cpp/xmlsocketappender.cpp +++ b/src/main/cpp/xmlsocketappender.cpp @@ -71,7 +71,7 @@ int XMLSocketAppender::getDefaultPort() const } -void XMLSocketAppender::append( LOG4CXX_APPEND_FORMAL_PARAMETERS ) +void XMLSocketAppender::append( const spi::LoggingEventPtr& event ) { if (_priv->outputSink) { diff --git a/src/main/cpp/zipcompressaction.cpp b/src/main/cpp/zipcompressaction.cpp index 02b33b623..5b1fff014 100644 --- a/src/main/cpp/zipcompressaction.cpp +++ b/src/main/cpp/zipcompressaction.cpp @@ -58,7 +58,7 @@ ZipCompressAction::ZipCompressAction(const File& src, { } -bool ZipCompressAction::execute( LOG4CXX_EXECUTE_ACTION_FORMAL_PARAMETERS ) const +bool ZipCompressAction::execute( ) const { if (!priv->source.exists()) { diff --git a/src/main/include/log4cxx/appender.h b/src/main/include/log4cxx/appender.h index fd1d2b2da..cb72a27c1 100644 --- a/src/main/include/log4cxx/appender.h +++ b/src/main/include/log4cxx/appender.h @@ -84,8 +84,6 @@ class LOG4CXX_EXPORT Appender Loggers will call the doAppend method of appender implementations in order to log. */ -#define LOG4CXX_APPEND_FORMAL_PARAMETERS const spi::LoggingEventPtr& event -#define LOG4CXX_APPEND_PARAMETERS event virtual void doAppend(const spi::LoggingEventPtr& event) = 0; /** @deprecated The \c pool parameter is not used and will be removed in a future version. diff --git a/src/main/include/log4cxx/appenderskeleton.h b/src/main/include/log4cxx/appenderskeleton.h index cee98c6d9..f5f8f076b 100644 --- a/src/main/include/log4cxx/appenderskeleton.h +++ b/src/main/include/log4cxx/appenderskeleton.h @@ -47,14 +47,14 @@ class LOG4CXX_EXPORT AppenderSkeleton method to perform actual logging. See also AppenderSkeleton::doAppend method. */ - virtual void append( LOG4CXX_APPEND_FORMAL_PARAMETERS ) = 0; + virtual void append( const spi::LoggingEventPtr& event ) = 0; /** * Compare \c event level against the appender threshold and check that \c event is accepted. * If \c event is accepted, delegate log output to the subclass implementation of * the AppenderSkeleton#append method. * */ - void doAppendImpl( LOG4CXX_APPEND_FORMAL_PARAMETERS ); + void doAppendImpl( const spi::LoggingEventPtr& event ); /** * Does no attached filter deny \c event or does an attached filter accept \c event? */ @@ -81,7 +81,7 @@ class LOG4CXX_EXPORT AppenderSkeleton @deprecated The \c pool parameter is not required and will be removed in a future version. */ - void activateOptions( LOG4CXX_ACTIVATE_OPTIONS_FORMAL_PARAMETERS ) override; + void activateOptions( ) override; /** \copybrief spi::OptionHandler::setOption() @@ -153,7 +153,7 @@ class LOG4CXX_EXPORT AppenderSkeleton * * Reimplement this method in your appender if you use a different concurrency control technique. * */ - void doAppend( LOG4CXX_APPEND_FORMAL_PARAMETERS ) override; + void doAppend( const spi::LoggingEventPtr& event ) override; /** Set the {@link spi::ErrorHandler ErrorHandler} for this Appender. diff --git a/src/main/include/log4cxx/asyncappender.h b/src/main/include/log4cxx/asyncappender.h index 2f9ad42b6..eb2ec0609 100644 --- a/src/main/include/log4cxx/asyncappender.h +++ b/src/main/include/log4cxx/asyncappender.h @@ -123,14 +123,14 @@ class LOG4CXX_EXPORT AsyncAppender : /** * Call AppenderSkeleton#doAppendImpl without acquiring a lock. */ - void doAppend( LOG4CXX_APPEND_FORMAL_PARAMETERS ) override; + void doAppend( const spi::LoggingEventPtr& event ) override; /** * Add \c event to a ring buffer. * The behaviour when the ring buffer is full * is controlled by the [Blocking property](@ref BlockingProperty) value. */ - void append( LOG4CXX_APPEND_FORMAL_PARAMETERS ) override; + void append( const spi::LoggingEventPtr& event ) override; /** Close this AsyncAppender by interrupting the diff --git a/src/main/include/log4cxx/consoleappender.h b/src/main/include/log4cxx/consoleappender.h index c1a98610c..7c2e98ce2 100644 --- a/src/main/include/log4cxx/consoleappender.h +++ b/src/main/include/log4cxx/consoleappender.h @@ -88,7 +88,7 @@ class LOG4CXX_EXPORT ConsoleAppender : public WriterAppender No action is performed in this implementation. */ - void activateOptions( LOG4CXX_ACTIVATE_OPTIONS_FORMAL_PARAMETERS ) override; + void activateOptions( ) override; /** \copybrief WriterAppender::setOption() diff --git a/src/main/include/log4cxx/db/dbappender.h b/src/main/include/log4cxx/db/dbappender.h index a56d32b89..62e8ae540 100644 --- a/src/main/include/log4cxx/db/dbappender.h +++ b/src/main/include/log4cxx/db/dbappender.h @@ -141,12 +141,12 @@ class LOG4CXX_EXPORT DBAppender : public AppenderSkeleton /** Activate the specified options. */ - void activateOptions( LOG4CXX_ACTIVATE_OPTIONS_FORMAL_PARAMETERS ) override; + void activateOptions( ) override; /** * Adds the event to the buffer. When full the buffer is flushed. */ - void append( LOG4CXX_APPEND_FORMAL_PARAMETERS ) override; + void append( const spi::LoggingEventPtr& event ) override; void close() override; diff --git a/src/main/include/log4cxx/db/odbcappender.h b/src/main/include/log4cxx/db/odbcappender.h index 7eb1923c1..fcbd09eb4 100644 --- a/src/main/include/log4cxx/db/odbcappender.h +++ b/src/main/include/log4cxx/db/odbcappender.h @@ -179,12 +179,12 @@ class LOG4CXX_EXPORT ODBCAppender : public AppenderSkeleton /** Activate the specified options. */ - void activateOptions( LOG4CXX_ACTIVATE_OPTIONS_FORMAL_PARAMETERS ) override; + void activateOptions( ) override; /** * Adds the event to the buffer. When full the buffer is flushed. */ - void append( LOG4CXX_APPEND_FORMAL_PARAMETERS ) override; + void append( const spi::LoggingEventPtr& event ) override; protected: /** diff --git a/src/main/include/log4cxx/fileappender.h b/src/main/include/log4cxx/fileappender.h index 45c86b912..186230a0d 100644 --- a/src/main/include/log4cxx/fileappender.h +++ b/src/main/include/log4cxx/fileappender.h @@ -124,7 +124,7 @@ class LOG4CXX_EXPORT FileAppender : public WriterAppender If there was already an opened file, then the previous file is closed first. */ - void activateOptions( LOG4CXX_ACTIVATE_OPTIONS_FORMAL_PARAMETERS ) override; + void activateOptions( ) override; /** \copybrief AppenderSkeleton::setOption() diff --git a/src/main/include/log4cxx/filter/expressionfilter.h b/src/main/include/log4cxx/filter/expressionfilter.h index 591c09db2..6700ae968 100644 --- a/src/main/include/log4cxx/filter/expressionfilter.h +++ b/src/main/include/log4cxx/filter/expressionfilter.h @@ -94,7 +94,7 @@ class LOG4CXX_EXPORT ExpressionFilter: public LOG4CXX_NS::spi::Filter ExpressionFilter(); - void activateOptions( LOG4CXX_ACTIVATE_OPTIONS_FORMAL_PARAMETERS ) override; + void activateOptions( ) override; void setExpression(const LogString& expression); diff --git a/src/main/include/log4cxx/fmtlayout.h b/src/main/include/log4cxx/fmtlayout.h index 454f43de1..fb7b94c21 100644 --- a/src/main/include/log4cxx/fmtlayout.h +++ b/src/main/include/log4cxx/fmtlayout.h @@ -252,7 +252,7 @@ class LOG4CXX_EXPORT FMTLayout : public Layout /** * Append the attributes of \c event onto \c output as specified by the conversion pattern. */ - void format( LOG4CXX_FORMAT_LAYOUT_FORMAL_PARAMETERS ) const override; + void format( LogString& output, const spi::LoggingEventPtr& event ) const override; bool ignoresThrowable() const override { @@ -265,7 +265,7 @@ class LOG4CXX_EXPORT FMTLayout : public Layout Calculates the length of the formtted output. */ - void activateOptions( LOG4CXX_ACTIVATE_OPTIONS_FORMAL_PARAMETERS ) override; + void activateOptions( ) override; /** \copybrief spi::OptionHandler::setOption() diff --git a/src/main/include/log4cxx/helpers/bufferedwriter.h b/src/main/include/log4cxx/helpers/bufferedwriter.h index fa3be51ec..5e787515a 100644 --- a/src/main/include/log4cxx/helpers/bufferedwriter.h +++ b/src/main/include/log4cxx/helpers/bufferedwriter.h @@ -47,11 +47,11 @@ class LOG4CXX_EXPORT BufferedWriter : public Writer virtual ~BufferedWriter(); using Writer::close; - void close( LOG4CXX_CLOSE_WRITER_FORMAL_PARAMETERS ) override; + void close( ) override; using Writer::flush; - void flush( LOG4CXX_FLUSH_WRITER_FORMAL_PARAMETERS ) override; + void flush( ) override; using Writer::write; - void write( LOG4CXX_WRITE_WRITER_FORMAL_PARAMETERS ) override; + void write( const LogString& str ) override; WriterPtr getWriter() const; private: diff --git a/src/main/include/log4cxx/helpers/bytearrayoutputstream.h b/src/main/include/log4cxx/helpers/bytearrayoutputstream.h index 6f81b172d..528ffdfc6 100644 --- a/src/main/include/log4cxx/helpers/bytearrayoutputstream.h +++ b/src/main/include/log4cxx/helpers/bytearrayoutputstream.h @@ -49,11 +49,11 @@ class LOG4CXX_EXPORT ByteArrayOutputStream : public OutputStream virtual ~ByteArrayOutputStream(); using OutputStream::close; - void close( LOG4CXX_CLOSE_OUTPUT_STREAM_FORMAL_PARAMETERS ) override; + void close( ) override; using OutputStream::flush; - void flush( LOG4CXX_FLUSH_OUTPUT_STREAM_FORMAL_PARAMETERS ) override; + void flush( ) override; using OutputStream::write; - void write( LOG4CXX_WRITE_OUTPUT_STREAM_FORMAL_PARAMETERS ) override; + void write( ByteBuffer& buf ) override; ByteList toByteArray() const; private: diff --git a/src/main/include/log4cxx/helpers/cacheddateformat.h b/src/main/include/log4cxx/helpers/cacheddateformat.h index 54996dbba..528cd0388 100644 --- a/src/main/include/log4cxx/helpers/cacheddateformat.h +++ b/src/main/include/log4cxx/helpers/cacheddateformat.h @@ -115,7 +115,7 @@ class LOG4CXX_EXPORT CachedDateFormat : public helpers::DateFormat * @param tm the date/time to format. * @param toAppendTo the string buffer to write to. */ - void format( LOG4CXX_FORMAT_TIME_FORMAL_PARAMETERS ) const override; + void format( LogString& toAppendTo, log4cxx_time_t tm ) const override; private: /** @@ -145,7 +145,7 @@ class LOG4CXX_EXPORT CachedDateFormat : public helpers::DateFormat * @param toAppendTo string to which the numeric string is appended. * @param n integer value. */ - void numberFormat( LOG4CXX_FORMAT_NUMBER_FORMAL_PARAMETERS ) const override; + void numberFormat( LogString& toAppendTo, int n ) const override; /** * Gets maximum cache validity for the specified SimpleDateTime diff --git a/src/main/include/log4cxx/helpers/dateformat.h b/src/main/include/log4cxx/helpers/dateformat.h index f8680622d..919eba172 100644 --- a/src/main/include/log4cxx/helpers/dateformat.h +++ b/src/main/include/log4cxx/helpers/dateformat.h @@ -48,7 +48,6 @@ class LOG4CXX_EXPORT DateFormat : public Object * @param toAppendTo string to which the date/time string is appended. * @param tm date to be formatted. */ -#define LOG4CXX_FORMAT_TIME_FORMAL_PARAMETERS LogString& toAppendTo, log4cxx_time_t tm virtual void format(LogString& toAppendTo, log4cxx_time_t tm) const = 0; /** @deprecated The \c pool parameter is not used and will be removed in a future version. @@ -71,7 +70,6 @@ class LOG4CXX_EXPORT DateFormat : public Object * format the milliseconds. */ virtual void numberFormat(LogString& toAppendTo, int n) const; -#define LOG4CXX_FORMAT_NUMBER_FORMAL_PARAMETERS LogString& toAppendTo, int n /** @deprecated The \c pool parameter is not used and will be removed in a future version. */ diff --git a/src/main/include/log4cxx/helpers/fileoutputstream.h b/src/main/include/log4cxx/helpers/fileoutputstream.h index d37265c74..67308cef8 100644 --- a/src/main/include/log4cxx/helpers/fileoutputstream.h +++ b/src/main/include/log4cxx/helpers/fileoutputstream.h @@ -48,11 +48,11 @@ class LOG4CXX_EXPORT FileOutputStream : public OutputStream virtual ~FileOutputStream(); using OutputStream::close; - void close( LOG4CXX_CLOSE_OUTPUT_STREAM_FORMAL_PARAMETERS ) override; + void close( ) override; using OutputStream::flush; - void flush( LOG4CXX_FLUSH_OUTPUT_STREAM_FORMAL_PARAMETERS ) override; + void flush( ) override; using OutputStream::write; - void write( LOG4CXX_WRITE_OUTPUT_STREAM_FORMAL_PARAMETERS ) override; + void write( ByteBuffer& buf ) override; apr_file_t* getFilePtr() const; diff --git a/src/main/include/log4cxx/helpers/inputstreamreader.h b/src/main/include/log4cxx/helpers/inputstreamreader.h index 28549a012..e911e4d34 100644 --- a/src/main/include/log4cxx/helpers/inputstreamreader.h +++ b/src/main/include/log4cxx/helpers/inputstreamreader.h @@ -70,13 +70,13 @@ class LOG4CXX_EXPORT InputStreamReader : public Reader /** * Close the stream. */ - void close( LOG4CXX_CLOSE_READER_FORMAL_PARAMETERS ) override; + void close( ) override; using Reader::read; /** * @return The complete stream contents as a LogString. */ - LogString read( LOG4CXX_READ_READER_FORMAL_PARAMETERS ) override; + LogString read( ) override; /** * @return The name of the character encoding being used by this stream. diff --git a/src/main/include/log4cxx/helpers/outputstream.h b/src/main/include/log4cxx/helpers/outputstream.h index d3a96ba7a..4b661d481 100644 --- a/src/main/include/log4cxx/helpers/outputstream.h +++ b/src/main/include/log4cxx/helpers/outputstream.h @@ -44,11 +44,8 @@ class LOG4CXX_EXPORT OutputStream : public Object public: virtual void close() = 0; -#define LOG4CXX_CLOSE_OUTPUT_STREAM_FORMAL_PARAMETERS virtual void flush() = 0; -#define LOG4CXX_FLUSH_OUTPUT_STREAM_FORMAL_PARAMETERS virtual void write(ByteBuffer& buf) = 0; -#define LOG4CXX_WRITE_OUTPUT_STREAM_FORMAL_PARAMETERS ByteBuffer& buf /** @deprecated The \c pool parameter is not used and will be removed in a future version. */ diff --git a/src/main/include/log4cxx/helpers/outputstreamwriter.h b/src/main/include/log4cxx/helpers/outputstreamwriter.h index 554084ae9..3b4930753 100644 --- a/src/main/include/log4cxx/helpers/outputstreamwriter.h +++ b/src/main/include/log4cxx/helpers/outputstreamwriter.h @@ -50,11 +50,11 @@ class LOG4CXX_EXPORT OutputStreamWriter : public Writer ~OutputStreamWriter(); using Writer::close; - void close( LOG4CXX_CLOSE_WRITER_FORMAL_PARAMETERS ) override; + void close( ) override; using Writer::flush; - void flush( LOG4CXX_FLUSH_WRITER_FORMAL_PARAMETERS ) override; + void flush( ) override; using Writer::write; - void write( LOG4CXX_WRITE_WRITER_FORMAL_PARAMETERS ) override; + void write( const LogString& str ) override; LogString getEncoding() const; OutputStreamPtr getOutputStreamPtr() const; diff --git a/src/main/include/log4cxx/helpers/reader.h b/src/main/include/log4cxx/helpers/reader.h index 0e7ca923c..733f50cfb 100644 --- a/src/main/include/log4cxx/helpers/reader.h +++ b/src/main/include/log4cxx/helpers/reader.h @@ -51,13 +51,11 @@ class LOG4CXX_EXPORT Reader : public Object * Closes the stream. */ virtual void close() = 0; -#define LOG4CXX_CLOSE_READER_FORMAL_PARAMETERS /** * @return The complete stream contents as a LogString. */ virtual LogString read() = 0; -#define LOG4CXX_READ_READER_FORMAL_PARAMETERS /** @deprecated The \c pool parameter is not used and will be removed in a future version. */ diff --git a/src/main/include/log4cxx/helpers/relativetimedateformat.h b/src/main/include/log4cxx/helpers/relativetimedateformat.h index 86fc15788..3fdc7eed9 100644 --- a/src/main/include/log4cxx/helpers/relativetimedateformat.h +++ b/src/main/include/log4cxx/helpers/relativetimedateformat.h @@ -35,7 +35,7 @@ class LOG4CXX_EXPORT RelativeTimeDateFormat : public DateFormat RelativeTimeDateFormat(); using DateFormat::format; - void format( LOG4CXX_FORMAT_TIME_FORMAL_PARAMETERS ) const override; + void format( LogString& toAppendTo, log4cxx_time_t tm ) const override; private: log4cxx_time_t startTime; diff --git a/src/main/include/log4cxx/helpers/simpledateformat.h b/src/main/include/log4cxx/helpers/simpledateformat.h index 054287dfc..aadb4e026 100644 --- a/src/main/include/log4cxx/helpers/simpledateformat.h +++ b/src/main/include/log4cxx/helpers/simpledateformat.h @@ -85,7 +85,7 @@ class LOG4CXX_EXPORT SimpleDateFormat : public DateFormat ~SimpleDateFormat(); using DateFormat::format; - void format( LOG4CXX_FORMAT_TIME_FORMAL_PARAMETERS ) const override; + void format( LogString& toAppendTo, log4cxx_time_t tm ) const override; /** * Set time zone. diff --git a/src/main/include/log4cxx/helpers/socketoutputstream.h b/src/main/include/log4cxx/helpers/socketoutputstream.h index 1dbc3452e..240e53486 100644 --- a/src/main/include/log4cxx/helpers/socketoutputstream.h +++ b/src/main/include/log4cxx/helpers/socketoutputstream.h @@ -41,11 +41,11 @@ class LOG4CXX_EXPORT SocketOutputStream : public OutputStream ~SocketOutputStream(); using OutputStream::close; - void close( LOG4CXX_CLOSE_OUTPUT_STREAM_FORMAL_PARAMETERS ) override; + void close( ) override; using OutputStream::flush; - void flush( LOG4CXX_FLUSH_OUTPUT_STREAM_FORMAL_PARAMETERS ) override; + void flush( ) override; using OutputStream::write; - void write( LOG4CXX_WRITE_OUTPUT_STREAM_FORMAL_PARAMETERS ) override; + void write( ByteBuffer& buf ) override; private: LOG4CXX_DECLARE_PRIVATE_MEMBER_PTR(SocketOutputStreamPrivate, m_priv) diff --git a/src/main/include/log4cxx/helpers/strftimedateformat.h b/src/main/include/log4cxx/helpers/strftimedateformat.h index 57cded7d3..86af72ad6 100644 --- a/src/main/include/log4cxx/helpers/strftimedateformat.h +++ b/src/main/include/log4cxx/helpers/strftimedateformat.h @@ -43,7 +43,7 @@ class LOG4CXX_EXPORT StrftimeDateFormat : public DateFormat ~StrftimeDateFormat(); using DateFormat::format; - void format( LOG4CXX_FORMAT_TIME_FORMAL_PARAMETERS ) const override; + void format( LogString& toAppendTo, log4cxx_time_t tm ) const override; /** * Set time zone. diff --git a/src/main/include/log4cxx/helpers/systemerrwriter.h b/src/main/include/log4cxx/helpers/systemerrwriter.h index bbbf5b2ec..b9e189f63 100644 --- a/src/main/include/log4cxx/helpers/systemerrwriter.h +++ b/src/main/include/log4cxx/helpers/systemerrwriter.h @@ -41,11 +41,11 @@ class LOG4CXX_EXPORT SystemErrWriter : public Writer virtual ~SystemErrWriter(); using Writer::close; - void close( LOG4CXX_CLOSE_WRITER_FORMAL_PARAMETERS ) override; + void close( ) override; using Writer::flush; - void flush( LOG4CXX_FLUSH_WRITER_FORMAL_PARAMETERS ) override; + void flush( ) override; using Writer::write; - void write( LOG4CXX_WRITE_WRITER_FORMAL_PARAMETERS ) override; + void write( const LogString& str ) override; private: SystemErrWriter(const SystemErrWriter&); diff --git a/src/main/include/log4cxx/helpers/systemoutwriter.h b/src/main/include/log4cxx/helpers/systemoutwriter.h index f825cd697..55b28e899 100644 --- a/src/main/include/log4cxx/helpers/systemoutwriter.h +++ b/src/main/include/log4cxx/helpers/systemoutwriter.h @@ -41,11 +41,11 @@ class LOG4CXX_EXPORT SystemOutWriter : public Writer ~SystemOutWriter(); using Writer::close; - void close( LOG4CXX_CLOSE_WRITER_FORMAL_PARAMETERS ) override; + void close( ) override; using Writer::flush; - void flush( LOG4CXX_FLUSH_WRITER_FORMAL_PARAMETERS ) override; + void flush( ) override; using Writer::write; - void write( LOG4CXX_WRITE_WRITER_FORMAL_PARAMETERS ) override; + void write( const LogString& str ) override; private: SystemOutWriter(const SystemOutWriter&); diff --git a/src/main/include/log4cxx/helpers/writer.h b/src/main/include/log4cxx/helpers/writer.h index b9ab99c44..22dd54b7e 100644 --- a/src/main/include/log4cxx/helpers/writer.h +++ b/src/main/include/log4cxx/helpers/writer.h @@ -44,11 +44,8 @@ class LOG4CXX_EXPORT Writer : public Object public: virtual void close() = 0; -#define LOG4CXX_CLOSE_WRITER_FORMAL_PARAMETERS virtual void flush() = 0; -#define LOG4CXX_FLUSH_WRITER_FORMAL_PARAMETERS virtual void write(const LogString& str) = 0; -#define LOG4CXX_WRITE_WRITER_FORMAL_PARAMETERS const LogString& str /** @deprecated The \c pool parameter is not used and will be removed in a future version. */ diff --git a/src/main/include/log4cxx/htmllayout.h b/src/main/include/log4cxx/htmllayout.h index 1ae25c2ee..c19c5b594 100644 --- a/src/main/include/log4cxx/htmllayout.h +++ b/src/main/include/log4cxx/htmllayout.h @@ -93,20 +93,20 @@ class LOG4CXX_EXPORT HTMLLayout : public Layout /** Append the attributes of \c event as a HTML table row onto \c output. */ - void format( LOG4CXX_FORMAT_LAYOUT_FORMAL_PARAMETERS ) const override; + void format( LogString& output, const spi::LoggingEventPtr& event ) const override; using Layout::appendHeader; /** Append a HTML document header and start a HTML table with column headings that align with the output produced by HTMLLayout::format. */ - void appendHeader( LOG4CXX_APPEND_HEADER_FORMAL_PARAMETERS ) override; + void appendHeader( LogString& output ) override; using Layout::appendFooter; /** Terminate the HTML table and the HTML document. */ - void appendFooter( LOG4CXX_APPEND_FOOTER_FORMAL_PARAMETERS ) override; + void appendFooter( LogString& output ) override; /** The HTML layout handles the throwable contained in logging diff --git a/src/main/include/log4cxx/jsonlayout.h b/src/main/include/log4cxx/jsonlayout.h index c7fe92ba7..d0abbea52 100644 --- a/src/main/include/log4cxx/jsonlayout.h +++ b/src/main/include/log4cxx/jsonlayout.h @@ -104,7 +104,7 @@ class LOG4CXX_EXPORT JSONLayout : public Layout Calculates the length of the formtted output. */ - void activateOptions( LOG4CXX_ACTIVATE_OPTIONS_FORMAL_PARAMETERS ) override; + void activateOptions( ) override; /** \copybrief spi::OptionHandler::setOption() @@ -121,7 +121,7 @@ class LOG4CXX_EXPORT JSONLayout : public Layout /** Append the attributes of \c event as a JSON map onto \c output. */ - void format( LOG4CXX_FORMAT_LAYOUT_FORMAL_PARAMETERS ) const override; + void format( LogString& output, const spi::LoggingEventPtr& event ) const override; /** The JSON layout handles the throwable contained in logging diff --git a/src/main/include/log4cxx/layout.h b/src/main/include/log4cxx/layout.h index 1325feda5..5e21de738 100644 --- a/src/main/include/log4cxx/layout.h +++ b/src/main/include/log4cxx/layout.h @@ -44,7 +44,6 @@ class LOG4CXX_EXPORT Layout Implement this method to create your own layout format. */ virtual void format(LogString& output, const spi::LoggingEventPtr& event) const = 0; -#define LOG4CXX_FORMAT_LAYOUT_FORMAL_PARAMETERS LogString& output, const spi::LoggingEventPtr& event /** @deprecated The \c pool parameter is not used and will be removed in a future version. */ @@ -62,7 +61,6 @@ class LOG4CXX_EXPORT Layout nothing. */ virtual void appendHeader(LogString& output); -#define LOG4CXX_APPEND_HEADER_FORMAL_PARAMETERS LogString& output /** @deprecated The \c pool parameter is not used and will be removed in a future version. */ @@ -74,7 +72,6 @@ class LOG4CXX_EXPORT Layout nothing. */ virtual void appendFooter(LogString& output); -#define LOG4CXX_APPEND_FOOTER_FORMAL_PARAMETERS LogString& output /** @deprecated The \c pool parameter is not used and will be removed in a future version. */ @@ -98,7 +95,7 @@ class LOG4CXX_EXPORT Layout No action is performed in this implementation. */ - void activateOptions( LOG4CXX_ACTIVATE_OPTIONS_FORMAL_PARAMETERS ) override; + void activateOptions( ) override; protected: /** * The expected length of a formatted event excluding the message text diff --git a/src/main/include/log4cxx/net/smtpappender.h b/src/main/include/log4cxx/net/smtpappender.h index 5b6ebebf9..b45e1483e 100644 --- a/src/main/include/log4cxx/net/smtpappender.h +++ b/src/main/include/log4cxx/net/smtpappender.h @@ -141,13 +141,13 @@ class LOG4CXX_EXPORT SMTPAppender : public AppenderSkeleton

  • a non-ascii character is detected where not permitted
  • . */ - void activateOptions( LOG4CXX_ACTIVATE_OPTIONS_FORMAL_PARAMETERS ) override; + void activateOptions( ) override; /** Perform SMTPAppender specific appending actions, mainly adding the event to a cyclic buffer and checking if the event triggers an e-mail to be sent. */ - void append( LOG4CXX_APPEND_FORMAL_PARAMETERS ) override; + void append( const spi::LoggingEventPtr& event ) override; void close() override; diff --git a/src/main/include/log4cxx/net/socketappenderskeleton.h b/src/main/include/log4cxx/net/socketappenderskeleton.h index aeb8bea25..3655b7d6f 100644 --- a/src/main/include/log4cxx/net/socketappenderskeleton.h +++ b/src/main/include/log4cxx/net/socketappenderskeleton.h @@ -101,7 +101,7 @@ class LOG4CXX_EXPORT SocketAppenderSkeleton : public AppenderSkeleton Connects to the specified RemoteHost and Port. */ - void activateOptions( LOG4CXX_ACTIVATE_OPTIONS_FORMAL_PARAMETERS ) override; + void activateOptions( ) override; void close() override; diff --git a/src/main/include/log4cxx/net/syslogappender.h b/src/main/include/log4cxx/net/syslogappender.h index 6dc2c70ed..50bb11e37 100644 --- a/src/main/include/log4cxx/net/syslogappender.h +++ b/src/main/include/log4cxx/net/syslogappender.h @@ -73,7 +73,7 @@ class LOG4CXX_EXPORT SyslogAppender : public AppenderSkeleton */ static int getFacility(const LogString& facilityName); - void append( LOG4CXX_APPEND_FORMAL_PARAMETERS ) override; + void append( const spi::LoggingEventPtr& event ) override; /** \copybrief AppenderSkeleton::setOption() diff --git a/src/main/include/log4cxx/net/telnetappender.h b/src/main/include/log4cxx/net/telnetappender.h index e8b690efb..f667da5f4 100644 --- a/src/main/include/log4cxx/net/telnetappender.h +++ b/src/main/include/log4cxx/net/telnetappender.h @@ -90,7 +90,7 @@ class LOG4CXX_EXPORT TelnetAppender : public AppenderSkeleton Create the socket handler and wait for connections. */ - void activateOptions( LOG4CXX_ACTIVATE_OPTIONS_FORMAL_PARAMETERS ) override; + void activateOptions( ) override; /** @@ -173,7 +173,7 @@ class LOG4CXX_EXPORT TelnetAppender : public AppenderSkeleton protected: /** Send \c event to each connected client. */ - void append( LOG4CXX_APPEND_FORMAL_PARAMETERS ) override; + void append( const spi::LoggingEventPtr& event ) override; private: // prevent copy and assignment statements diff --git a/src/main/include/log4cxx/net/xmlsocketappender.h b/src/main/include/log4cxx/net/xmlsocketappender.h index d3d92108a..eb14c78a6 100644 --- a/src/main/include/log4cxx/net/xmlsocketappender.h +++ b/src/main/include/log4cxx/net/xmlsocketappender.h @@ -98,7 +98,7 @@ class LOG4CXX_EXPORT XMLSocketAppender : public SocketAppenderSkeleton int getDefaultPort() const override; - void append( LOG4CXX_APPEND_FORMAL_PARAMETERS ) override; + void append( const spi::LoggingEventPtr& event ) override; private: // prevent copy and assignment statements diff --git a/src/main/include/log4cxx/nt/nteventlogappender.h b/src/main/include/log4cxx/nt/nteventlogappender.h index d88154a76..e20676605 100644 --- a/src/main/include/log4cxx/nt/nteventlogappender.h +++ b/src/main/include/log4cxx/nt/nteventlogappender.h @@ -48,7 +48,7 @@ class LOG4CXX_EXPORT NTEventLogAppender : public AppenderSkeleton Calls RegisterEventSource. */ - void activateOptions( LOG4CXX_ACTIVATE_OPTIONS_FORMAL_PARAMETERS ) override; + void activateOptions( ) override; void close() override; /** @@ -99,7 +99,7 @@ class LOG4CXX_EXPORT NTEventLogAppender : public AppenderSkeleton typedef void SID; typedef void* HANDLE; - void append( LOG4CXX_APPEND_FORMAL_PARAMETERS ) override; + void append( const spi::LoggingEventPtr& event ) override; static unsigned short getEventType(const spi::LoggingEventPtr& event); static unsigned short getEventCategory(const spi::LoggingEventPtr& event); /* diff --git a/src/main/include/log4cxx/nt/outputdebugstringappender.h b/src/main/include/log4cxx/nt/outputdebugstringappender.h index 24ca24108..a6201c0b9 100644 --- a/src/main/include/log4cxx/nt/outputdebugstringappender.h +++ b/src/main/include/log4cxx/nt/outputdebugstringappender.h @@ -42,7 +42,7 @@ class LOG4CXX_EXPORT OutputDebugStringAppender : public AppenderSkeleton void close() override {} - void append( LOG4CXX_APPEND_FORMAL_PARAMETERS ) override; + void append( const spi::LoggingEventPtr& event ) override; }; } } diff --git a/src/main/include/log4cxx/pattern/classnamepatternconverter.h b/src/main/include/log4cxx/pattern/classnamepatternconverter.h index 6c78f0063..107f75799 100644 --- a/src/main/include/log4cxx/pattern/classnamepatternconverter.h +++ b/src/main/include/log4cxx/pattern/classnamepatternconverter.h @@ -57,7 +57,7 @@ class LOG4CXX_EXPORT ClassNamePatternConverter : public NamePatternConverter using NamePatternConverter::format; - void format( LOG4CXX_FORMAT_EVENT_FORMAL_PARAMETERS ) const override; + void format( const spi::LoggingEventPtr& event, LogString& toAppendTo ) const override; }; } diff --git a/src/main/include/log4cxx/pattern/colorendpatternconverter.h b/src/main/include/log4cxx/pattern/colorendpatternconverter.h index 3f3451670..b535c4d55 100644 --- a/src/main/include/log4cxx/pattern/colorendpatternconverter.h +++ b/src/main/include/log4cxx/pattern/colorendpatternconverter.h @@ -54,7 +54,7 @@ class LOG4CXX_EXPORT ColorEndPatternConverter using LoggingEventPatternConverter::format; - void format( LOG4CXX_FORMAT_EVENT_FORMAL_PARAMETERS ) const override; + void format( const spi::LoggingEventPtr& event, LogString& toAppendTo ) const override; }; } diff --git a/src/main/include/log4cxx/pattern/colorstartpatternconverter.h b/src/main/include/log4cxx/pattern/colorstartpatternconverter.h index 07fb83bb8..e48f66710 100644 --- a/src/main/include/log4cxx/pattern/colorstartpatternconverter.h +++ b/src/main/include/log4cxx/pattern/colorstartpatternconverter.h @@ -56,7 +56,7 @@ class LOG4CXX_EXPORT ColorStartPatternConverter using LoggingEventPatternConverter::format; - void format( LOG4CXX_FORMAT_EVENT_FORMAL_PARAMETERS ) const override; + void format( const spi::LoggingEventPtr& event, LogString& toAppendTo ) const override; void setFatalColor(const LogString& color); void setErrorColor(const LogString& color); diff --git a/src/main/include/log4cxx/pattern/datepatternconverter.h b/src/main/include/log4cxx/pattern/datepatternconverter.h index 36a61447e..c0e638c5e 100644 --- a/src/main/include/log4cxx/pattern/datepatternconverter.h +++ b/src/main/include/log4cxx/pattern/datepatternconverter.h @@ -79,14 +79,14 @@ class LOG4CXX_EXPORT DatePatternConverter : public LoggingEventPatternConverter /** * Append to \c output a textual version of the timestamp in \c event. */ - void format( LOG4CXX_FORMAT_EVENT_FORMAL_PARAMETERS ) const override; + void format( const spi::LoggingEventPtr& event, LogString& toAppendTo ) const override; /** * Append to \c output a textual version of the date or timestamp in \c obj. * * Nothing is added to \c output if \c obj does not point to a Date or spi::LoggingEvent. */ - void format( LOG4CXX_FORMAT_OBJECT_FORMAL_PARAMETERS ) const override; + void format( const helpers::ObjectPtr& obj, LogString& toAppendTo ) const override; /** * Append to \c toAppendTo a textual version of \c date. diff --git a/src/main/include/log4cxx/pattern/filelocationpatternconverter.h b/src/main/include/log4cxx/pattern/filelocationpatternconverter.h index c3ee3a203..57080de0a 100644 --- a/src/main/include/log4cxx/pattern/filelocationpatternconverter.h +++ b/src/main/include/log4cxx/pattern/filelocationpatternconverter.h @@ -54,7 +54,7 @@ class LOG4CXX_EXPORT FileLocationPatternConverter using LoggingEventPatternConverter::format; - void format( LOG4CXX_FORMAT_EVENT_FORMAL_PARAMETERS ) const override; + void format( const spi::LoggingEventPtr& event, LogString& toAppendTo ) const override; }; } diff --git a/src/main/include/log4cxx/pattern/fulllocationpatternconverter.h b/src/main/include/log4cxx/pattern/fulllocationpatternconverter.h index cdbcd0a44..0688788fb 100644 --- a/src/main/include/log4cxx/pattern/fulllocationpatternconverter.h +++ b/src/main/include/log4cxx/pattern/fulllocationpatternconverter.h @@ -54,7 +54,7 @@ class LOG4CXX_EXPORT FullLocationPatternConverter using LoggingEventPatternConverter::format; - void format( LOG4CXX_FORMAT_EVENT_FORMAL_PARAMETERS ) const override; + void format( const spi::LoggingEventPtr& event, LogString& toAppendTo ) const override; }; } diff --git a/src/main/include/log4cxx/pattern/integerpatternconverter.h b/src/main/include/log4cxx/pattern/integerpatternconverter.h index c5886a087..7de9085be 100644 --- a/src/main/include/log4cxx/pattern/integerpatternconverter.h +++ b/src/main/include/log4cxx/pattern/integerpatternconverter.h @@ -52,7 +52,7 @@ class LOG4CXX_EXPORT IntegerPatternConverter : public PatternConverter const std::vector& options); using PatternConverter::format; - void format( LOG4CXX_FORMAT_OBJECT_FORMAL_PARAMETERS ) const override; + void format( const helpers::ObjectPtr& obj, LogString& toAppendTo ) const override; }; LOG4CXX_PTR_DEF(IntegerPatternConverter); diff --git a/src/main/include/log4cxx/pattern/levelpatternconverter.h b/src/main/include/log4cxx/pattern/levelpatternconverter.h index ad70e8a2b..098423a24 100644 --- a/src/main/include/log4cxx/pattern/levelpatternconverter.h +++ b/src/main/include/log4cxx/pattern/levelpatternconverter.h @@ -53,7 +53,7 @@ class LOG4CXX_EXPORT LevelPatternConverter : public LoggingEventPatternConverter using LoggingEventPatternConverter::format; - void format( LOG4CXX_FORMAT_EVENT_FORMAL_PARAMETERS ) const override; + void format( const spi::LoggingEventPtr& event, LogString& toAppendTo ) const override; LogString getStyleClass(const helpers::ObjectPtr& e) const override; }; diff --git a/src/main/include/log4cxx/pattern/linelocationpatternconverter.h b/src/main/include/log4cxx/pattern/linelocationpatternconverter.h index 28ac591bf..205169a64 100644 --- a/src/main/include/log4cxx/pattern/linelocationpatternconverter.h +++ b/src/main/include/log4cxx/pattern/linelocationpatternconverter.h @@ -54,7 +54,7 @@ class LOG4CXX_EXPORT LineLocationPatternConverter using LoggingEventPatternConverter::format; - void format( LOG4CXX_FORMAT_EVENT_FORMAL_PARAMETERS ) const override; + void format( const spi::LoggingEventPtr& event, LogString& toAppendTo ) const override; }; } diff --git a/src/main/include/log4cxx/pattern/lineseparatorpatternconverter.h b/src/main/include/log4cxx/pattern/lineseparatorpatternconverter.h index d53a489dd..e2812bb22 100644 --- a/src/main/include/log4cxx/pattern/lineseparatorpatternconverter.h +++ b/src/main/include/log4cxx/pattern/lineseparatorpatternconverter.h @@ -54,9 +54,9 @@ class LOG4CXX_EXPORT LineSeparatorPatternConverter using LoggingEventPatternConverter::format; - void format( LOG4CXX_FORMAT_EVENT_FORMAL_PARAMETERS ) const override; + void format( const spi::LoggingEventPtr& event, LogString& toAppendTo ) const override; - void format( LOG4CXX_FORMAT_OBJECT_FORMAL_PARAMETERS ) const override; + void format( const helpers::ObjectPtr& obj, LogString& toAppendTo ) const override; }; } diff --git a/src/main/include/log4cxx/pattern/literalpatternconverter.h b/src/main/include/log4cxx/pattern/literalpatternconverter.h index d0802314c..2c9384224 100644 --- a/src/main/include/log4cxx/pattern/literalpatternconverter.h +++ b/src/main/include/log4cxx/pattern/literalpatternconverter.h @@ -49,9 +49,9 @@ class LOG4CXX_EXPORT LiteralPatternConverter : public LoggingEventPatternConvert using LoggingEventPatternConverter::format; - void format( LOG4CXX_FORMAT_EVENT_FORMAL_PARAMETERS ) const override; + void format( const spi::LoggingEventPtr& event, LogString& toAppendTo ) const override; - void format( LOG4CXX_FORMAT_OBJECT_FORMAL_PARAMETERS ) const override; + void format( const helpers::ObjectPtr& obj, LogString& toAppendTo ) const override; }; } diff --git a/src/main/include/log4cxx/pattern/loggerpatternconverter.h b/src/main/include/log4cxx/pattern/loggerpatternconverter.h index b00bb7f37..e73aaeccb 100644 --- a/src/main/include/log4cxx/pattern/loggerpatternconverter.h +++ b/src/main/include/log4cxx/pattern/loggerpatternconverter.h @@ -54,7 +54,7 @@ class LOG4CXX_EXPORT LoggerPatternConverter : public NamePatternConverter using NamePatternConverter::format; - void format( LOG4CXX_FORMAT_EVENT_FORMAL_PARAMETERS ) const override; + void format( const spi::LoggingEventPtr& event, LogString& toAppendTo ) const override; }; } diff --git a/src/main/include/log4cxx/pattern/loggingeventpatternconverter.h b/src/main/include/log4cxx/pattern/loggingeventpatternconverter.h index fda1f33ea..feffb10e0 100644 --- a/src/main/include/log4cxx/pattern/loggingeventpatternconverter.h +++ b/src/main/include/log4cxx/pattern/loggingeventpatternconverter.h @@ -61,15 +61,13 @@ class LOG4CXX_EXPORT LoggingEventPatternConverter : public PatternConverter * @param toAppendTo string buffer to which the formatted event will be appended. May not be null. */ virtual void format(const spi::LoggingEventPtr& event, LogString& toAppendTo) const = 0; -#define LOG4CXX_FORMAT_EVENT_FORMAL_PARAMETERS const spi::LoggingEventPtr& event, LogString& toAppendTo -#define LOG4CXX_FORMAT_EVENT_PARAMETERS event, toAppendTo /** @deprecated The \c pool parameter is not used and will be removed in a future version. */ [[deprecated("Use format() without a Pool parameter instead")]] void format(const spi::LoggingEventPtr& event, LogString& toAppendTo, helpers::Pool& p) const; - void format( LOG4CXX_FORMAT_OBJECT_FORMAL_PARAMETERS ) const override; + void format( const helpers::ObjectPtr& obj, LogString& toAppendTo ) const override; /** * Normally pattern converters are not meant to handle Exceptions although diff --git a/src/main/include/log4cxx/pattern/mdcpatternconverter.h b/src/main/include/log4cxx/pattern/mdcpatternconverter.h index f7a4e1b07..ce4dec218 100644 --- a/src/main/include/log4cxx/pattern/mdcpatternconverter.h +++ b/src/main/include/log4cxx/pattern/mdcpatternconverter.h @@ -52,7 +52,7 @@ class LOG4CXX_EXPORT MDCPatternConverter : public LoggingEventPatternConverter using LoggingEventPatternConverter::format; - void format( LOG4CXX_FORMAT_EVENT_FORMAL_PARAMETERS ) const override; + void format( const spi::LoggingEventPtr& event, LogString& toAppendTo ) const override; }; } } diff --git a/src/main/include/log4cxx/pattern/messagepatternconverter.h b/src/main/include/log4cxx/pattern/messagepatternconverter.h index e9441fc1a..333a77003 100644 --- a/src/main/include/log4cxx/pattern/messagepatternconverter.h +++ b/src/main/include/log4cxx/pattern/messagepatternconverter.h @@ -53,7 +53,7 @@ class LOG4CXX_EXPORT MessagePatternConverter : public LoggingEventPatternConvert using LoggingEventPatternConverter::format; - void format( LOG4CXX_FORMAT_EVENT_FORMAL_PARAMETERS ) const override; + void format( const spi::LoggingEventPtr& event, LogString& toAppendTo ) const override; }; } } diff --git a/src/main/include/log4cxx/pattern/methodlocationpatternconverter.h b/src/main/include/log4cxx/pattern/methodlocationpatternconverter.h index 3ecc237a0..c771382f6 100644 --- a/src/main/include/log4cxx/pattern/methodlocationpatternconverter.h +++ b/src/main/include/log4cxx/pattern/methodlocationpatternconverter.h @@ -54,7 +54,7 @@ class LOG4CXX_EXPORT MethodLocationPatternConverter using LoggingEventPatternConverter::format; - void format( LOG4CXX_FORMAT_EVENT_FORMAL_PARAMETERS ) const override; + void format( const spi::LoggingEventPtr& event, LogString& toAppendTo ) const override; }; } } diff --git a/src/main/include/log4cxx/pattern/ndcpatternconverter.h b/src/main/include/log4cxx/pattern/ndcpatternconverter.h index 7377d01c0..c78278fd4 100644 --- a/src/main/include/log4cxx/pattern/ndcpatternconverter.h +++ b/src/main/include/log4cxx/pattern/ndcpatternconverter.h @@ -53,7 +53,7 @@ class LOG4CXX_EXPORT NDCPatternConverter : public LoggingEventPatternConverter using LoggingEventPatternConverter::format; - void format( LOG4CXX_FORMAT_EVENT_FORMAL_PARAMETERS ) const override; + void format( const spi::LoggingEventPtr& event, LogString& toAppendTo ) const override; }; } } diff --git a/src/main/include/log4cxx/pattern/patternconverter.h b/src/main/include/log4cxx/pattern/patternconverter.h index efa0e6de8..b66be8856 100644 --- a/src/main/include/log4cxx/pattern/patternconverter.h +++ b/src/main/include/log4cxx/pattern/patternconverter.h @@ -72,7 +72,6 @@ class LOG4CXX_EXPORT PatternConverter : public virtual helpers::Object * @param toAppendTo string buffer to which the formatted event will be appended. May not be null. */ virtual void format(const helpers::ObjectPtr& obj, LogString& toAppendTo) const = 0; -#define LOG4CXX_FORMAT_OBJECT_FORMAL_PARAMETERS const helpers::ObjectPtr& obj, LogString& toAppendTo /** @deprecated The \c pool parameter is not used and will be removed in a future version. */ diff --git a/src/main/include/log4cxx/pattern/propertiespatternconverter.h b/src/main/include/log4cxx/pattern/propertiespatternconverter.h index d70472317..1bee93be3 100644 --- a/src/main/include/log4cxx/pattern/propertiespatternconverter.h +++ b/src/main/include/log4cxx/pattern/propertiespatternconverter.h @@ -66,7 +66,7 @@ class LOG4CXX_EXPORT PropertiesPatternConverter using LoggingEventPatternConverter::format; - void format( LOG4CXX_FORMAT_EVENT_FORMAL_PARAMETERS ) const override; + void format( const spi::LoggingEventPtr& event, LogString& toAppendTo ) const override; }; } } diff --git a/src/main/include/log4cxx/pattern/relativetimepatternconverter.h b/src/main/include/log4cxx/pattern/relativetimepatternconverter.h index f74fbf992..2fd12e450 100644 --- a/src/main/include/log4cxx/pattern/relativetimepatternconverter.h +++ b/src/main/include/log4cxx/pattern/relativetimepatternconverter.h @@ -57,7 +57,7 @@ class LOG4CXX_EXPORT RelativeTimePatternConverter : public LoggingEventPatternCo using LoggingEventPatternConverter::format; - void format( LOG4CXX_FORMAT_EVENT_FORMAL_PARAMETERS ) const override; + void format( const spi::LoggingEventPtr& event, LogString& toAppendTo ) const override; }; } } diff --git a/src/main/include/log4cxx/pattern/shortfilelocationpatternconverter.h b/src/main/include/log4cxx/pattern/shortfilelocationpatternconverter.h index 175c76839..469b1ee53 100644 --- a/src/main/include/log4cxx/pattern/shortfilelocationpatternconverter.h +++ b/src/main/include/log4cxx/pattern/shortfilelocationpatternconverter.h @@ -57,7 +57,7 @@ class LOG4CXX_EXPORT ShortFileLocationPatternConverter using LoggingEventPatternConverter::format; - void format( LOG4CXX_FORMAT_EVENT_FORMAL_PARAMETERS ) const override; + void format( const spi::LoggingEventPtr& event, LogString& toAppendTo ) const override; }; } diff --git a/src/main/include/log4cxx/pattern/threadpatternconverter.h b/src/main/include/log4cxx/pattern/threadpatternconverter.h index e30c01e2d..e3eef06f9 100644 --- a/src/main/include/log4cxx/pattern/threadpatternconverter.h +++ b/src/main/include/log4cxx/pattern/threadpatternconverter.h @@ -53,7 +53,7 @@ class LOG4CXX_EXPORT ThreadPatternConverter : public LoggingEventPatternConverte using LoggingEventPatternConverter::format; - void format( LOG4CXX_FORMAT_EVENT_FORMAL_PARAMETERS ) const override; + void format( const spi::LoggingEventPtr& event, LogString& toAppendTo ) const override; }; } } diff --git a/src/main/include/log4cxx/pattern/threadusernamepatternconverter.h b/src/main/include/log4cxx/pattern/threadusernamepatternconverter.h index 9109d1c88..527852059 100644 --- a/src/main/include/log4cxx/pattern/threadusernamepatternconverter.h +++ b/src/main/include/log4cxx/pattern/threadusernamepatternconverter.h @@ -44,7 +44,7 @@ class LOG4CXX_EXPORT ThreadUsernamePatternConverter : public LoggingEventPattern using LoggingEventPatternConverter::format; - void format( LOG4CXX_FORMAT_EVENT_FORMAL_PARAMETERS ) const override; + void format( const spi::LoggingEventPtr& event, LogString& toAppendTo ) const override; }; } diff --git a/src/main/include/log4cxx/pattern/throwableinformationpatternconverter.h b/src/main/include/log4cxx/pattern/throwableinformationpatternconverter.h index d9093dc5b..658993cae 100644 --- a/src/main/include/log4cxx/pattern/throwableinformationpatternconverter.h +++ b/src/main/include/log4cxx/pattern/throwableinformationpatternconverter.h @@ -59,7 +59,7 @@ class LOG4CXX_EXPORT ThrowableInformationPatternConverter using LoggingEventPatternConverter::format; - void format( LOG4CXX_FORMAT_EVENT_FORMAL_PARAMETERS ) const override; + void format( const spi::LoggingEventPtr& event, LogString& toAppendTo ) const override; /** * This converter obviously handles throwables. diff --git a/src/main/include/log4cxx/patternlayout.h b/src/main/include/log4cxx/patternlayout.h index c7ce568ee..c0267fc1c 100644 --- a/src/main/include/log4cxx/patternlayout.h +++ b/src/main/include/log4cxx/patternlayout.h @@ -485,7 +485,7 @@ class LOG4CXX_EXPORT PatternLayout : public Layout Calls createPatternParser */ - void activateOptions( LOG4CXX_ACTIVATE_OPTIONS_FORMAL_PARAMETERS ) override; + void activateOptions( ) override; /** \copybrief spi::OptionHandler::setOption() @@ -527,7 +527,7 @@ class LOG4CXX_EXPORT PatternLayout : public Layout /** * Produces a formatted string as specified by the conversion pattern. */ - void format( LOG4CXX_FORMAT_LAYOUT_FORMAL_PARAMETERS ) const override; + void format( LogString& output, const spi::LoggingEventPtr& event ) const override; protected: virtual LOG4CXX_NS::pattern::PatternMap getFormatSpecifiers(); diff --git a/src/main/include/log4cxx/rolling/action.h b/src/main/include/log4cxx/rolling/action.h index 9a25edc21..adc9cb9dd 100644 --- a/src/main/include/log4cxx/rolling/action.h +++ b/src/main/include/log4cxx/rolling/action.h @@ -54,7 +54,6 @@ class Action : public virtual LOG4CXX_NS::helpers::Object * @return true if successful. */ virtual bool execute() const = 0; -#define LOG4CXX_EXECUTE_ACTION_FORMAL_PARAMETERS /** @deprecated The \c pool parameter is not used and will be removed in a future version. */ diff --git a/src/main/include/log4cxx/rolling/filerenameaction.h b/src/main/include/log4cxx/rolling/filerenameaction.h index 96eda924e..003bf3184 100644 --- a/src/main/include/log4cxx/rolling/filerenameaction.h +++ b/src/main/include/log4cxx/rolling/filerenameaction.h @@ -48,7 +48,7 @@ class FileRenameAction : public Action /** * Perform rename. */ - bool execute( LOG4CXX_EXECUTE_ACTION_FORMAL_PARAMETERS ) const override; + bool execute( ) const override; }; LOG4CXX_PTR_DEF(FileRenameAction); diff --git a/src/main/include/log4cxx/rolling/filterbasedtriggeringpolicy.h b/src/main/include/log4cxx/rolling/filterbasedtriggeringpolicy.h index e60bcd6fe..3aff10495 100644 --- a/src/main/include/log4cxx/rolling/filterbasedtriggeringpolicy.h +++ b/src/main/include/log4cxx/rolling/filterbasedtriggeringpolicy.h @@ -106,7 +106,7 @@ class LOG4CXX_EXPORT FilterBasedTriggeringPolicy : public TriggeringPolicy Activates all attached filters. */ - void activateOptions( LOG4CXX_ACTIVATE_OPTIONS_FORMAL_PARAMETERS ) override; + void activateOptions( ) override; /** \copybrief spi::OptionHandler::setOption() diff --git a/src/main/include/log4cxx/rolling/fixedwindowrollingpolicy.h b/src/main/include/log4cxx/rolling/fixedwindowrollingpolicy.h index 32e2990b7..43ad2844f 100644 --- a/src/main/include/log4cxx/rolling/fixedwindowrollingpolicy.h +++ b/src/main/include/log4cxx/rolling/fixedwindowrollingpolicy.h @@ -97,7 +97,7 @@ class LOG4CXX_EXPORT FixedWindowRollingPolicy : public RollingPolicyBase \sa RollingPolicyBase::activateOptions() */ - void activateOptions( LOG4CXX_ACTIVATE_OPTIONS_FORMAL_PARAMETERS ) override; + void activateOptions( ) override; /** \copybrief RollingPolicyBase::setOption() @@ -125,13 +125,13 @@ class LOG4CXX_EXPORT FixedWindowRollingPolicy : public RollingPolicyBase /** * {@inheritDoc} */ - RolloverDescriptionPtr initialize( LOG4CXX_ROLLING_POLICY_INITIALIZE_FORMAL_PARAMETERS ) override; + RolloverDescriptionPtr initialize( const LogString& currentActiveFile, bool append ) override; using RollingPolicy::rollover; /** * {@inheritDoc} */ - RolloverDescriptionPtr rollover( LOG4CXX_ROLLING_POLICY_ROLLOVER_FORMAL_PARAMETERS ) override; + RolloverDescriptionPtr rollover( const LogString& currentActiveFile, bool append ) override; protected: /** diff --git a/src/main/include/log4cxx/rolling/gzcompressaction.h b/src/main/include/log4cxx/rolling/gzcompressaction.h index a8be0a959..cda398d68 100644 --- a/src/main/include/log4cxx/rolling/gzcompressaction.h +++ b/src/main/include/log4cxx/rolling/gzcompressaction.h @@ -49,7 +49,7 @@ class GZCompressAction : public Action /** * Compress the file. */ - bool execute( LOG4CXX_EXECUTE_ACTION_FORMAL_PARAMETERS ) const override; + bool execute( ) const override; /** * Set to true to throw an IOException on a fork failure. By default, this diff --git a/src/main/include/log4cxx/rolling/manualtriggeringpolicy.h b/src/main/include/log4cxx/rolling/manualtriggeringpolicy.h index e7fe90fc7..fa630aefc 100644 --- a/src/main/include/log4cxx/rolling/manualtriggeringpolicy.h +++ b/src/main/include/log4cxx/rolling/manualtriggeringpolicy.h @@ -73,7 +73,7 @@ class LOG4CXX_EXPORT ManualTriggeringPolicy : public TriggeringPolicy No action is performed in this implementation. */ - void activateOptions( LOG4CXX_ACTIVATE_OPTIONS_FORMAL_PARAMETERS ) override; + void activateOptions( ) override; /** \copybrief spi::OptionHandler::setOption() diff --git a/src/main/include/log4cxx/rolling/multiprocessrollingfileappender.h b/src/main/include/log4cxx/rolling/multiprocessrollingfileappender.h index c828b32ed..d3aec8088 100644 --- a/src/main/include/log4cxx/rolling/multiprocessrollingfileappender.h +++ b/src/main/include/log4cxx/rolling/multiprocessrollingfileappender.h @@ -57,7 +57,7 @@ class LOG4CXX_EXPORT MultiprocessRollingFileAppender : public RollingFileAppende \sa FileAppender::activateOptions() */ - void activateOptions( LOG4CXX_ACTIVATE_OPTIONS_FORMAL_PARAMETERS ) override; + void activateOptions( ) override; /** Implements the usual roll over behaviour. @@ -80,7 +80,7 @@ class LOG4CXX_EXPORT MultiprocessRollingFileAppender : public RollingFileAppende /** Actual writing occurs here. */ - void subAppend( LOG4CXX_APPEND_FORMAL_PARAMETERS ) override; + void subAppend( const spi::LoggingEventPtr& event ) override; protected: /** diff --git a/src/main/include/log4cxx/rolling/rollingfileappender.h b/src/main/include/log4cxx/rolling/rollingfileappender.h index 49dd7e870..6e96cb661 100644 --- a/src/main/include/log4cxx/rolling/rollingfileappender.h +++ b/src/main/include/log4cxx/rolling/rollingfileappender.h @@ -153,7 +153,7 @@ class LOG4CXX_EXPORT RollingFileAppender : public FileAppender \sa FileAppender::activateOptions() */ - void activateOptions( LOG4CXX_ACTIVATE_OPTIONS_FORMAL_PARAMETERS ) override; + void activateOptions( ) override; /** Implements the configured roll over behaviour. @@ -176,7 +176,7 @@ class LOG4CXX_EXPORT RollingFileAppender : public FileAppender /** Actual writing occurs here. */ - void subAppend( LOG4CXX_APPEND_FORMAL_PARAMETERS ) override; + void subAppend( const spi::LoggingEventPtr& event ) override; bool rolloverInternal(); diff --git a/src/main/include/log4cxx/rolling/rollingpolicy.h b/src/main/include/log4cxx/rolling/rollingpolicy.h index ed7ae395c..f6f04ac13 100644 --- a/src/main/include/log4cxx/rolling/rollingpolicy.h +++ b/src/main/include/log4cxx/rolling/rollingpolicy.h @@ -55,7 +55,6 @@ class LOG4CXX_EXPORT RollingPolicy : * no initialization needed. */ virtual RolloverDescriptionPtr initialize(const LogString& currentActiveFile, bool append) = 0; -#define LOG4CXX_ROLLING_POLICY_INITIALIZE_FORMAL_PARAMETERS const LogString& currentActiveFile, bool append /** @deprecated The \c pool parameter is not used and will be removed in a future version. */ @@ -74,7 +73,6 @@ class LOG4CXX_EXPORT RollingPolicy : * at this time. */ virtual RolloverDescriptionPtr rollover(const LogString& currentActiveFile, bool append) = 0; -#define LOG4CXX_ROLLING_POLICY_ROLLOVER_FORMAL_PARAMETERS const LogString& currentActiveFile, bool append /** @deprecated The \c pool parameter is not used and will be removed in a future version. */ diff --git a/src/main/include/log4cxx/rolling/rollingpolicybase.h b/src/main/include/log4cxx/rolling/rollingpolicybase.h index a7ffef81d..c5157f8af 100644 --- a/src/main/include/log4cxx/rolling/rollingpolicybase.h +++ b/src/main/include/log4cxx/rolling/rollingpolicybase.h @@ -61,7 +61,7 @@ class LOG4CXX_EXPORT RollingPolicyBase Converts the file name pattern to a collection of formaters. */ - void activateOptions( LOG4CXX_ACTIVATE_OPTIONS_FORMAL_PARAMETERS ) override; + void activateOptions( ) override; /** A map from a name to the object implementing the (date or index) formatting. diff --git a/src/main/include/log4cxx/rolling/sizebasedtriggeringpolicy.h b/src/main/include/log4cxx/rolling/sizebasedtriggeringpolicy.h index 11f505978..b0b035e19 100644 --- a/src/main/include/log4cxx/rolling/sizebasedtriggeringpolicy.h +++ b/src/main/include/log4cxx/rolling/sizebasedtriggeringpolicy.h @@ -80,7 +80,7 @@ class LOG4CXX_EXPORT SizeBasedTriggeringPolicy : public TriggeringPolicy No action is performed in this implementation. */ - void activateOptions( LOG4CXX_ACTIVATE_OPTIONS_FORMAL_PARAMETERS ) override; + void activateOptions( ) override; /** \copybrief spi::OptionHandler::setOption() diff --git a/src/main/include/log4cxx/rolling/timebasedrollingpolicy.h b/src/main/include/log4cxx/rolling/timebasedrollingpolicy.h index 29f831a45..77000e1a0 100755 --- a/src/main/include/log4cxx/rolling/timebasedrollingpolicy.h +++ b/src/main/include/log4cxx/rolling/timebasedrollingpolicy.h @@ -163,7 +163,7 @@ class LOG4CXX_EXPORT TimeBasedRollingPolicy \sa RollingPolicyBase::activateOptions() */ - void activateOptions( LOG4CXX_ACTIVATE_OPTIONS_FORMAL_PARAMETERS) override; + void activateOptions( ) override; void setMultiprocess(bool multiprocess); @@ -171,13 +171,13 @@ class LOG4CXX_EXPORT TimeBasedRollingPolicy /** * {@inheritDoc} */ - RolloverDescriptionPtr initialize( LOG4CXX_ROLLING_POLICY_INITIALIZE_FORMAL_PARAMETERS ) override; + RolloverDescriptionPtr initialize( const LogString& currentActiveFile, bool append ) override; using RollingPolicy::rollover; /** * {@inheritDoc} */ - RolloverDescriptionPtr rollover( LOG4CXX_ROLLING_POLICY_ROLLOVER_FORMAL_PARAMETERS ) override; + RolloverDescriptionPtr rollover( const LogString& currentActiveFile, bool append ) override; /** * Determines if a rollover may be appropriate at this time. If diff --git a/src/main/include/log4cxx/rolling/zipcompressaction.h b/src/main/include/log4cxx/rolling/zipcompressaction.h index dbec553f3..d6217fda5 100644 --- a/src/main/include/log4cxx/rolling/zipcompressaction.h +++ b/src/main/include/log4cxx/rolling/zipcompressaction.h @@ -48,7 +48,7 @@ class ZipCompressAction : public Action /** * Compress the file. */ - bool execute( LOG4CXX_EXECUTE_ACTION_FORMAL_PARAMETERS ) const override; + bool execute( ) const override; /** * Set to true to throw an IOException on a fork failure. By default, this diff --git a/src/main/include/log4cxx/simplelayout.h b/src/main/include/log4cxx/simplelayout.h index c983cc29c..f574f1d37 100644 --- a/src/main/include/log4cxx/simplelayout.h +++ b/src/main/include/log4cxx/simplelayout.h @@ -50,7 +50,7 @@ class LOG4CXX_EXPORT SimpleLayout : public Layout
     INFO - "A message"
     		
    */ - void format( LOG4CXX_FORMAT_LAYOUT_FORMAL_PARAMETERS ) const override; + void format( LogString& output, const spi::LoggingEventPtr& event ) const override; /** The SimpleLayout does not handle the throwable contained within diff --git a/src/main/include/log4cxx/spi/errorhandler.h b/src/main/include/log4cxx/spi/errorhandler.h index bd9c069d1..a8620d47c 100644 --- a/src/main/include/log4cxx/spi/errorhandler.h +++ b/src/main/include/log4cxx/spi/errorhandler.h @@ -133,7 +133,7 @@ class LOG4CXX_EXPORT ErrorHandler No action is performed in this implementation. */ - void activateOptions( LOG4CXX_ACTIVATE_OPTIONS_FORMAL_PARAMETERS ) override; + void activateOptions( ) override; }; diff --git a/src/main/include/log4cxx/spi/filter.h b/src/main/include/log4cxx/spi/filter.h index 3394dd640..55e19ddd4 100644 --- a/src/main/include/log4cxx/spi/filter.h +++ b/src/main/include/log4cxx/spi/filter.h @@ -109,7 +109,7 @@ class LOG4CXX_EXPORT Filter No action is performed in this implementation. */ - void activateOptions( LOG4CXX_ACTIVATE_OPTIONS_FORMAL_PARAMETERS ) override; + void activateOptions( ) override; /** \copybrief spi::OptionHandler::setOption() diff --git a/src/main/include/log4cxx/spi/optionhandler.h b/src/main/include/log4cxx/spi/optionhandler.h index 8e39473b5..1fcf51fc3 100644 --- a/src/main/include/log4cxx/spi/optionhandler.h +++ b/src/main/include/log4cxx/spi/optionhandler.h @@ -49,8 +49,6 @@ class LOG4CXX_EXPORT OptionHandler : public virtual helpers::Object the File and Append options both of which are ambiguous until the other is also set. */ -#define LOG4CXX_ACTIVATE_OPTIONS_FORMAL_PARAMETERS -#define LOG4CXX_ACTIVATE_OPTIONS_PARAMETER virtual void activateOptions() = 0; /** @deprecated This function is deprecated and will be removed in a future version. diff --git a/src/main/include/log4cxx/writerappender.h b/src/main/include/log4cxx/writerappender.h index 8e4585f08..699f81577 100644 --- a/src/main/include/log4cxx/writerappender.h +++ b/src/main/include/log4cxx/writerappender.h @@ -54,7 +54,7 @@ class LOG4CXX_EXPORT WriterAppender : public AppenderSkeleton Derived appenders should override this method if option structure requires it. */ - void activateOptions( LOG4CXX_ACTIVATE_OPTIONS_FORMAL_PARAMETERS ) override; + void activateOptions( ) override; /** If the ImmediateFlush option is set to @@ -88,7 +88,7 @@ class LOG4CXX_EXPORT WriterAppender : public AppenderSkeleton layout. */ - void append( LOG4CXX_APPEND_FORMAL_PARAMETERS ) override; + void append( const spi::LoggingEventPtr& event ) override; protected: @@ -152,7 +152,7 @@ class LOG4CXX_EXPORT WriterAppender : public AppenderSkeleton /** Actual writing occurs here. */ - virtual void subAppend( LOG4CXX_APPEND_FORMAL_PARAMETERS ); + virtual void subAppend( const spi::LoggingEventPtr& event ); private: diff --git a/src/main/include/log4cxx/xml/xmllayout.h b/src/main/include/log4cxx/xml/xmllayout.h index acd7f7e1b..41090ec96 100644 --- a/src/main/include/log4cxx/xml/xmllayout.h +++ b/src/main/include/log4cxx/xml/xmllayout.h @@ -113,7 +113,7 @@ class LOG4CXX_EXPORT XMLLayout : public Layout * Formats a {@link spi::LoggingEvent LoggingEvent} * in conformance with [this XML data definition file](https://logging.apache.org/log4j/1.x/apidocs/org/apache/log4j/xml/doc-files/log4j.dtd). **/ - void format( LOG4CXX_FORMAT_LAYOUT_FORMAL_PARAMETERS ) const override; + void format( LogString& output, const spi::LoggingEventPtr& event ) const override; /** The XMLLayout prints and does not ignore exceptions. Hence the diff --git a/src/site/doxy/Doxyfile.in b/src/site/doxy/Doxyfile.in index ac061ca88..16738649f 100644 --- a/src/site/doxy/Doxyfile.in +++ b/src/site/doxy/Doxyfile.in @@ -2350,29 +2350,6 @@ PREDEFINED = LOG4CXX_NS=log4cxx \ LOG4CXX_UNICHAR_API \ LOG4CXX_CFSTRING_API \ LOG4CXX_ABI_VERSION=@log4cxx_ABI_VER@ \ - LOG4CXX_ACTIVATE_OPTIONS_FORMAL_PARAMETERS="helpers::Pool& p" \ - LOG4CXX_ACTIVATE_OPTIONS_PARAMETER=p \ - LOG4CXX_APPEND_FORMAL_PARAMETERS="const spi::LoggingEventPtr& event, helpers::Pool& p" \ - LOG4CXX_APPEND_PARAMETERS="event, p" \ - LOG4CXX_FORMAT_OBJECT_FORMAL_PARAMETERS="const helpers::ObjectPtr& obj, LogString& toAppendTo, helpers::Pool& p" \ - LOG4CXX_FORMAT_TIME_FORMAL_PARAMETERS="LogString& toAppendTo, log4cxx_time_t tm, helpers::Pool& p" \ - LOG4CXX_FORMAT_NUMBER_FORMAL_PARAMETERS="LogString& toAppendTo, int n, helpers::Pool& p" \ - LOG4CXX_FORMAT_EVENT_FORMAL_PARAMETERS="const spi::LoggingEventPtr& event, LogString& toAppendTo, helpers::Pool& p" \ - LOG4CXX_FORMAT_EVENT_PARAMETERS="event, toAppendTo, p" \ - LOG4CXX_FORMAT_LAYOUT_FORMAL_PARAMETERS="LogString& output, const spi::LoggingEventPtr& event, helpers::Pool& p" \ - LOG4CXX_APPEND_HEADER_FORMAL_PARAMETERS="LogString& output, LOG4CXX_NS::helpers::Pool& p" \ - LOG4CXX_APPEND_FOOTER_FORMAL_PARAMETERS="LogString& output, LOG4CXX_NS::helpers::Pool& p" \ - LOG4CXX_CLOSE_WRITER_FORMAL_PARAMETERS="helpers::Pool& p" \ - LOG4CXX_FLUSH_WRITER_FORMAL_PARAMETERS="helpers::Pool& p" \ - LOG4CXX_WRITE_WRITER_FORMAL_PARAMETERS="const LogString& str, helpers::Pool& p" \ - LOG4CXX_CLOSE_OUTPUT_STREAM_FORMAL_PARAMETERS="helpers::Pool& p" \ - LOG4CXX_FLUSH_OUTPUT_STREAM_FORMAL_PARAMETERS="helpers::Pool& p" \ - LOG4CXX_WRITE_OUTPUT_STREAM_FORMAL_PARAMETERS="ByteBuffer& buf, helpers::Pool& p" \ - LOG4CXX_CLOSE_READER_FORMAL_PARAMETERS="helpers::Pool& p" \ - LOG4CXX_READ_READER_FORMAL_PARAMETERS="helpers::Pool& p" \ - LOG4CXX_EXECUTE_ACTION_FORMAL_PARAMETERS="helpers::Pool& p" \ - LOG4CXX_ROLLING_POLICY_INITIALIZE_FORMAL_PARAMETERS="const LogString& currentActiveFile, bool append, helpers::Pool& p" \ - LOG4CXX_ROLLING_POLICY_ROLLOVER_FORMAL_PARAMETERS="const LogString& currentActiveFile, bool append, helpers::Pool& p" \ LOG4CXX_HAS_DOMCONFIGURATOR=1 \ LOG4CXX_ASYNC_BUFFER_SUPPORTS_FMT=1 \ __LOG4CXX_FUNC__=compiler_dependent diff --git a/src/test/cpp/asyncappendertestcase.cpp b/src/test/cpp/asyncappendertestcase.cpp index 554bb5ff3..bc4da38cb 100644 --- a/src/test/cpp/asyncappendertestcase.cpp +++ b/src/test/cpp/asyncappendertestcase.cpp @@ -78,7 +78,7 @@ class NullPointerAppender : public AppenderSkeleton /** * @{inheritDoc} */ - void append( LOG4CXX_APPEND_FORMAL_PARAMETERS ) override + void append( const spi::LoggingEventPtr& event ) override { throw RuntimeException(LOG4CXX_STR("Intentional Exception")); } @@ -111,10 +111,10 @@ class BlockableVectorAppender : public VectorAppender /** * {@inheritDoc} */ - void append( LOG4CXX_APPEND_FORMAL_PARAMETERS ) override + void append( const spi::LoggingEventPtr& event ) override { std::lock_guard lock( blocker ); - VectorAppender::append( LOG4CXX_APPEND_PARAMETERS ); + VectorAppender::append( event ); } std::mutex& getBlocker() @@ -138,13 +138,13 @@ class TransientlyFailingVectorAppender : public VectorAppender { } - void append( LOG4CXX_APPEND_FORMAL_PARAMETERS ) override + void append( const spi::LoggingEventPtr& event ) override { if (0 < failuresRemaining--) { throw RuntimeException(LOG4CXX_STR("Intentional transient exception")); } - VectorAppender::append( LOG4CXX_APPEND_PARAMETERS ); + VectorAppender::append( event ); } /** Goes negative once an append call has succeeded. */ @@ -161,10 +161,10 @@ LOG4CXX_PTR_DEF(TransientlyFailingVectorAppender); class LoggingVectorAppender : public VectorAppender { LoggerInstancePtr logger{ "LoggingVectorAppender" }; - void append( LOG4CXX_APPEND_FORMAL_PARAMETERS ) override + void append( const spi::LoggingEventPtr& event ) override { auto& lsMsg = event->getRenderedMessage(); - VectorAppender::append( LOG4CXX_APPEND_PARAMETERS ); + VectorAppender::append( event ); if (LogString::npos != lsMsg.find(LOG4CXX_STR("World"))) { LOG4CXX_LOGLS(logger, Level::getError(), LOG4CXX_STR("Some appender error")); diff --git a/src/test/cpp/benchmark/benchmark.cpp b/src/test/cpp/benchmark/benchmark.cpp index b6e62f84b..7ae489087 100644 --- a/src/test/cpp/benchmark/benchmark.cpp +++ b/src/test/cpp/benchmark/benchmark.cpp @@ -43,7 +43,7 @@ class NullWriterAppender : public AppenderSkeleton return true; } - void append( LOG4CXX_APPEND_FORMAL_PARAMETERS ) override + void append( const spi::LoggingEventPtr& event ) override { LogString buf; m_priv->layout->format(buf, event); diff --git a/src/test/cpp/levelchangetestcase.cpp b/src/test/cpp/levelchangetestcase.cpp index 48504ce29..fdc36fe11 100644 --- a/src/test/cpp/levelchangetestcase.cpp +++ b/src/test/cpp/levelchangetestcase.cpp @@ -37,7 +37,7 @@ class CountingAppender : public AppenderSkeleton void close() override {} - void append( LOG4CXX_APPEND_FORMAL_PARAMETERS ) override + void append( const spi::LoggingEventPtr& event ) override { count++; } diff --git a/src/test/cpp/loggertestcase.cpp b/src/test/cpp/loggertestcase.cpp index cee5aef7e..f852d03b7 100644 --- a/src/test/cpp/loggertestcase.cpp +++ b/src/test/cpp/loggertestcase.cpp @@ -50,7 +50,7 @@ class CountingAppender : public AppenderSkeleton void close() override {} - void append( LOG4CXX_APPEND_FORMAL_PARAMETERS ) override + void append( const spi::LoggingEventPtr& event ) override { counter++; } diff --git a/src/test/cpp/nt/nteventlogappendertestcase.cpp b/src/test/cpp/nt/nteventlogappendertestcase.cpp index 2e542e585..f93b1409f 100644 --- a/src/test/cpp/nt/nteventlogappendertestcase.cpp +++ b/src/test/cpp/nt/nteventlogappendertestcase.cpp @@ -88,7 +88,7 @@ class NTEventLogAppenderTestCase : public AppenderSkeletonTestCase LoggingEventPtr event(new LoggingEvent( LOG4CXX_STR("org.foobar"), Level::getInfo(), LOG4CXX_STR("Hello, World"), LOG4CXX_LOCATION)); - appender->doAppend( LOG4CXX_APPEND_PARAMETERS ); + appender->doAppend( event ); } hEventLog = ::OpenEventLogW(NULL, L"log4cxx_test"); LOGUNIT_ASSERT(hEventLog != NULL); diff --git a/src/test/cpp/optionhandlertest.cpp b/src/test/cpp/optionhandlertest.cpp index 80195dc20..811823f09 100644 --- a/src/test/cpp/optionhandlertest.cpp +++ b/src/test/cpp/optionhandlertest.cpp @@ -34,7 +34,7 @@ class ABI_15_Appender : public AppenderSkeleton void close() override {} - void append( LOG4CXX_APPEND_FORMAL_PARAMETERS ) override + void append( const spi::LoggingEventPtr& event ) override { helpers::LogLog::debug(LOG4CXX_STR("ABI_15_Appender::append")); } @@ -66,7 +66,7 @@ class BaseAppender : public AppenderSkeleton void close() override {} - void append( LOG4CXX_APPEND_FORMAL_PARAMETERS ) override + void append( const spi::LoggingEventPtr& event ) override { helpers::LogLog::debug(LOG4CXX_STR("BaseAppender::append")); } @@ -77,10 +77,10 @@ class BaseAppender : public AppenderSkeleton } using AppenderSkeleton::activateOptions; - void activateOptions( LOG4CXX_ACTIVATE_OPTIONS_FORMAL_PARAMETERS ) override + void activateOptions( ) override { helpers::LogLog::debug(LOG4CXX_STR("BaseAppender::activateOptions")); - AppenderSkeleton::activateOptions( LOG4CXX_ACTIVATE_OPTIONS_PARAMETER ); + AppenderSkeleton::activateOptions( ); m_activated = true; } diff --git a/src/test/cpp/pattern/num343patternconverter.cpp b/src/test/cpp/pattern/num343patternconverter.cpp index ad61ba096..517394f58 100644 --- a/src/test/cpp/pattern/num343patternconverter.cpp +++ b/src/test/cpp/pattern/num343patternconverter.cpp @@ -37,7 +37,7 @@ PatternConverterPtr Num343PatternConverter::newInstance( } -void Num343PatternConverter::format( LOG4CXX_FORMAT_EVENT_FORMAL_PARAMETERS ) const +void Num343PatternConverter::format( const spi::LoggingEventPtr& event, LogString& toAppendTo ) const { toAppendTo.append(LOG4CXX_STR("343")); } diff --git a/src/test/cpp/pattern/num343patternconverter.h b/src/test/cpp/pattern/num343patternconverter.h index f4821b04e..479579ceb 100644 --- a/src/test/cpp/pattern/num343patternconverter.h +++ b/src/test/cpp/pattern/num343patternconverter.h @@ -34,7 +34,7 @@ class Num343PatternConverter : public LoggingEventPatternConverter protected: using LoggingEventPatternConverter::format; - void format( LOG4CXX_FORMAT_EVENT_FORMAL_PARAMETERS ) const override; + void format( const spi::LoggingEventPtr& event, LogString& toAppendTo ) const override; }; } } diff --git a/src/test/cpp/vectorappender.cpp b/src/test/cpp/vectorappender.cpp index 6e8f95f5b..ef228c162 100644 --- a/src/test/cpp/vectorappender.cpp +++ b/src/test/cpp/vectorappender.cpp @@ -24,7 +24,7 @@ using namespace log4cxx::helpers; IMPLEMENT_LOG4CXX_OBJECT(VectorAppender) -void VectorAppender::append( LOG4CXX_APPEND_FORMAL_PARAMETERS ) +void VectorAppender::append( const spi::LoggingEventPtr& event ) { if (0 < this->appendMillisecondDelay) std::this_thread::sleep_for( std::chrono::milliseconds( this->appendMillisecondDelay ) ); diff --git a/src/test/cpp/vectorappender.h b/src/test/cpp/vectorappender.h index 272907c81..ecfa0b987 100644 --- a/src/test/cpp/vectorappender.h +++ b/src/test/cpp/vectorappender.h @@ -42,7 +42,7 @@ class VectorAppender : public AppenderSkeleton This method is called by the AppenderSkeleton#doAppend method. */ - void append( LOG4CXX_APPEND_FORMAL_PARAMETERS ) override; + void append( const spi::LoggingEventPtr& event ) override; const std::vector& getVector() const { From a2e502e57a9c43cd804276f6d528413c9bba2cc3 Mon Sep 17 00:00:00 2001 From: Stephen Webb Date: Sat, 19 Sep 2026 11:17:03 +1000 Subject: [PATCH 3/4] Remove CMake code supporting ABI 15 --- src/main/cpp/CMakeLists.txt | 10 +-------- src/main/cpp/threadlocal.cpp | 16 -------------- .../include/log4cxx/helpers/threadlocal.h | 21 ------------------- src/test/cpp/net/CMakeLists.txt | 9 ++++---- 4 files changed, 5 insertions(+), 51 deletions(-) delete mode 100644 src/main/cpp/threadlocal.cpp delete mode 100644 src/main/include/log4cxx/helpers/threadlocal.h diff --git a/src/main/cpp/CMakeLists.txt b/src/main/cpp/CMakeLists.txt index 44e2b4ba6..063b5aa94 100644 --- a/src/main/cpp/CMakeLists.txt +++ b/src/main/cpp/CMakeLists.txt @@ -17,9 +17,7 @@ # Build the log4cxx library add_library(log4cxx) -if(${log4cxx_ABI_VER} GREATER 15) - set_target_properties(log4cxx PROPERTIES CXX_VISIBILITY_PRESET hidden) -endif() +set_target_properties(log4cxx PROPERTIES CXX_VISIBILITY_PRESET hidden) set(PRIVATE_COMPILE_DEFINITIONS) set(PUBLIC_COMPILE_DEFINITIONS) if(BUILD_SHARED_LIBS) @@ -228,12 +226,6 @@ target_sources(log4cxx zipcompressaction.cpp ${extra_classes} ) -if(${log4cxx_ABI_VER} LESS 16) - target_sources(log4cxx - PRIVATE - threadlocal.cpp - ) -endif() if(LOG4CXX_EVENTS_AT_EXIT) target_sources(log4cxx PRIVATE atexitregistry.cpp diff --git a/src/main/cpp/threadlocal.cpp b/src/main/cpp/threadlocal.cpp deleted file mode 100644 index ae6f28c4a..000000000 --- a/src/main/cpp/threadlocal.cpp +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ diff --git a/src/main/include/log4cxx/helpers/threadlocal.h b/src/main/include/log4cxx/helpers/threadlocal.h deleted file mode 100644 index 576d401d2..000000000 --- a/src/main/include/log4cxx/helpers/threadlocal.h +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef _LOG4CXX_HELPERS_THREAD_LOCAL_H -#define _LOG4CXX_HELPERS_THREAD_LOCAL_H - -#endif //_LOG4CXX_HELPERS_THREAD_LOCAL_H diff --git a/src/test/cpp/net/CMakeLists.txt b/src/test/cpp/net/CMakeLists.txt index 9c9e87c97..4a9bf8a95 100644 --- a/src/test/cpp/net/CMakeLists.txt +++ b/src/test/cpp/net/CMakeLists.txt @@ -35,12 +35,11 @@ if(HAS_LIBESMTP) list(APPEND NET_TESTS smtpappendertestcase) endif(HAS_LIBESMTP) -if(${log4cxx_ABI_VER} GREATER 15) -set(OTHER_SOCKET_IMPL bsdsocket.cpp) -endif() - foreach(fileName IN LISTS NET_TESTS) - add_executable(${fileName} "${fileName}.cpp" ${OTHER_SOCKET_IMPL}) + add_executable(${fileName} "${fileName}.cpp") + if(${fileName} STREQUAL socketappendertestcase) + target_sources(socketappendertestcase PRIVATE bsdsocket.cpp) + endif() endforeach() set(ALL_LOG4CXX_TESTS ${ALL_LOG4CXX_TESTS} ${NET_TESTS} PARENT_SCOPE) From 4ac7fdcebc108a775a5590f55600e8399b561461 Mon Sep 17 00:00:00 2001 From: Stephen Webb Date: Sat, 19 Sep 2026 12:43:05 +1000 Subject: [PATCH 4/4] Remove support for find_package(log4cxx-qt) --- CMakeLists.txt | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cf4fe7045..4cd0e77e7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -238,21 +238,6 @@ if(LOG4CXX_QT_SUPPORT) FILE ${LOG4CXX_LIB_NAME}-qtTargets.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${LOG4CXX_LIB_NAME} ) - if(${log4cxx_VERSION_MAJOR} EQUAL 1 AND NOT DEFINED VCPKG_TARGET_TRIPLET) - # Support for find_package(log4cxx-qt) in consuming CMake projects - install(EXPORT ${LOG4CXX_LIB_NAME}-qtTargets - FILE ${LOG4CXX_LIB_NAME}-qtConfig.cmake - DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${LOG4CXX_LIB_NAME}-qt - ) - # Support for find_package(log4cxx-qt 1.6) in consuming CMake projects - write_basic_package_version_file("${CMAKE_CURRENT_BINARY_DIR}/${LOG4CXX_LIB_NAME}-qtConfigVersion.cmake" - VERSION ${PROJECT_VERSION} - COMPATIBILITY SameMinorVersion - ) - install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${LOG4CXX_LIB_NAME}-qtConfigVersion.cmake" - DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${LOG4CXX_LIB_NAME}-qt - ) - endif(${log4cxx_VERSION_MAJOR} EQUAL 1 AND NOT DEFINED VCPKG_TARGET_TRIPLET) endif(LOG4CXX_QT_SUPPORT) #