ANNA Suite  2020b
Multipurpose development suite for Telco applications
Public Types | Public Member Functions | Friends | List of all members
anna::tracing::Configuration Class Reference

#include <Configuration.hpp>

Inheritance diagram for anna::tracing::Configuration:
Inheritance graph
[legend]
Collaboration diagram for anna::tracing::Configuration:
Collaboration graph
[legend]

Public Types

typedef std::map< anna::RegularExpression, anna::Logger::Leveltrace_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 Public Member Functions inherited from anna::Singleton< Configuration >
static Configurationinstantiate ()
 
static void release ()
 

Detailed Description

Class used for selective tracing configuration

Member Typedef Documentation

◆ trace_trigger_map_t

Member Function Documentation

◆ activateTraceTrigger()

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.

Parameters
triggerString reference for contexts comparison
accumulateBoolean 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.
levelDesired trace level when context fulfill this trigger reference. Debug by default

◆ asString()

std::string anna::tracing::Configuration::asString ( void  ) const

Class string representation

Returns
String with class content

◆ deactivateTraceTrigger()

void anna::tracing::Configuration::deactivateTraceTrigger ( const std::string &  trigger)

Deletes a trigger for selective tracing.

Parameters
triggerString reference to be erased from internal trigger set

◆ readRegexpForTraceTriggers()

bool anna::tracing::Configuration::readRegexpForTraceTriggers ( ) const
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.

Returns
Boolean about if regular expressions interpretation are activated.
93 { return (a_readTraceTriggersAsRegexp); }

◆ resetTraceTriggers()

void anna::tracing::Configuration::resetTraceTriggers ( )
inline

Deletes all added triggers for selective tracing.

60 { a_traceTriggers.clear(); }
Here is the call graph for this function:

◆ useRegexpForTraceTriggers()

void anna::tracing::Configuration::useRegexpForTraceTriggers ( bool  readRegexp = true)
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.

Parameters
readRegexpBoolean for activation/deactivation of regexp funtionality
103 { a_readTraceTriggersAsRegexp = readRegexp; }
Here is the call graph for this function:

Friends And Related Function Documentation

◆ anna::Singleton< Configuration >

friend class anna::Singleton< Configuration >
friend

◆ TraceLevelChecker

friend class TraceLevelChecker
friend

The documentation for this class was generated from the following file: