24 #ifndef LOG4CPLUS_HIERARCHY_HEADER_
25 #define LOG4CPLUS_HIERARCHY_HEADER_
29 #if defined (LOG4CPLUS_HAVE_PRAGMA_ONCE)
42 class HierarchyLocker;
239 typedef std::vector<Logger> ProvisionNode;
240 typedef std::map<log4cplus::tstring, ProvisionNode> ProvisionNodeMap;
241 typedef std::map<log4cplus::tstring, Logger> LoggerMap;
257 void initializeLoggerList(
LoggerList& list)
const;
300 std::unique_ptr<spi::LoggerFactory> defaultFactory;
301 ProvisionNodeMap provisionNodes;
302 LoggerMap loggerPtrs;
307 bool emittedNoAppenderWarning;
This is used to lock a Hierarchy.
This class is specialized in retrieving loggers by name and also maintaining the logger hierarchy.
virtual LoggerList getCurrentLoggers()
Returns all the currently defined loggers in this hierarchy.
virtual void clear()
This call will clear all logger definitions from the internal hashtable.
virtual Logger getInstance(const log4cplus::tstring &name, spi::LoggerFactory &factory)
Return a new logger instance named as the first parameter using factory.
virtual void setLoggerFactory(std::unique_ptr< spi::LoggerFactory > factory)
Set the default LoggerFactory instance.
virtual void disableDebug()
Disable all Debug logging requests regardless of logger.
virtual void disableInfo()
Disable all Info logging requests regardless of logger.
virtual void shutdown()
Shutting down a hierarchy will safely close and remove all appenders in all loggers including the roo...
virtual void disable(LogLevel ll)
Disable all logging requests of LogLevel equal to or below the ll parameter p, for all loggers in thi...
virtual Logger getRoot() const
Get the root of this hierarchy.
virtual void resetConfiguration()
Reset all values contained in this hierarchy instance to their default.
static const LogLevel DISABLE_OFF
virtual spi::LoggerFactory * getLoggerFactory()
Returns the default LoggerFactory instance.
virtual void enableAll()
Undoes the effect of calling any of disable, {}, #disableDebug} and #disableInfo} methods.
virtual bool isDisabled(LogLevel level)
Is the LogLevel specified by level enabled?
virtual void disableAll()
Disable all logging requests regardless of logger and LogLevel.
virtual void disable(const log4cplus::tstring &loglevelStr)
Similar to disable(LogLevel) except that the LogLevel argument is given as a log4cplus::tstring.
Hierarchy()
Create a new Logger hierarchy.
virtual Logger getInstance(const log4cplus::tstring &name)
Return a new logger instance named as the first parameter using the default factory.
static const LogLevel DISABLE_OVERRIDE
virtual bool exists(const log4cplus::tstring &name)
Returns true if the named logger exists (in the default hierarchy).
This is the central class in the log4cplus package.
Implement this interface to create new instances of Logger or a sub-class of Logger.
This is the central class in the log4cplus package.
#define LOG4CPLUS_PRIVATE
This header defines the Logger class and the logging macros.
std::basic_string< tchar > tstring
std::vector< Logger > LoggerList
This is a list of Loggers.
int LogLevel
Defines the minimum set of priorities recognized by the system, that is FATAL_LOG_LEVEL,...
LOG4CPLUS_EXPORT Hierarchy & getDefaultHierarchy()