#include <Category.hh>
Public Member Functions | |
virtual void | addAppender (Appender &appender) |
virtual void | addAppender (Appender *appender) throw (std::invalid_argument) |
virtual void | addAppender (Appender &appender) |
virtual void | addAppender (Appender *appender) throw (std::invalid_argument) |
void | alert (const std::string &message) throw () |
void | alert (const char *stringFormat,...) throw () |
void | alert (const std::string &message) throw () |
void | alert (const char *stringFormat,...) throw () |
CategoryStream | alertStream () throw () |
CategoryStream | alertStream () throw () |
virtual void | callAppenders (const LoggingEvent &event) throw () |
virtual void | callAppenders (const LoggingEvent &event) throw () |
void | crit (const std::string &message) throw () |
void | crit (const char *stringFormat,...) throw () |
void | crit (const std::string &message) throw () |
void | crit (const char *stringFormat,...) throw () |
CategoryStream | critStream () |
CategoryStream | critStream () |
void | debug (const std::string &message) throw () |
void | debug (const char *stringFormat,...) throw () |
void | debug (const std::string &message) throw () |
void | debug (const char *stringFormat,...) throw () |
CategoryStream | debugStream () |
CategoryStream | debugStream () |
void | emerg (const std::string &message) throw () |
void | emerg (const char *stringFormat,...) throw () |
void | emerg (const std::string &message) throw () |
void | emerg (const char *stringFormat,...) throw () |
CategoryStream | emergStream () |
CategoryStream | emergStream () |
void | error (const std::string &message) throw () |
void | error (const char *stringFormat,...) throw () |
void | error (const std::string &message) throw () |
void | error (const char *stringFormat,...) throw () |
CategoryStream | errorStream () |
CategoryStream | errorStream () |
void | fatal (const std::string &message) throw () |
void | fatal (const char *stringFormat,...) throw () |
void | fatal (const std::string &message) throw () |
void | fatal (const char *stringFormat,...) throw () |
CategoryStream | fatalStream () |
CategoryStream | fatalStream () |
virtual bool | getAdditivity () const throw () |
virtual bool | getAdditivity () const throw () |
virtual AppenderSet | getAllAppenders () const |
virtual AppenderSet | getAllAppenders () const |
virtual Appender * | getAppender (const std::string &name) const |
virtual Appender * | getAppender () const |
virtual Appender * | getAppender (const std::string &name) const |
virtual Appender * | getAppender () const |
virtual Priority::Value | getChainedPriority () const throw () |
virtual Priority::Value | getChainedPriority () const throw () |
virtual const std::string & | getName () const throw () |
virtual const std::string & | getName () const throw () |
virtual const Category * | getParent () const throw () |
virtual Category * | getParent () throw () |
virtual const Category * | getParent () const throw () |
virtual Category * | getParent () throw () |
virtual Priority::Value | getPriority () const throw () |
virtual Priority::Value | getPriority () const throw () |
virtual CategoryStream | getStream (Priority::Value priority) |
virtual CategoryStream | getStream (Priority::Value priority) |
void | info (const std::string &message) throw () |
void | info (const char *stringFormat,...) throw () |
void | info (const std::string &message) throw () |
void | info (const char *stringFormat,...) throw () |
CategoryStream | infoStream () |
CategoryStream | infoStream () |
bool | isAlertEnabled () const throw () |
bool | isAlertEnabled () const throw () |
bool | isCritEnabled () const throw () |
bool | isCritEnabled () const throw () |
bool | isDebugEnabled () const throw () |
bool | isDebugEnabled () const throw () |
bool | isEmergEnabled () const throw () |
bool | isEmergEnabled () const throw () |
bool | isErrorEnabled () const throw () |
bool | isErrorEnabled () const throw () |
bool | isFatalEnabled () const throw () |
bool | isFatalEnabled () const throw () |
bool | isInfoEnabled () const throw () |
bool | isInfoEnabled () const throw () |
bool | isNoticeEnabled () const throw () |
bool | isNoticeEnabled () const throw () |
virtual bool | isPriorityEnabled (Priority::Value priority) const throw () |
virtual bool | isPriorityEnabled (Priority::Value priority) const throw () |
bool | isWarnEnabled () const throw () |
bool | isWarnEnabled () const throw () |
virtual void | log (Priority::Value priority, const std::string &message) throw () |
virtual void | log (Priority::Value priority, const char *stringFormat,...) throw () |
virtual void | log (Priority::Value priority, const std::string &message) throw () |
virtual void | log (Priority::Value priority, const char *stringFormat,...) throw () |
virtual void | logva (Priority::Value priority, const char *stringFormat, va_list va) throw () |
virtual void | logva (Priority::Value priority, const char *stringFormat, va_list va) throw () |
void | notice (const std::string &message) throw () |
void | notice (const char *stringFormat,...) throw () |
void | notice (const std::string &message) throw () |
void | notice (const char *stringFormat,...) throw () |
CategoryStream | noticeStream () |
CategoryStream | noticeStream () |
virtual CategoryStream | operator<< (Priority::Value priority) |
virtual CategoryStream | operator<< (Priority::Value priority) |
virtual bool | ownsAppender (Appender *appender) const throw () |
virtual bool | ownsAppender () const throw () |
virtual bool | ownsAppender (Appender *appender) const throw () |
virtual bool | ownsAppender () const throw () |
virtual void | removeAllAppenders () |
virtual void | removeAllAppenders () |
virtual void | removeAppender (Appender *appender) |
virtual void | removeAppender (Appender *appender) |
virtual void | setAdditivity (bool additivity) |
virtual void | setAdditivity (bool additivity) |
void | setAppender (Appender &appender) |
void | setAppender (Appender *appender) |
void | setAppender (Appender &appender) |
void | setAppender (Appender *appender) |
virtual void | setPriority (Priority::Value priority) throw (std::invalid_argument) |
virtual void | setPriority (Priority::Value priority) throw (std::invalid_argument) |
void | warn (const std::string &message) throw () |
void | warn (const char *stringFormat,...) throw () |
void | warn (const std::string &message) throw () |
void | warn (const char *stringFormat,...) throw () |
CategoryStream | warnStream () |
CategoryStream | warnStream () |
virtual | ~Category () |
virtual | ~Category () |
Static Public Member Functions | |
static Category * | exists (const std::string &name) |
static Category * | exists (const std::string &name) |
static std::vector< Category * > * | getCurrentCategories () |
static std::vector< Category * > * | getCurrentCategories () |
static Category & | getInstance (const std::string &name) |
static Category & | getInstance (const std::string &name) |
static Category & | getRoot () |
static Category & | getRoot () |
static Priority::Value | getRootPriority () throw () |
static Priority::Value | getRootPriority () throw () |
static void | setRootPriority (Priority::Value priority) |
static void | setRootPriority (Priority::Value priority) |
static void | shutdown () |
static void | shutdown () |
Protected Member Functions | |
virtual void | _logUnconditionally (Priority::Value priority, const char *format, va_list arguments) throw () |
virtual void | _logUnconditionally (Priority::Value priority, const char *format, va_list arguments) throw () |
virtual void | _logUnconditionally2 (Priority::Value priority, const std::string &message) throw () |
virtual void | _logUnconditionally2 (Priority::Value priority, const std::string &message) throw () |
Category (const std::string &name, Category *parent, Priority::Value priority=Priority::NOTSET) | |
Category (const std::string &name, Category *parent, Priority::Value priority=Priority::NOTSET) | |
Private Types | |
typedef std::map< Appender *, bool > | OwnsAppenderMap |
typedef std::map< Appender *, bool > | OwnsAppenderMap |
Private Member Functions | |
Category (const Category &other) | |
Category (const Category &other) | |
Category & | operator= (const Category &other) |
Category & | operator= (const Category &other) |
virtual bool | ownsAppender (Appender *appender, OwnsAppenderMap::iterator &i2) throw () |
virtual bool | ownsAppender (Appender *appender, OwnsAppenderMap::iterator &i2) throw () |
Private Attributes | |
AppenderSet | _appender |
threading::Mutex | _appenderSetMutex |
volatile bool | _isAdditive |
const std::string | _name |
OwnsAppenderMap | _ownsAppender |
Category * | _parent |
volatile Priority::Value | _priority |
Friends | |
class | HierarchyMaintainer |
This is the central class in the log4j package. One of the distintive features of log4j (and hence log4cpp) are hierarchal categories and their evaluation.
Definition at line 27 of file include/log4cpp/Category.hh.
typedef std::map<Appender *, bool> log4cpp::Category::OwnsAppenderMap [private] |
Definition at line 641 of file install/include/log4cpp/Category.hh.
typedef std::map<Appender *, bool> log4cpp::Category::OwnsAppenderMap [private] |
Definition at line 628 of file include/log4cpp/Category.hh.
log4cpp::Category::~Category | ( | ) | [virtual] |
Destructor for Category.
Definition at line 58 of file Category.cpp.
log4cpp::Category::Category | ( | const std::string & | name, | |
Category * | parent, | |||
Priority::Value | priority = Priority::NOTSET | |||
) | [protected] |
Constructor
name | the fully qualified name of this Category | |
parent | the parent of this parent, or NULL for the root Category | |
priority | the priority for this Category. Defaults to Priority::NOTSET |
Definition at line 51 of file Category.cpp.
log4cpp::Category::Category | ( | const Category & | other | ) | [private] |
virtual log4cpp::Category::~Category | ( | ) | [virtual] |
Destructor for Category.
log4cpp::Category::Category | ( | const std::string & | name, | |
Category * | parent, | |||
Priority::Value | priority = Priority::NOTSET | |||
) | [protected] |
Constructor
name | the fully qualified name of this Category | |
parent | the parent of this parent, or NULL for the root Category | |
priority | the priority for this Category. Defaults to Priority::NOTSET |
log4cpp::Category::Category | ( | const Category & | other | ) | [private] |
virtual void log4cpp::Category::_logUnconditionally | ( | Priority::Value | priority, | |
const char * | format, | |||
va_list | arguments | |||
) | throw () [protected, virtual] |
void log4cpp::Category::_logUnconditionally | ( | Priority::Value | priority, | |
const char * | format, | |||
va_list | arguments | |||
) | throw () [protected, virtual] |
Definition at line 250 of file Category.cpp.
virtual void log4cpp::Category::_logUnconditionally2 | ( | Priority::Value | priority, | |
const std::string & | message | |||
) | throw () [protected, virtual] |
Unconditionally log a message with the specified priority.
priority | The priority of this log message. | |
message | string to write in the log file |
Reimplemented in log4cpp::FixedContextCategory, and log4cpp::FixedContextCategory.
void log4cpp::Category::_logUnconditionally2 | ( | Priority::Value | priority, | |
const std::string & | message | |||
) | throw () [protected, virtual] |
Unconditionally log a message with the specified priority.
priority | The priority of this log message. | |
message | string to write in the log file |
Reimplemented in log4cpp::FixedContextCategory, and log4cpp::FixedContextCategory.
Definition at line 256 of file Category.cpp.
virtual void log4cpp::Category::addAppender | ( | Appender & | appender | ) | [virtual] |
Adds an Appender for this Category. This method does not pass ownership from the caller to the Category.
appender | The Appender this category has to log to. |
Reimplemented in log4cpp::FixedContextCategory, and log4cpp::FixedContextCategory.
virtual void log4cpp::Category::addAppender | ( | Appender * | appender | ) | throw (std::invalid_argument) [virtual] |
Adds an Appender to this Category. This method passes ownership from the caller to the Category.
appender | The Appender to wich this category has to log. |
std::invalid_argument | if the appender is NULL. |
Reimplemented in log4cpp::FixedContextCategory, and log4cpp::FixedContextCategory.
void log4cpp::Category::addAppender | ( | Appender & | appender | ) | [virtual] |
Adds an Appender for this Category. This method does not pass ownership from the caller to the Category.
appender | The Appender this category has to log to. |
Reimplemented in log4cpp::FixedContextCategory, and log4cpp::FixedContextCategory.
Definition at line 110 of file Category.cpp.
void log4cpp::Category::addAppender | ( | Appender * | appender | ) | throw (std::invalid_argument) [virtual] |
Adds an Appender to this Category. This method passes ownership from the caller to the Category.
appender | The Appender to wich this category has to log. |
std::invalid_argument | if the appender is NULL. |
Reimplemented in log4cpp::FixedContextCategory, and log4cpp::FixedContextCategory.
Definition at line 93 of file Category.cpp.
void log4cpp::Category::alert | ( | const std::string & | message | ) | throw () |
Log a message with alert priority.
message | string to write in the log file |
void log4cpp::Category::alert | ( | const char * | stringFormat, | |
... | ||||
) | throw () |
Log a message with alert priority.
stringFormat | Format specifier for the string to write in the log file. | |
... | The arguments for stringFormat |
void log4cpp::Category::alert | ( | const std::string & | message | ) | throw () |
Log a message with alert priority.
message | string to write in the log file |
Definition at line 383 of file Category.cpp.
void log4cpp::Category::alert | ( | const char * | stringFormat, | |
... | ||||
) | throw () |
Log a message with alert priority.
stringFormat | Format specifier for the string to write in the log file. | |
... | The arguments for stringFormat |
Definition at line 374 of file Category.cpp.
CategoryStream log4cpp::Category::alertStream | ( | ) | throw () [inline] |
Return a CategoryStream with priority ALERT.
Definition at line 510 of file install/include/log4cpp/Category.hh.
CategoryStream log4cpp::Category::alertStream | ( | ) | throw () [inline] |
Return a CategoryStream with priority ALERT.
Definition at line 497 of file include/log4cpp/Category.hh.
virtual void log4cpp::Category::callAppenders | ( | const LoggingEvent & | event | ) | throw () [virtual] |
Call the appenders in the hierarchy starting at this
. 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.
event | the LogginEvent to log. |
Reimplemented in log4cpp::FixedContextCategory, and log4cpp::FixedContextCategory.
void log4cpp::Category::callAppenders | ( | const LoggingEvent & | event | ) | throw () [virtual] |
Call the appenders in the hierarchy starting at this
. 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.
event | the LogginEvent to log. |
Reimplemented in log4cpp::FixedContextCategory, and log4cpp::FixedContextCategory.
Definition at line 219 of file Category.cpp.
void log4cpp::Category::crit | ( | const std::string & | message | ) | throw () |
Log a message with crit priority.
message | string to write in the log file |
void log4cpp::Category::crit | ( | const char * | stringFormat, | |
... | ||||
) | throw () |
Log a message with crit priority.
stringFormat | Format specifier for the string to write in the log file. | |
... | The arguments for stringFormat |
void log4cpp::Category::crit | ( | const std::string & | message | ) | throw () |
Log a message with crit priority.
message | string to write in the log file |
Definition at line 369 of file Category.cpp.
void log4cpp::Category::crit | ( | const char * | stringFormat, | |
... | ||||
) | throw () |
Log a message with crit priority.
stringFormat | Format specifier for the string to write in the log file. | |
... | The arguments for stringFormat |
Definition at line 360 of file Category.cpp.
CategoryStream log4cpp::Category::critStream | ( | ) | [inline] |
Return a CategoryStream with priority CRIT.
Definition at line 480 of file install/include/log4cpp/Category.hh.
CategoryStream log4cpp::Category::critStream | ( | ) | [inline] |
Return a CategoryStream with priority CRIT.
Definition at line 467 of file include/log4cpp/Category.hh.
void log4cpp::Category::debug | ( | const std::string & | message | ) | throw () |
Log a message with debug priority.
message | string to write in the log file |
void log4cpp::Category::debug | ( | const char * | stringFormat, | |
... | ||||
) | throw () |
Log a message with debug priority.
stringFormat | Format specifier for the string to write in the log file. | |
... | The arguments for stringFormat |
void log4cpp::Category::debug | ( | const std::string & | message | ) | throw () |
Log a message with debug priority.
message | string to write in the log file |
Definition at line 299 of file Category.cpp.
void log4cpp::Category::debug | ( | const char * | stringFormat, | |
... | ||||
) | throw () |
Log a message with debug priority.
stringFormat | Format specifier for the string to write in the log file. | |
... | The arguments for stringFormat |
Definition at line 290 of file Category.cpp.
CategoryStream log4cpp::Category::debugStream | ( | ) | [inline] |
Return a CategoryStream with priority DEBUG.
Definition at line 330 of file install/include/log4cpp/Category.hh.
CategoryStream log4cpp::Category::debugStream | ( | ) | [inline] |
Return a CategoryStream with priority DEBUG.
Definition at line 317 of file include/log4cpp/Category.hh.
void log4cpp::Category::emerg | ( | const std::string & | message | ) | throw () |
Log a message with emerg priority.
message | string to write in the log file |
void log4cpp::Category::emerg | ( | const char * | stringFormat, | |
... | ||||
) | throw () |
Log a message with emerg priority.
stringFormat | Format specifier for the string to write in the log file. | |
... | The arguments for stringFormat |
void log4cpp::Category::emerg | ( | const std::string & | message | ) | throw () |
Log a message with emerg priority.
message | string to write in the log file |
Definition at line 397 of file Category.cpp.
void log4cpp::Category::emerg | ( | const char * | stringFormat, | |
... | ||||
) | throw () |
Log a message with emerg priority.
stringFormat | Format specifier for the string to write in the log file. | |
... | The arguments for stringFormat |
Definition at line 388 of file Category.cpp.
CategoryStream log4cpp::Category::emergStream | ( | ) | [inline] |
Return a CategoryStream with priority EMERG.
Definition at line 540 of file install/include/log4cpp/Category.hh.
CategoryStream log4cpp::Category::emergStream | ( | ) | [inline] |
Return a CategoryStream with priority EMERG.
Definition at line 527 of file include/log4cpp/Category.hh.
void log4cpp::Category::error | ( | const std::string & | message | ) | throw () |
Log a message with error priority.
message | string to write in the log file |
void log4cpp::Category::error | ( | const char * | stringFormat, | |
... | ||||
) | throw () |
Log a message with error priority.
stringFormat | Format specifier for the string to write in the log file. | |
... | The arguments for stringFormat |
void log4cpp::Category::error | ( | const std::string & | message | ) | throw () |
Log a message with error priority.
message | string to write in the log file |
Definition at line 355 of file Category.cpp.
void log4cpp::Category::error | ( | const char * | stringFormat, | |
... | ||||
) | throw () |
Log a message with error priority.
stringFormat | Format specifier for the string to write in the log file. | |
... | The arguments for stringFormat |
Definition at line 346 of file Category.cpp.
CategoryStream log4cpp::Category::errorStream | ( | ) | [inline] |
Return a CategoryStream with priority ERROR.
Definition at line 450 of file install/include/log4cpp/Category.hh.
CategoryStream log4cpp::Category::errorStream | ( | ) | [inline] |
Return a CategoryStream with priority ERROR.
Definition at line 437 of file include/log4cpp/Category.hh.
static Category* log4cpp::Category::exists | ( | const std::string & | name | ) | [static] |
If the named category exists (in the default hierarchy) then it returns a reference to the category, otherwise it returns NULL.
Category * log4cpp::Category::exists | ( | const std::string & | name | ) | [static] |
If the named category exists (in the default hierarchy) then it returns a reference to the category, otherwise it returns NULL.
Definition at line 38 of file Category.cpp.
void log4cpp::Category::fatal | ( | const std::string & | message | ) | throw () |
Log a message with fatal priority. NB. priority 'fatal' is equivalent to 'emerg'.
message | string to write in the log file |
void log4cpp::Category::fatal | ( | const char * | stringFormat, | |
... | ||||
) | throw () |
Log a message with fatal priority. NB. priority 'fatal' is equivalent to 'emerg'.
stringFormat | Format specifier for the string to write in the log file. | |
... | The arguments for stringFormat |
void log4cpp::Category::fatal | ( | const std::string & | message | ) | throw () |
Log a message with fatal priority. NB. priority 'fatal' is equivalent to 'emerg'.
message | string to write in the log file |
Definition at line 411 of file Category.cpp.
void log4cpp::Category::fatal | ( | const char * | stringFormat, | |
... | ||||
) | throw () |
Log a message with fatal priority. NB. priority 'fatal' is equivalent to 'emerg'.
stringFormat | Format specifier for the string to write in the log file. | |
... | The arguments for stringFormat |
Definition at line 402 of file Category.cpp.
CategoryStream log4cpp::Category::fatalStream | ( | ) | [inline] |
Return a CategoryStream with priority FATAL. NB. priority 'fatal' is equivalent to 'emerg'.
Definition at line 578 of file install/include/log4cpp/Category.hh.
CategoryStream log4cpp::Category::fatalStream | ( | ) | [inline] |
Return a CategoryStream with priority FATAL. NB. priority 'fatal' is equivalent to 'emerg'.
Definition at line 565 of file include/log4cpp/Category.hh.
virtual bool log4cpp::Category::getAdditivity | ( | ) | const throw () [virtual] |
Returns the additivity flag for this Category instance.
Reimplemented in log4cpp::FixedContextCategory, and log4cpp::FixedContextCategory.
bool log4cpp::Category::getAdditivity | ( | ) | const throw () [virtual] |
Returns the additivity flag for this Category instance.
Reimplemented in log4cpp::FixedContextCategory, and log4cpp::FixedContextCategory.
Definition at line 238 of file Category.cpp.
virtual AppenderSet log4cpp::Category::getAllAppenders | ( | ) | const [virtual] |
Returns the set of Appenders currently attached to this Catogory.
Reimplemented in log4cpp::FixedContextCategory, and log4cpp::FixedContextCategory.
AppenderSet log4cpp::Category::getAllAppenders | ( | ) | const [virtual] |
Returns the set of Appenders currently attached to this Catogory.
Reimplemented in log4cpp::FixedContextCategory, and log4cpp::FixedContextCategory.
Definition at line 143 of file Category.cpp.
virtual Appender* log4cpp::Category::getAppender | ( | const std::string & | name | ) | const [virtual] |
Returns the specified Appender for this Category, or NULL if the Appender is not attached to this Category.
Reimplemented in log4cpp::FixedContextCategory, and log4cpp::FixedContextCategory.
virtual Appender* log4cpp::Category::getAppender | ( | ) | const [virtual] |
Returns the first Appender for this Category, or NULL if no Appender has been set.
Reimplemented in log4cpp::FixedContextCategory, and log4cpp::FixedContextCategory.
Appender * log4cpp::Category::getAppender | ( | const std::string & | name | ) | const [virtual] |
Returns the specified Appender for this Category, or NULL if the Appender is not attached to this Category.
Reimplemented in log4cpp::FixedContextCategory, and log4cpp::FixedContextCategory.
Definition at line 129 of file Category.cpp.
Appender * log4cpp::Category::getAppender | ( | ) | const [virtual] |
Returns the first Appender for this Category, or NULL if no Appender has been set.
Reimplemented in log4cpp::FixedContextCategory, and log4cpp::FixedContextCategory.
Definition at line 121 of file Category.cpp.
virtual Priority::Value log4cpp::Category::getChainedPriority | ( | ) | const throw () [virtual] |
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, and log4cpp::FixedContextCategory.
Priority::Value log4cpp::Category::getChainedPriority | ( | ) | const throw () [virtual] |
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, and log4cpp::FixedContextCategory.
Definition at line 82 of file Category.cpp.
static std::vector<Category*>* log4cpp::Category::getCurrentCategories | ( | ) | [static] |
Returns all the currently defined categories as a vector of Category pointers. Note: this function does not pass ownership of the categories in the vector to the caller, only the ownership of the vector. However vector<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.
std::vector< Category * > * log4cpp::Category::getCurrentCategories | ( | ) | [static] |
Returns all the currently defined categories as a vector of Category pointers. Note: this function does not pass ownership of the categories in the vector to the caller, only the ownership of the vector. However vector<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.
Definition at line 42 of file Category.cpp.
static Category& log4cpp::Category::getInstance | ( | const std::string & | name | ) | [static] |
Instantiate a Category with name name
. This method does not set priority of the category which is by default Priority::NOTSET
.
name | The name of the category to retrieve. |
Category & log4cpp::Category::getInstance | ( | const std::string & | name | ) | [static] |
Instantiate a Category with name name
. This method does not set priority of the category which is by default Priority::NOTSET
.
name | The name of the category to retrieve. |
Definition at line 34 of file Category.cpp.
virtual const std::string& log4cpp::Category::getName | ( | ) | const throw () [virtual] |
Return the category name.
const std::string & log4cpp::Category::getName | ( | ) | const throw () [virtual] |
virtual const Category* log4cpp::Category::getParent | ( | ) | const throw () [virtual] |
Returns the parent category of this category, or NULL if the category is the root category.
virtual Category* log4cpp::Category::getParent | ( | ) | throw () [virtual] |
Returns the parent category of this category, or NULL if the category is the root category.
const Category * log4cpp::Category::getParent | ( | ) | const throw () [virtual] |
Returns the parent category of this category, or NULL if the category is the root category.
Definition at line 246 of file Category.cpp.
Category * log4cpp::Category::getParent | ( | ) | throw () [virtual] |
Returns the parent category of this category, or NULL if the category is the root category.
Definition at line 242 of file Category.cpp.
virtual Priority::Value log4cpp::Category::getPriority | ( | ) | const throw () [virtual] |
Returns the assigned Priority, if any, for this Category.
Reimplemented in log4cpp::FixedContextCategory, and log4cpp::FixedContextCategory.
Priority::Value log4cpp::Category::getPriority | ( | ) | const throw () [virtual] |
Returns the assigned Priority, if any, for this Category.
Reimplemented in log4cpp::FixedContextCategory, and log4cpp::FixedContextCategory.
Definition at line 66 of file Category.cpp.
static Category& log4cpp::Category::getRoot | ( | ) | [static] |
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 Category.getInstance("")
does retrieve the root category and not a category just under root named "".
Category & log4cpp::Category::getRoot | ( | ) | [static] |
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 Category.getInstance("")
does retrieve the root category and not a category just under root named "".
Definition at line 22 of file Category.cpp.
static Priority::Value log4cpp::Category::getRootPriority | ( | ) | throw () [static] |
Get the priority of the root
Category.
Priority::Value log4cpp::Category::getRootPriority | ( | ) | throw () [static] |
Get the priority of the root
Category.
Definition at line 30 of file Category.cpp.
virtual CategoryStream log4cpp::Category::getStream | ( | Priority::Value | priority | ) | [virtual] |
Return a CategoryStream with given Priority.
priority | The Priority of the CategoryStream. |
CategoryStream log4cpp::Category::getStream | ( | Priority::Value | priority | ) | [virtual] |
Return a CategoryStream with given Priority.
priority | The Priority of the CategoryStream. |
Definition at line 416 of file Category.cpp.
void log4cpp::Category::info | ( | const std::string & | message | ) | throw () |
Log a message with info priority.
message | string to write in the log file |
void log4cpp::Category::info | ( | const char * | stringFormat, | |
... | ||||
) | throw () |
Log a message with info priority.
stringFormat | Format specifier for the string to write in the log file. | |
... | The arguments for stringFormat |
void log4cpp::Category::info | ( | const std::string & | message | ) | throw () |
Log a message with info priority.
message | string to write in the log file |
Definition at line 313 of file Category.cpp.
void log4cpp::Category::info | ( | const char * | stringFormat, | |
... | ||||
) | throw () |
Log a message with info priority.
stringFormat | Format specifier for the string to write in the log file. | |
... | The arguments for stringFormat |
Definition at line 304 of file Category.cpp.
CategoryStream log4cpp::Category::infoStream | ( | ) | [inline] |
Return a CategoryStream with priority INFO.
Definition at line 360 of file install/include/log4cpp/Category.hh.
CategoryStream log4cpp::Category::infoStream | ( | ) | [inline] |
Return a CategoryStream with priority INFO.
Definition at line 347 of file include/log4cpp/Category.hh.
bool log4cpp::Category::isAlertEnabled | ( | ) | const throw () [inline] |
Return true if the Category will log messages with priority ALERT.
Definition at line 502 of file install/include/log4cpp/Category.hh.
bool log4cpp::Category::isAlertEnabled | ( | ) | const throw () [inline] |
Return true if the Category will log messages with priority ALERT.
Definition at line 489 of file include/log4cpp/Category.hh.
bool log4cpp::Category::isCritEnabled | ( | ) | const throw () [inline] |
Return true if the Category will log messages with priority CRIT.
Definition at line 472 of file install/include/log4cpp/Category.hh.
bool log4cpp::Category::isCritEnabled | ( | ) | const throw () [inline] |
Return true if the Category will log messages with priority CRIT.
Definition at line 459 of file include/log4cpp/Category.hh.
bool log4cpp::Category::isDebugEnabled | ( | ) | const throw () [inline] |
Return true if the Category will log messages with priority DEBUG.
Definition at line 322 of file install/include/log4cpp/Category.hh.
bool log4cpp::Category::isDebugEnabled | ( | ) | const throw () [inline] |
Return true if the Category will log messages with priority DEBUG.
Definition at line 309 of file include/log4cpp/Category.hh.
bool log4cpp::Category::isEmergEnabled | ( | ) | const throw () [inline] |
Return true if the Category will log messages with priority EMERG.
Definition at line 532 of file install/include/log4cpp/Category.hh.
bool log4cpp::Category::isEmergEnabled | ( | ) | const throw () [inline] |
Return true if the Category will log messages with priority EMERG.
Definition at line 519 of file include/log4cpp/Category.hh.
bool log4cpp::Category::isErrorEnabled | ( | ) | const throw () [inline] |
Return true if the Category will log messages with priority ERROR.
Definition at line 442 of file install/include/log4cpp/Category.hh.
bool log4cpp::Category::isErrorEnabled | ( | ) | const throw () [inline] |
Return true if the Category will log messages with priority ERROR.
Definition at line 429 of file include/log4cpp/Category.hh.
bool log4cpp::Category::isFatalEnabled | ( | ) | const throw () [inline] |
Return true if the Category will log messages with priority FATAL. NB. priority 'fatal' is equivalent to 'emerg'.
Definition at line 568 of file install/include/log4cpp/Category.hh.
bool log4cpp::Category::isFatalEnabled | ( | ) | const throw () [inline] |
Return true if the Category will log messages with priority FATAL. NB. priority 'fatal' is equivalent to 'emerg'.
Definition at line 555 of file include/log4cpp/Category.hh.
bool log4cpp::Category::isInfoEnabled | ( | ) | const throw () [inline] |
Return true if the Category will log messages with priority INFO.
Definition at line 352 of file install/include/log4cpp/Category.hh.
bool log4cpp::Category::isInfoEnabled | ( | ) | const throw () [inline] |
Return true if the Category will log messages with priority INFO.
Definition at line 339 of file include/log4cpp/Category.hh.
bool log4cpp::Category::isNoticeEnabled | ( | ) | const throw () [inline] |
Return true if the Category will log messages with priority NOTICE.
Definition at line 382 of file install/include/log4cpp/Category.hh.
bool log4cpp::Category::isNoticeEnabled | ( | ) | const throw () [inline] |
Return true if the Category will log messages with priority NOTICE.
Definition at line 369 of file include/log4cpp/Category.hh.
virtual bool log4cpp::Category::isPriorityEnabled | ( | Priority::Value | priority | ) | const throw () [virtual] |
Returns true if the chained priority of the Category is equal to or higher than given priority.
priority | The priority to compare with. |
bool log4cpp::Category::isPriorityEnabled | ( | Priority::Value | priority | ) | const throw () [virtual] |
Returns true if the chained priority of the Category is equal to or higher than given priority.
priority | The priority to compare with. |
Definition at line 262 of file Category.cpp.
bool log4cpp::Category::isWarnEnabled | ( | ) | const throw () [inline] |
Return true if the Category will log messages with priority WARN.
Definition at line 412 of file install/include/log4cpp/Category.hh.
bool log4cpp::Category::isWarnEnabled | ( | ) | const throw () [inline] |
Return true if the Category will log messages with priority WARN.
Definition at line 399 of file include/log4cpp/Category.hh.
virtual void log4cpp::Category::log | ( | Priority::Value | priority, | |
const std::string & | message | |||
) | throw () [virtual] |
Log a message with the specified priority.
priority | The priority of this log message. | |
message | string to write in the log file |
virtual void log4cpp::Category::log | ( | Priority::Value | priority, | |
const char * | stringFormat, | |||
... | ||||
) | throw () [virtual] |
Log a message with the specified priority.
priority | The priority of this log message. | |
stringFormat | Format specifier for the string to write in the log file. | |
... | The arguments for stringFormat |
void log4cpp::Category::log | ( | Priority::Value | priority, | |
const std::string & | message | |||
) | throw () [virtual] |
Log a message with the specified priority.
priority | The priority of this log message. | |
message | string to write in the log file |
Definition at line 276 of file Category.cpp.
void log4cpp::Category::log | ( | Priority::Value | priority, | |
const char * | stringFormat, | |||
... | ||||
) | throw () [virtual] |
Log a message with the specified priority.
priority | The priority of this log message. | |
stringFormat | Format specifier for the string to write in the log file. | |
... | The arguments for stringFormat |
Definition at line 266 of file Category.cpp.
virtual void log4cpp::Category::logva | ( | Priority::Value | priority, | |
const char * | stringFormat, | |||
va_list | va | |||
) | throw () [virtual] |
Log a message with the specified priority.
priority | The priority of this log message. | |
stringFormat | Format specifier for the string to write in the log file. | |
va | The arguments for stringFormat. |
void log4cpp::Category::logva | ( | Priority::Value | priority, | |
const char * | stringFormat, | |||
va_list | va | |||
) | throw () [virtual] |
Log a message with the specified priority.
priority | The priority of this log message. | |
stringFormat | Format specifier for the string to write in the log file. | |
va | The arguments for stringFormat. |
Definition at line 282 of file Category.cpp.
void log4cpp::Category::notice | ( | const std::string & | message | ) | throw () |
Log a message with notice priority.
message | string to write in the log file |
void log4cpp::Category::notice | ( | const char * | stringFormat, | |
... | ||||
) | throw () |
Log a message with notice priority.
stringFormat | Format specifier for the string to write in the log file. | |
... | The arguments for stringFormat |
void log4cpp::Category::notice | ( | const std::string & | message | ) | throw () |
Log a message with notice priority.
message | string to write in the log file |
Definition at line 327 of file Category.cpp.
void log4cpp::Category::notice | ( | const char * | stringFormat, | |
... | ||||
) | throw () |
Log a message with notice priority.
stringFormat | Format specifier for the string to write in the log file. | |
... | The arguments for stringFormat |
Definition at line 318 of file Category.cpp.
CategoryStream log4cpp::Category::noticeStream | ( | ) | [inline] |
Return a CategoryStream with priority NOTICE.
Definition at line 390 of file install/include/log4cpp/Category.hh.
CategoryStream log4cpp::Category::noticeStream | ( | ) | [inline] |
Return a CategoryStream with priority NOTICE.
Definition at line 377 of file include/log4cpp/Category.hh.
virtual CategoryStream log4cpp::Category::operator<< | ( | Priority::Value | priority | ) | [virtual] |
Return a CategoryStream with given Priority.
priority | The Priority of the CategoryStream. |
CategoryStream log4cpp::Category::operator<< | ( | Priority::Value | priority | ) | [virtual] |
Return a CategoryStream with given Priority.
priority | The Priority of the CategoryStream. |
Definition at line 421 of file Category.cpp.
virtual bool log4cpp::Category::ownsAppender | ( | Appender * | appender, | |
OwnsAppenderMap::iterator & | i2 | |||
) | throw () [private, virtual] |
virtual bool log4cpp::Category::ownsAppender | ( | Appender * | appender | ) | const throw () [virtual] |
Returns true if the Category owns the Appender. In that case the Category destructor will delete the Appender.
Reimplemented in log4cpp::FixedContextCategory, and log4cpp::FixedContextCategory.
virtual bool log4cpp::Category::ownsAppender | ( | ) | const throw () [inline, virtual] |
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, and log4cpp::FixedContextCategory.
Definition at line 226 of file install/include/log4cpp/Category.hh.
virtual bool log4cpp::Category::ownsAppender | ( | Appender * | appender, | |
OwnsAppenderMap::iterator & | i2 | |||
) | throw () [private, virtual] |
bool log4cpp::Category::ownsAppender | ( | Appender * | appender | ) | const throw () [virtual] |
Returns true if the Category owns the Appender. In that case the Category destructor will delete the Appender.
Reimplemented in log4cpp::FixedContextCategory, and log4cpp::FixedContextCategory.
Definition at line 184 of file Category.cpp.
virtual bool log4cpp::Category::ownsAppender | ( | ) | const throw () [inline, virtual] |
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, and log4cpp::FixedContextCategory.
Definition at line 213 of file include/log4cpp/Category.hh.
virtual void log4cpp::Category::removeAllAppenders | ( | ) | [virtual] |
Removes all appenders for this Category.
Reimplemented in log4cpp::FixedContextCategory, and log4cpp::FixedContextCategory.
void log4cpp::Category::removeAllAppenders | ( | ) | [virtual] |
Removes all appenders for this Category.
Reimplemented in log4cpp::FixedContextCategory, and log4cpp::FixedContextCategory.
Definition at line 150 of file Category.cpp.
virtual void log4cpp::Category::removeAppender | ( | Appender * | appender | ) | [virtual] |
Removes specified appender for this Category.
void log4cpp::Category::removeAppender | ( | Appender * | appender | ) | [virtual] |
Removes specified appender for this Category.
Definition at line 167 of file Category.cpp.
virtual void log4cpp::Category::setAdditivity | ( | bool | additivity | ) | [virtual] |
Set the additivity flag for this Category instance.
Reimplemented in log4cpp::FixedContextCategory, and log4cpp::FixedContextCategory.
void log4cpp::Category::setAdditivity | ( | bool | additivity | ) | [virtual] |
Set the additivity flag for this Category instance.
Reimplemented in log4cpp::FixedContextCategory, and log4cpp::FixedContextCategory.
Definition at line 234 of file Category.cpp.
void log4cpp::Category::setAppender | ( | Appender & | appender | ) | [inline] |
Adds an Appender for this Category. This method does not pass ownership from the caller to the Category.
appender | The Appender this category has to log to. |
Definition at line 182 of file install/include/log4cpp/Category.hh.
void log4cpp::Category::setAppender | ( | Appender * | appender | ) | [inline] |
Adds an Appender to this Category. This method passes ownership from the caller to the Category.
appender | The Appender this category has to log to or NULL to remove the current Appenders. |
Definition at line 168 of file install/include/log4cpp/Category.hh.
void log4cpp::Category::setAppender | ( | Appender & | appender | ) | [inline] |
Adds an Appender for this Category. This method does not pass ownership from the caller to the Category.
appender | The Appender this category has to log to. |
Definition at line 169 of file include/log4cpp/Category.hh.
void log4cpp::Category::setAppender | ( | Appender * | appender | ) | [inline] |
Adds an Appender to this Category. This method passes ownership from the caller to the Category.
appender | The Appender this category has to log to or NULL to remove the current Appenders. |
Definition at line 155 of file include/log4cpp/Category.hh.
virtual void log4cpp::Category::setPriority | ( | Priority::Value | priority | ) | throw (std::invalid_argument) [virtual] |
Set the priority of this Category.
priority | The priority to set. Use Priority::NOTSET to let the category use its parents priority as effective priority. |
std::invalid_argument | if the caller tries to set Priority::NOTSET on the Root Category. |
void log4cpp::Category::setPriority | ( | Priority::Value | priority | ) | throw (std::invalid_argument) [virtual] |
Set the priority of this Category.
priority | The priority to set. Use Priority::NOTSET to let the category use its parents priority as effective priority. |
std::invalid_argument | if the caller tries to set Priority::NOTSET on the Root Category. |
Definition at line 70 of file Category.cpp.
static void log4cpp::Category::setRootPriority | ( | Priority::Value | priority | ) | [static] |
void log4cpp::Category::setRootPriority | ( | Priority::Value | priority | ) | [static] |
Set the priority of the root Category.
priority | The new priority for the root Category |
Definition at line 26 of file Category.cpp.
static void log4cpp::Category::shutdown | ( | ) | [static] |
This method will remove all Appenders from Categories.XXX
void log4cpp::Category::shutdown | ( | ) | [static] |
This method will remove all Appenders from Categories.XXX
Definition at line 47 of file Category.cpp.
void log4cpp::Category::warn | ( | const std::string & | message | ) | throw () |
Log a message with warn priority.
message | string to write in the log file |
void log4cpp::Category::warn | ( | const char * | stringFormat, | |
... | ||||
) | throw () |
Log a message with warn priority.
stringFormat | Format specifier for the string to write in the log file. | |
... | The arguments for stringFormat |
void log4cpp::Category::warn | ( | const std::string & | message | ) | throw () |
Log a message with warn priority.
message | string to write in the log file |
Definition at line 341 of file Category.cpp.
void log4cpp::Category::warn | ( | const char * | stringFormat, | |
... | ||||
) | throw () |
Log a message with warn priority.
stringFormat | Format specifier for the string to write in the log file. | |
... | The arguments for stringFormat |
Definition at line 332 of file Category.cpp.
CategoryStream log4cpp::Category::warnStream | ( | ) | [inline] |
Return a CategoryStream with priority WARN.
Definition at line 420 of file install/include/log4cpp/Category.hh.
CategoryStream log4cpp::Category::warnStream | ( | ) | [inline] |
Return a CategoryStream with priority WARN.
Definition at line 407 of file include/log4cpp/Category.hh.
HierarchyMaintainer [friend] |
Definition at line 21 of file include/log4cpp/Category.hh.
AppenderSet log4cpp::Category::_appender [private] |
Definition at line 639 of file include/log4cpp/Category.hh.
threading::Mutex log4cpp::Category::_appenderSetMutex [mutable, private] |
Definition at line 640 of file include/log4cpp/Category.hh.
volatile bool log4cpp::Category::_isAdditive [private] |
Additivity is set to true by default, i.e. a child inherits its ancestor's appenders by default.
Definition at line 653 of file include/log4cpp/Category.hh.
const std::string log4cpp::Category::_name [private] |
The name of this category.
Definition at line 615 of file include/log4cpp/Category.hh.
Whether the category holds the ownership of the appender. If so, it deletes the appender in its destructor.
Definition at line 647 of file include/log4cpp/Category.hh.
Category * log4cpp::Category::_parent [private] |
The parent of this category. All categories have al least one ancestor which is the root category.
Definition at line 621 of file include/log4cpp/Category.hh.
volatile Priority::Value log4cpp::Category::_priority [private] |
The assigned priority of this category.
Definition at line 626 of file include/log4cpp/Category.hh.