#include <FixedContextCategory.hh>
Inheritance diagram for log4cpp::FixedContextCategory:
Public Methods | |
FixedContextCategory (const std::string &name, const std::string &context="") | |
Constructor. More... | |
virtual | ~FixedContextCategory () |
Destructor for Category. More... | |
virtual void | setContext (const std::string &context) |
Set the context string used as NDC. More... | |
virtual std::string | getContext () const |
Return the context string used as NDC. More... | |
virtual Priority::Value | getPriority () const throw () |
Returns the assigned Priority, if any, for this Category. More... | |
virtual Priority::Value | getChainedPriority () const throw () |
Starting from this Category, search the category hierarchy for a set priority and return it. More... | |
virtual void | addAppender (Appender *appender) throw () |
For the moment this method does nothing. More... | |
virtual void | addAppender (Appender &appender) |
For the moment this method does nothing. More... | |
virtual Appender * | getAppender () const |
Returns the Appender for this Category, or NULL if no Appender has been set. More... | |
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. More... | |
virtual AppenderSet | getAllAppenders () const |
Returns the set of Appenders currently attached to this Catogory. More... | |
virtual void | removeAllAppenders () |
Removes all appenders set for this Category. More... | |
virtual bool | ownsAppender () const throw () |
FixedContextAppenders cannot own Appenders. More... | |
virtual bool | ownsAppender (Appender *appender) const throw () |
FixedContextAppenders cannot own Appenders. More... | |
virtual void | callAppenders (const LoggingEvent &event) throw () |
Call the appenders in the hierarchy starting at this . More... | |
virtual void | setAdditivity (bool additivity) |
Set the additivity flag for this Category instance. More... | |
virtual bool | getAdditivity () const throw () |
Returns the additivity flag for this Category instance. More... | |
Protected Methods | |
virtual void | _logUnconditionally2 (Priority::Value priority, const std::string &message) throw () |
Unconditionally log a message with the specified priority. More... |
All handling of Appenders, etc. is delgated to the 'normal' Category with the same name. Its intended use is for object instances that serve a single client: they contruct a FixedContextCategory with the client identifier as context. Unlike with regular Category instances one has to explicitly create FixedContextCategory instances using the constructor. This also implies one has to take cake of destruction of the instance as well.
|
Constructor.
|
|
Destructor for Category.
|
|
Unconditionally log a message with the specified priority.
Reimplemented from log4cpp::Category. |
|
For the moment this method does nothing.
Reimplemented from log4cpp::Category. |
|
For the moment this method does nothing.
Reimplemented from log4cpp::Category. |
|
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 from log4cpp::Category. |
|
Returns the additivity flag for this Category instance.
Reimplemented from log4cpp::Category. |
|
Returns the set of Appenders currently attached to this Catogory.
Reimplemented from log4cpp::Category. |
|
Returns the specified Appender for this Category, or NULL if the Appender is not attached to this Category.
Reimplemented from log4cpp::Category. |
|
Returns the Appender for this Category, or NULL if no Appender has been set.
Reimplemented from log4cpp::Category. |
|
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 from log4cpp::Category. |
|
Return the context string used as NDC.
|
|
Returns the assigned Priority, if any, for this Category.
Reimplemented from log4cpp::Category. |
|
FixedContextAppenders cannot own Appenders.
Reimplemented from log4cpp::Category. |
|
FixedContextAppenders cannot own Appenders.
Reimplemented from log4cpp::Category. |
|
Removes all appenders set for this Category. Currently a Category can have only one appender, but this may change in the future. Reimplemented from log4cpp::Category. |
|
Set the additivity flag for this Category instance.
Reimplemented from log4cpp::Category. |
|
Set the context string used as NDC.
|