Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/main/cpp/logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -327,10 +327,17 @@ 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
{
Expand Down
9 changes: 9 additions & 0 deletions src/main/include/log4cxx/logger.h
Original file line number Diff line number Diff line change
Expand Up @@ -843,11 +843,13 @@ class LOG4CXX_EXPORT Logger
*/
virtual const LevelPtr& getEffectiveLevel() const;

#if LOG4CXX_ABI_VERSION <= 15
/**
Return the the LoggerRepository where this
<code>Logger</code> is attached.
*/
spi::LoggerRepository* getLoggerRepository() const;
#endif

/**
* Get the logger name.
Expand Down Expand Up @@ -898,6 +900,13 @@ 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.
* @param name logger name.
Expand Down
Loading