Skip to content

Commit 4232df4

Browse files
committed
Remove class DefaultLoggerFactory in the next ABI
1 parent 9c3366a commit 4232df4

File tree

4 files changed

+23
-6
lines changed

4 files changed

+23
-6
lines changed

src/main/cpp/domconfigurator.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@
3030
#include <log4cxx/config/propertysetter.h>
3131
#include <log4cxx/spi/errorhandler.h>
3232
#include <log4cxx/spi/loggerfactory.h>
33+
#if LOG4CXX_ABI_VERSION <= 15
3334
#include <log4cxx/defaultloggerfactory.h>
35+
#else
36+
#include <log4cxx/loggerfactory.h>
37+
#endif
3438
#include <log4cxx/helpers/filewatchdog.h>
3539
#include <log4cxx/spi/loggerrepository.h>
3640
#include <log4cxx/spi/loggingevent.h>
@@ -819,7 +823,11 @@ spi::ConfigurationStatus DOMConfigurator::doConfigure(const File& filename, spi:
819823
LogLog::debug(msg);
820824
}
821825

826+
#if LOG4CXX_ABI_VERSION <= 15
822827
m_priv->loggerFactory = std::make_shared<DefaultLoggerFactory>();
828+
#else
829+
m_priv->loggerFactory = std::make_shared<LoggerFactory>();
830+
#endif
823831

824832
Pool p;
825833
apr_file_t* fd;

src/main/cpp/propertyconfigurator.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,12 @@ PropertyWatchdog* PropertyConfigurator::pdog = NULL;
7575
IMPLEMENT_LOG4CXX_OBJECT(PropertyConfigurator)
7676

7777
PropertyConfigurator::PropertyConfigurator()
78-
: registry(new std::map<LogString, AppenderPtr>()), loggerFactory(new DefaultLoggerFactory())
78+
: registry(new std::map<LogString, AppenderPtr>())
79+
#if LOG4CXX_ABI_VERSION <= 15
80+
, loggerFactory(new DefaultLoggerFactory())
81+
#else
82+
, loggerFactory(new LoggerFactory())
83+
#endif
7984
{
8085
}
8186

src/main/include/log4cxx/logmanager.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ class LOG4CXX_EXPORT LogManager
8080
/**
8181
Retrieve the \c name Logger instance from the
8282
{@link spi::LoggerRepository LoggerRepository}
83-
using DefaultLoggerFactory to create it if required.
83+
using LoggerFactory to create it if required.
8484
8585
Calls {@link spi::LoggerRepository::ensureIsConfigured ensureIsConfigured} passing {@link DefaultConfigurator::configure} to ensure
8686
the repository is configured.
@@ -105,7 +105,7 @@ class LOG4CXX_EXPORT LogManager
105105
/**
106106
Retrieve the \c name Logger instance from the
107107
{@link spi::LoggerRepository LoggerRepository}
108-
using DefaultLoggerFactory to create it if required.
108+
using LoggerFactory to create it if required.
109109
110110
Calls {@link spi::LoggerRepository::ensureIsConfigured ensureIsConfigured} passing {@link DefaultConfigurator::configure} to ensure
111111
the repository is configured.
@@ -130,7 +130,7 @@ class LOG4CXX_EXPORT LogManager
130130
/**
131131
Retrieve the \c name Logger instance from the
132132
{@link spi::LoggerRepository LoggerRepository}
133-
using DefaultLoggerFactory to create it if required.
133+
using LoggerFactory to create it if required.
134134
135135
Calls {@link spi::LoggerRepository::ensureIsConfigured ensureIsConfigured}
136136
passing {@link DefaultConfigurator::configure} to ensure
@@ -157,7 +157,7 @@ class LOG4CXX_EXPORT LogManager
157157
/**
158158
Retrieve the \c name Logger instance from the
159159
{@link spi::LoggerRepository LoggerRepository}
160-
using DefaultLoggerFactory to create it if required.
160+
using LoggerFactory to create it if required.
161161
162162
Calls {@link spi::LoggerRepository::ensureIsConfigured ensureIsConfigured}
163163
passing {@link DefaultConfigurator::configure} to ensure
@@ -185,7 +185,7 @@ class LOG4CXX_EXPORT LogManager
185185
/**
186186
Retrieve the \c name Logger instance from the
187187
{@link spi::LoggerRepository LoggerRepository}
188-
using DefaultLoggerFactory to create it if required.
188+
using LoggerFactory to create it if required.
189189
190190
Calls {@link spi::LoggerRepository::ensureIsConfigured ensureIsConfigured}
191191
passing {@link DefaultConfigurator::configure} to ensure

src/test/cpp/customlogger/xlogger.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,11 @@ class XFactory :
4444

4545
XFactory();
4646

47+
#if LOG4CXX_ABI_VERSION <= 15
48+
LoggerPtr makeNewLoggerInstance(const LogString& name) const;
49+
#else
4750
LoggerPtr makeNewLoggerInstance(const LogString& name) const override;
51+
#endif
4852

4953
#if LOG4CXX_ABI_VERSION <= 15
5054
LoggerPtr makeNewLoggerInstance(

0 commit comments

Comments
 (0)