Skip to content

Commit

Permalink
Remove class DefaultLoggerFactory in the next ABI
Browse files Browse the repository at this point in the history
  • Loading branch information
stephen-webb committed Jul 14, 2024
1 parent 9c3366a commit 4232df4
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 6 deletions.
8 changes: 8 additions & 0 deletions src/main/cpp/domconfigurator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@
#include <log4cxx/config/propertysetter.h>
#include <log4cxx/spi/errorhandler.h>
#include <log4cxx/spi/loggerfactory.h>
#if LOG4CXX_ABI_VERSION <= 15
#include <log4cxx/defaultloggerfactory.h>
#else
#include <log4cxx/loggerfactory.h>
#endif
#include <log4cxx/helpers/filewatchdog.h>
#include <log4cxx/spi/loggerrepository.h>
#include <log4cxx/spi/loggingevent.h>
Expand Down Expand Up @@ -819,7 +823,11 @@ spi::ConfigurationStatus DOMConfigurator::doConfigure(const File& filename, spi:
LogLog::debug(msg);
}

#if LOG4CXX_ABI_VERSION <= 15
m_priv->loggerFactory = std::make_shared<DefaultLoggerFactory>();
#else
m_priv->loggerFactory = std::make_shared<LoggerFactory>();
#endif

Pool p;
apr_file_t* fd;
Expand Down
7 changes: 6 additions & 1 deletion src/main/cpp/propertyconfigurator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,12 @@ PropertyWatchdog* PropertyConfigurator::pdog = NULL;
IMPLEMENT_LOG4CXX_OBJECT(PropertyConfigurator)

PropertyConfigurator::PropertyConfigurator()
: registry(new std::map<LogString, AppenderPtr>()), loggerFactory(new DefaultLoggerFactory())
: registry(new std::map<LogString, AppenderPtr>())
#if LOG4CXX_ABI_VERSION <= 15
, loggerFactory(new DefaultLoggerFactory())
#else
, loggerFactory(new LoggerFactory())
#endif
{
}

Expand Down
10 changes: 5 additions & 5 deletions src/main/include/log4cxx/logmanager.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class LOG4CXX_EXPORT LogManager
/**
Retrieve the \c name Logger instance from the
{@link spi::LoggerRepository LoggerRepository}
using DefaultLoggerFactory to create it if required.
using LoggerFactory to create it if required.
Calls {@link spi::LoggerRepository::ensureIsConfigured ensureIsConfigured} passing {@link DefaultConfigurator::configure} to ensure
the repository is configured.
Expand All @@ -105,7 +105,7 @@ class LOG4CXX_EXPORT LogManager
/**
Retrieve the \c name Logger instance from the
{@link spi::LoggerRepository LoggerRepository}
using DefaultLoggerFactory to create it if required.
using LoggerFactory to create it if required.
Calls {@link spi::LoggerRepository::ensureIsConfigured ensureIsConfigured} passing {@link DefaultConfigurator::configure} to ensure
the repository is configured.
Expand All @@ -130,7 +130,7 @@ class LOG4CXX_EXPORT LogManager
/**
Retrieve the \c name Logger instance from the
{@link spi::LoggerRepository LoggerRepository}
using DefaultLoggerFactory to create it if required.
using LoggerFactory to create it if required.
Calls {@link spi::LoggerRepository::ensureIsConfigured ensureIsConfigured}
passing {@link DefaultConfigurator::configure} to ensure
Expand All @@ -157,7 +157,7 @@ class LOG4CXX_EXPORT LogManager
/**
Retrieve the \c name Logger instance from the
{@link spi::LoggerRepository LoggerRepository}
using DefaultLoggerFactory to create it if required.
using LoggerFactory to create it if required.
Calls {@link spi::LoggerRepository::ensureIsConfigured ensureIsConfigured}
passing {@link DefaultConfigurator::configure} to ensure
Expand Down Expand Up @@ -185,7 +185,7 @@ class LOG4CXX_EXPORT LogManager
/**
Retrieve the \c name Logger instance from the
{@link spi::LoggerRepository LoggerRepository}
using DefaultLoggerFactory to create it if required.
using LoggerFactory to create it if required.
Calls {@link spi::LoggerRepository::ensureIsConfigured ensureIsConfigured}
passing {@link DefaultConfigurator::configure} to ensure
Expand Down
4 changes: 4 additions & 0 deletions src/test/cpp/customlogger/xlogger.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@ class XFactory :

XFactory();

#if LOG4CXX_ABI_VERSION <= 15
LoggerPtr makeNewLoggerInstance(const LogString& name) const;
#else
LoggerPtr makeNewLoggerInstance(const LogString& name) const override;
#endif

#if LOG4CXX_ABI_VERSION <= 15
LoggerPtr makeNewLoggerInstance(
Expand Down

0 comments on commit 4232df4

Please sign in to comment.