18#ifndef _LOG4CXX_HIERARCHY_H
19#define _LOG4CXX_HIERARCHY_H
58 LOG4CXX_DECLARE_PRIVATE_MEMBER_PTR(HierarchyPrivate, m_priv)
229 void setThresholdInternal(
const LevelPtr& l);
234 void shutdownInternal();
Implement this interface for your own strategies for outputting log statements.
Definition: appender.h:51
This class is specialized in retrieving loggers by name and also maintaining the logger hierarchy.
Definition: hierarchy.h:56
void ensureIsConfigured(std::function< void()> configurator) override
Call configurator if not yet configured.
LoggerList getCurrentLoggers() const override
Returns all the currently defined loggers in this hierarchy as a LoggerList.
void emitNoAppenderWarning(const Logger *logger) override
LoggerPtr getRootLogger() const override
Get the root of this hierarchy.
void resetConfiguration() override
Reset all values contained in this hierarchy instance to their default.
LevelPtr getThreshold() const override
Returns a Level representation of the enable state.
LoggerPtr exists(const LogString &name) override
Check if the named logger exists in the hierarchy.
LoggerPtr getLogger(const LogString &name) override
Retrieve the name Logger instance using the default factory to create it if required.
void addAppender(AppenderPtr appender)
virtual void setConfigured(bool configured) override
void fireAddAppenderEvent(const Logger *logger, const Appender *appender) override
void setThreshold(const LevelPtr &l) override
Enable logging for logging requests with level l or higher.
static HierarchyPtr create()
bool isDisabled(int level) const override
This method will return true if this repository is disabled for level object passed as parameter and ...
void updateChildren(const Logger *parent)
Refresh the threshold in children of parent.
virtual bool isConfigured() override
void addHierarchyEventListener(const spi::HierarchyEventListenerPtr &listener) override
void clear()
This call will clear all logger definitions from the internal hashtable.
void setThreshold(const LogString &levelStr) override
The string form of setThreshold.
LoggerPtr getLogger(const LogString &name, const spi::LoggerFactoryPtr &factory) override
Retrieve the name Logger instance using factory to create it if required.
void fireRemoveAppenderEvent(const Logger *logger, const Appender *appender) override
void shutdown() override
Used by subclasses to add a renderer to the hierarchy passed as parameter.
This is the central class in the log4cxx package.
Definition: logger.h:51
A LoggerRepository is used to create and retrieve Loggers.
Definition: loggerrepository.h:43
std::shared_ptr< LoggerFactory > LoggerFactoryPtr
Definition: logmanager.h:34
Definition: configuration.h:25
std::vector< LoggerPtr > ProvisionNode
Definition: provisionnode.h:31
std::basic_string< logchar > LogString
Definition: logstring.h:60
std::shared_ptr< Level > LevelPtr
Definition: optionconverter.h:28
LOG4CXX_PTR_DEF(Appender)
std::shared_ptr< Appender > AppenderPtr
Definition: basicconfigurator.h:29
std::shared_ptr< Logger > LoggerPtr
Definition: defaultloggerfactory.h:27
std::vector< LoggerPtr > LoggerList
Definition: logmanager.h:29
#define LOG4CXX_CAST_ENTRY(Interface)
Definition: object.h:157
#define DECLARE_ABSTRACT_LOG4CXX_OBJECT(object)
Definition: object.h:38
#define END_LOG4CXX_CAST_MAP()
Definition: object.h:151
#define BEGIN_LOG4CXX_CAST_MAP()
Definition: object.h:145