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