Luiza
v03-01
|
#include <logscope.h>
Public Member Functions | |
logscope (logstream &ls) | |
~logscope () | |
void | setName (const std::string name) |
template<class T > | |
void | setLevel () |
void | setLevel (const std::string &level) |
Helper class to change the current scope name and log level - if the object goes out of scope, e.g. at the end of the method where it is instantiated scope name and log level will be reset to the values they had previously, i.e. before changed through this object.
Example:
streamlog::logscope scope( streamlog::out ) ; scope.setName( "TrackFitter" ) ; scope.setLevel< streamlog::MESSAGE3 >() ;
|
inline |
Instantiate a scope object for the given logstream.
|
inline |
Reset old name and level if set through this object.
References streamlog::logstream::prefix(), and streamlog::logstream::setLevel().
|
inline |
Change current log level for the lifetime of this object
References streamlog::logstream::setLevel().
Referenced by luiza::ProcessorMgr::concludeAnalysis(), luiza::ProcessorMgr::end(), luiza::ProcessorMgr::init(), luiza::ProcessorMgr::processData(), and luiza::ProcessorMgr::startAnalysis().
|
inline |
Change current log level for the lifetime of this object through a string level name that has been registered with the logstream via logstream::addLevelName - otherwise the call will have no effect.
References streamlog::logstream::setLevel().
|
inline |
Change current log scope name for the lifetime of this object
References streamlog::logstream::prefix().
Referenced by luiza::ProcessorMgr::concludeAnalysis(), luiza::ProcessorMgr::end(), luiza::ProcessorMgr::init(), luiza::ProcessorMgr::processData(), and luiza::ProcessorMgr::startAnalysis().