Apache Log4cxx
Version 1.2.0
|
Changes a verbosity level for the instance variable's lifetime. More...
#include <levelchange.h>
Public Member Functions | |
LevelChange (const LoggerPtr &otherCategory, const LevelPtr &level) | |
Set otherCategory to level . | |
LevelChange (const LoggerPtr &otherCategory, const LoggerPtr &thisCategory) | |
Set otherCategory to the level of thisCategory . | |
template<class StringType > | |
LevelChange (const StringType &otherCategory, const LevelPtr &level) | |
Set the logger named otherCategory to level . | |
template<class StringType > | |
LevelChange (const StringType &otherCategory, const LoggerPtr &thisCategory) | |
Set the logger named otherCategory to the level of thisCategory . | |
~LevelChange () | |
Restore the verbosity level of the other logger. | |
Changes a verbosity level for the instance variable's lifetime.
Create a LevelChange variable on the stack to temporarily (e.g. for a single method) increase the quantity of information logged.
Typically used to propagate the locally used logger's level (e.g. DEBUG or TRACE) to another named (e.g. the name of the class of the method invoked next) logger.
The LevelChange variable does not need to be removed from the code (e.g. for a release build) as it has no impact when the local and other logger point to the same level (e.g. null_ptr, implying their level is inherited).
|
inline |
Set otherCategory
to level
.
|
inline |
Set otherCategory
to the level of thisCategory
.
|
inline |
Set the logger named otherCategory
to level
.
|
inline |
Set the logger named otherCategory
to the level of thisCategory
.
|
inline |
Restore the verbosity level of the other logger.