#include <Category.hh>
Inheritance diagram for log4cpp::Category:

Public Methods | |
| virtual | ~Category () |
| Destructor for Category. | |
| virtual const std::string & | getName () const throw () |
| Return the category name. | |
| virtual void | setPriority (Priority::Value priority) |
| Set the priority of this Category. | |
| virtual Priority::Value | getPriority () const throw () |
| Returns the assigned Priority, if any, for this Category. | |
| virtual Priority::Value | getChainedPriority () const throw () |
| Starting from this Category, search the category hierarchy for a set priority and return it. | |
| virtual bool | isPriorityEnabled (Priority::Value priority) const throw () |
| Returns true if the chained priority of the Category is equal to or higher than given priority. | |
| virtual void | addAppender (Appender *appender) |
| Adds an Appender to this Category. | |
| virtual void | addAppender (Appender &appender) |
| Adds an Appender for this Category. | |
| void | setAppender (Appender *appender) |
| Adds an Appender to this Category. | |
| void | setAppender (Appender &appender) |
| Adds an Appender for this Category. | |
| virtual Appender * | getAppender () const |
| Returns the first Appender for this Category, or NULL if no Appender has been set. | |
| virtual Appender * | getAppender (const std::string &name) const |
| Returns the specified Appender for this Category, or NULL if the Appender is not attached to this Category. | |
| virtual void | removeAllAppenders () |
| Removes all appenders for this Category. | |
| virtual void | removeAppender (Appender *appender) |
| Removes specified appender for this Category. | |
| bool | ownsAppender () const throw () |
| Returns true if the Category owns the first Appender in its Appender set. | |
| virtual bool | ownsAppender (Appender *appender) const throw () |
| Returns true if the Category owns the Appender. | |
| virtual void | callAppenders (const LoggingEvent &event) throw () |
Call the appenders in the hierarchy starting at this. | |
| virtual void | setAdditivity (bool additivity) |
| Set the additivity flag for this Category instance. | |
| virtual bool | getAdditivity () const throw () |
| Returns the additivity flag for this Category instance. | |
| virtual Category * | getParent () throw () |
| Returns the parent category of this category, or NULL if the category is the root category. | |
| virtual const Category * | getParent () const throw () |
| Returns the parent category of this category, or NULL if the category is the root category. | |
| virtual void | log (Priority::Value priority, const char *stringFormat,...) throw () |
| Log a message with the specified priority. | |
| virtual void | log (Priority::Value priority, const std::string &message) throw () |
| Log a message with the specified priority. | |
| virtual void | logva (Priority::Value priority, const char *stringFormat, va_list va) throw () |
| Log a message with the specified priority. | |
| void | debug (const char *stringFormat,...) throw () |
| Log a message with debug priority. | |
| void | debug (const std::string &message) throw () |
| Log a message with debug priority. | |
| bool | isDebugEnabled () const throw () |
| Return true if the Category will log messages with priority DEBUG. | |
| CategoryStream | debugStream () |
| Return a CategoryStream with priority DEBUG. | |
| void | info (const char *stringFormat,...) throw () |
| Log a message with info priority. | |
| void | info (const std::string &message) throw () |
| Log a message with info priority. | |
| bool | isInfoEnabled () const throw () |
| Return true if the Category will log messages with priority INFO. | |
| CategoryStream | infoStream () |
| Return a CategoryStream with priority INFO. | |
| void | notice (const char *stringFormat,...) throw () |
| Log a message with notice priority. | |
| void | notice (const std::string &message) throw () |
| Log a message with notice priority. | |
| bool | isNoticeEnabled () const throw () |
| Return true if the Category will log messages with priority NOTICE. | |
| CategoryStream | noticeStream () |
| Return a CategoryStream with priority NOTICE. | |
| void | warn (const char *stringFormat,...) throw () |
| Log a message with warn priority. | |
| void | warn (const std::string &message) throw () |
| Log a message with warn priority. | |
| bool | isWarnEnabled () const throw () |
| Return true if the Category will log messages with priority WARN. | |
| CategoryStream | warnStream () |
| Return a CategoryStream with priority WARN. | |
| void | error (const char *stringFormat,...) throw () |
| Log a message with error priority. | |
| void | error (const std::string &message) throw () |
| Log a message with error priority. | |
| bool | isErrorEnabled () const throw () |
| Return true if the Category will log messages with priority ERROR. | |
| CategoryStream | errorStream () |
| Return a CategoryStream with priority ERROR. | |
| void | crit (const char *stringFormat,...) throw () |
| Log a message with crit priority. | |
| void | crit (const std::string &message) throw () |
| Log a message with crit priority. | |
| bool | isCritEnabled () const throw () |
| Return true if the Category will log messages with priority CRIT. | |
| CategoryStream | critStream () |
| Return a CategoryStream with priority CRIT. | |
| void | alert (const char *stringFormat,...) throw () |
| Log a message with alert priority. | |
| void | alert (const std::string &message) throw () |
| Log a message with alert priority. | |
| bool | isAlertEnabled () const throw () |
| Return true if the Category will log messages with priority ALERT. | |
| CategoryStream | alertStream () throw () |
| Return a CategoryStream with priority ALERT. | |
| void | emerg (const char *stringFormat,...) throw () |
| Log a message with emerg priority. | |
| void | emerg (const std::string &message) throw () |
| Log a message with emerg priority. | |
| bool | isEmergEnabled () const throw () |
| Return true if the Category will log messages with priority EMERG. | |
| CategoryStream | emergStream () |
| Return a CategoryStream with priority EMERG. | |
| void | fatal (const char *stringFormat,...) throw () |
| Log a message with fatal priority. | |
| void | fatal (const std::string &message) throw () |
| Log a message with fatal priority. | |
| bool | isFatalEnabled () const throw () |
| Return true if the Category will log messages with priority FATAL. | |
| CategoryStream | fatalStream () |
| Return a CategoryStream with priority FATAL. | |
| virtual CategoryStream | getStream (Priority::Value priority) |
| Return a CategoryStream with given Priority. | |
| virtual CategoryStream | operator<< (Priority::Value priority) |
| Return a CategoryStream with given Priority. | |
Static Public Methods | |
| Category & | getRoot () |
| Return the root of the Category hierarchy. | |
| void | setRootPriority (Priority::Value priority) |
| Set the priority of the root Category. | |
| Priority::Value | getRootPriority () throw () |
Get the priority of the root Category. | |
| Category & | getInstance (const std::string &name) |
Instantiate a Category with name name. | |
| Category * | exists (const std::string &name) |
| If the named category exists (in the default hierarchy) then it returns a reference to the category, otherwise it returns NULL. | |
| std::set< Category * > * | getCurrentCategories () |
| Returns all the currently defined categories as a set of Category pointers. | |
| void | shutdown () |
| This method will remove all Appenders from Categories.XXX. | |
Protected Methods | |
| Category (const std::string &name, Category *parent, Priority::Value priority=Priority::NOTSET) | |
| Constructor. | |
| virtual void | _logUnconditionally (Priority::Value priority, const char *format, va_list arguments) throw () |
| virtual void | _logUnconditionally2 (Priority::Value priority, const std::string &message) throw () |
| Unconditionally log a message with the specified priority. | |
Friends | |
| class | HierarchyMaintainer |
One of the distintive features of log4j (and hence log4cpp) are hierarchal categories and their evaluation.
|
|
Destructor for Category.
|
|
||||||||||||||||
|
Constructor.
|
|
||||||||||||||||
|
|
|
||||||||||||
|
Unconditionally log a message with the specified priority.
Reimplemented in log4cpp::FixedContextCategory. |
|
|
Adds an Appender for this Category. This method does not pass ownership from the caller to the Category.
Reimplemented in log4cpp::FixedContextCategory. |
|
|
Adds an Appender to this Category. This method passes ownership from the caller to the Category.
Reimplemented in log4cpp::FixedContextCategory. |
|
|
Log a message with alert priority.
|
|
||||||||||||
|
Log a message with alert priority.
|
|
|
Return a CategoryStream with priority ALERT.
|
|
|
Call the appenders in the hierarchy starting at If no appenders could be found, emit a warning.
This method always calls all the appenders inherited form the hierracy circumventing any evaluation of whether to log or not to log the particular log request.
Reimplemented in log4cpp::FixedContextCategory. |
|
|
Log a message with crit priority.
|
|
||||||||||||
|
Log a message with crit priority.
|
|
|
Return a CategoryStream with priority CRIT.
|
|
|
Log a message with debug priority.
|
|
||||||||||||
|
Log a message with debug priority.
|
|
|
Return a CategoryStream with priority DEBUG.
|
|
|
Log a message with emerg priority.
|
|
||||||||||||
|
Log a message with emerg priority.
|
|
|
Return a CategoryStream with priority EMERG.
|
|
|
Log a message with error priority.
|
|
||||||||||||
|
Log a message with error priority.
|
|
|
Return a CategoryStream with priority ERROR.
|
|
|
If the named category exists (in the default hierarchy) then it returns a reference to the category, otherwise it returns NULL.
|
|
|
Log a message with fatal priority. NB. priority 'fatal' is equivalent to 'emerg'.
|
|
||||||||||||
|
Log a message with fatal priority. NB. priority 'fatal' is equivalent to 'emerg'.
|
|
|
Return a CategoryStream with priority FATAL. NB. priority 'fatal' is equivalent to 'emerg'.
|
|
|
Returns the additivity flag for this Category instance.
Reimplemented in log4cpp::FixedContextCategory. |
|
|
Returns the specified Appender for this Category, or NULL if the Appender is not attached to this Category.
Reimplemented in log4cpp::FixedContextCategory. |
|
|
Returns the first Appender for this Category, or NULL if no Appender has been set.
Reimplemented in log4cpp::FixedContextCategory. |
|
|
Starting from this Category, search the category hierarchy for a set priority and return it. Otherwise, return the priority of the root category.
The Category class is designed so that this method executes as quickly as possible. Reimplemented in log4cpp::FixedContextCategory. |
|
|
Returns all the currently defined categories as a set of Category pointers. Note: this function does not pass ownership of the categories in the set to the caller, only the ownership of the set. However set<Category&>* is not legal C++, so we can't follow the default ownership conventions.
Unlike in log4j, the root category is included in the returned set. |
|
|
Instantiate a Category with name
This method does not set priority of the category which is by default
|
|
|
Return the category name.
|
|
|
Returns the parent category of this category, or NULL if the category is the root category.
|
|
|
Returns the parent category of this category, or NULL if the category is the root category.
|
|
|
Returns the assigned Priority, if any, for this Category.
Reimplemented in log4cpp::FixedContextCategory. |
|
|
Return the root of the Category hierarchy.
The root category is always instantiated and available. It's name is the empty string.
Unlike in log4j, calling
|
|
|
Get the priority of the
|
|
|
Return a CategoryStream with given Priority.
|
|
|
Log a message with info priority.
|
|
||||||||||||
|
Log a message with info priority.
|
|
|
Return a CategoryStream with priority INFO.
|
|
|
Return true if the Category will log messages with priority ALERT.
|
|
|
Return true if the Category will log messages with priority CRIT.
|
|
|
Return true if the Category will log messages with priority DEBUG.
|
|
|
Return true if the Category will log messages with priority EMERG.
|
|
|
Return true if the Category will log messages with priority ERROR.
|
|
|
Return true if the Category will log messages with priority FATAL. NB. priority 'fatal' is equivalent to 'emerg'.
|
|
|
Return true if the Category will log messages with priority INFO.
|
|
|
Return true if the Category will log messages with priority NOTICE.
|
|
|
Returns true if the chained priority of the Category is equal to or higher than given priority.
|
|
|
Return true if the Category will log messages with priority WARN.
|
|
||||||||||||
|
Log a message with the specified priority.
|
|
||||||||||||||||
|
Log a message with the specified priority.
|
|
||||||||||||||||
|
Log a message with the specified priority.
|
|
|
Log a message with notice priority.
|
|
||||||||||||
|
Log a message with notice priority.
|
|
|
Return a CategoryStream with priority NOTICE.
|
|
|
Return a CategoryStream with given Priority.
|
|
|
Returns true if the Category owns the Appender. In that case the Category destructor will delete the Appender.
Reimplemented in log4cpp::FixedContextCategory. |
|
|
Returns true if the Category owns the first Appender in its Appender set. In that case the Category destructor will delete the Appender.
Reimplemented in log4cpp::FixedContextCategory. |
|
|
Removes all appenders for this Category.
Reimplemented in log4cpp::FixedContextCategory. |
|
|
Removes specified appender for this Category.
|
|
|
Set the additivity flag for this Category instance.
Reimplemented in log4cpp::FixedContextCategory. |
|
|
Adds an Appender for this Category. This method does not pass ownership from the caller to the Category.
|
|
|
Adds an Appender to this Category. This method passes ownership from the caller to the Category.
|
|
|
Set the priority of this Category.
|
|
|
Set the priority of the root Category.
|
|
|
This method will remove all Appenders from Categories.XXX.
|
|
|
Log a message with warn priority.
|
|
||||||||||||
|
Log a message with warn priority.
|
|
|
Return a CategoryStream with priority WARN.
|
|
|
|
1.2.18