ANNA Suite
2020b
Multipurpose development suite for Telco applications
|
#include <Configuration.hpp>
Public Types | |
typedef std::map< anna::RegularExpression, anna::Logger::Level > | trace_trigger_map_t |
Public Member Functions | |
void | resetTraceTriggers () |
void | activateTraceTrigger (const std::string &trigger, bool accumulate=false, anna::Logger::Level level=anna::Logger::Debug) |
void | deactivateTraceTrigger (const std::string &trigger) |
bool | readRegexpForTraceTriggers () const |
void | useRegexpForTraceTriggers (bool readRegexp=true) |
std::string | asString (void) const |
Friends | |
class | anna::Singleton< Configuration > |
class | TraceLevelChecker |
Additional Inherited Members | |
![]() | |
static Configuration & | instantiate () |
static void | release () |
Class used for selective tracing configuration
typedef std::map<anna::RegularExpression, anna::Logger::Level> anna::tracing::Configuration::trace_trigger_map_t |
void anna::tracing::Configuration::activateTraceTrigger | ( | const std::string & | trigger, |
bool | accumulate = false , |
||
anna::Logger::Level | level = anna::Logger::Debug |
||
) |
Activates a trigger for selective tracing. The normal way is to activate only one (usually applications register MSISDN, but we prefer the name 'trigger' because selective tracing capabilities are generalized for any context data we want to detect). Anyway, it is possible to add several string references for multiple context log activation.
trigger | String reference for contexts comparison |
accumulate | Boolean for trigger filter accumulation over internal set. I.e., application could test any MSISDN within a configured set. False by default, means activation for only one trigger reference. |
level | Desired trace level when context fulfill this trigger reference. Debug by default |
std::string anna::tracing::Configuration::asString | ( | void | ) | const |
Class string representation
void anna::tracing::Configuration::deactivateTraceTrigger | ( | const std::string & | trigger | ) |
Deletes a trigger for selective tracing.
trigger | String reference to be erased from internal trigger set |
|
inline |
Interpret all trace triggers as regular expressions. Is used from TraceLevelChecker to provide strict or regexp-based checkings. If not configured, regexp is disabled.
|
inline |
|
inline |
Configure all trace triggers to be interpreted as regular expressions. Application can set this depending on trace filtering needs. If not configured, regexp is disabled for TraceLevelChecker.
readRegexp | Boolean for activation/deactivation of regexp funtionality |
|
friend |
|
friend |