Logging Class Reference

Base Class for all Logging classes. More...

#include <ArmarXCore/core/logging/Logging.h>

Inherited by ArmarXGuiApp [virtual], ArmarXMainWindow [virtual], ArmarXManager [virtual], ArmarXMultipleObjectsScheduler [virtual], ArmarXObjectScheduler [virtual], ArmarXWidgetController [virtual], DataView, MemoryViewer, Registry [private], Finder [private], Visu, Visu, Segment, ArticulatedObjectVisu, Decay, RobotHeadMovement, Segment::RobotsCache, SegmentAdapter [virtual], Visu, LinearPredictions, RobotStateWriter, RobotUnitReader, Visu, SegmentBase< SegmentType >, ConditionCheckMagnitudeInRange [private], ConditionCheckMagnitudeLarger [private], ConditionCheckMagnitudeSmaller [private], Bus [virtual], BusErrorHandler, Reporting [virtual], RTUnit [virtual], SlaveInterface, DMPInstance [virtual], DynamicLibrary, EDifferentialIK [virtual], EditorFileOpener, EventSenderComponent [virtual], EventSenderConfigDialog [virtual], IceManager [virtual], LogTable, ManagedIceObject [virtual], MultiDimPIDControllerTemplate< dimensions >, ObjectFinder [private], ParameterMapping [virtual], PIDController, FinderBase< IDType, FinderInfoType >, ArmarXLog, SimMJCF [private], SimulatedWorld, SkillMemoryGUI, Skill, SkillProxy, StateBase [virtual], StatechartManager [virtual], State, StateInstance, StateScene, TermNode, TransitionItem, WeissHapticSensor, FinderBase< std::string, PKDatasetFinderInfo >, FinderBase< std::string, PKFinderInfo >, GridFileManager, MultiDimPIDControllerTemplate< 3 >, MultiDimPIDControllerTemplate<>, RoundRectItem, ScenarioListController, SegmentBase< server::wm::CoreSegment >, SegmentBase< server::wm::ProviderSegment >, ImageViewerArea, and Component [virtual].

Public Member Functions

SpamFilterDataPtr deactivateSpam (float deactivationDurationSec=10.0f, const std::string &identifier="", bool deactivate=true) const
 disables the logging for the current line for the given amount of seconds. More...
 
MessageTypeT getEffectiveLoggingLevel () const
 
 Logging ()
 
void setLocalMinimumLoggingLevel (MessageTypeT level)
 With setLocalMinimumLoggingLevel the minimum verbosity-level of log-messages can be set. More...
 
void setTag (const LogTag &tag)
 
void setTag (const std::string &tagName)
 
virtual ~Logging ()
 

Protected Member Functions

bool checkLogLevel (MessageTypeT level) const
 
const LogSenderPtrgetLogSender () const
 Retrieve log sender. More...
 
LogSenderPtr loghelper (const char *file, int line, const char *function) const
 

Protected Attributes

MessageTypeT minimumLoggingLevel
 
SpamFilterDataPtr spamFilter
 
LogTag tag
 

Detailed Description

Base Class for all Logging classes.

Inherit from this class in order to use ArmarX Logging facitities.

You should call setTag() in the derived class's constructor, otherwise the category string will be empty.

Definition at line 232 of file Logging.h.

Constructor & Destructor Documentation

◆ Logging()

Logging ( )

Definition at line 35 of file Logging.cpp.

◆ ~Logging()

~Logging ( )
virtual

Definition at line 51 of file Logging.cpp.

Member Function Documentation

◆ checkLogLevel()

bool checkLogLevel ( MessageTypeT  level) const
protected

Definition at line 107 of file Logging.cpp.

+ Here is the call graph for this function:

◆ deactivateSpam()

SpamFilterDataPtr deactivateSpam ( float  deactivationDurationSec = 10.0f,
const std::string &  identifier = "",
bool  deactivate = true 
) const

disables the logging for the current line for the given amount of seconds.

Usage:

ARMARX_INFO << deactivateSpam(1) << "My Controller value" << x;
Note
Needs to be called like above. Just calling it has no effect.
Parameters
deactivationDurationSecDuration for which the logging is deactivated.
identifierAdditional log entry identifier. Useful, when having a loop and each iteration should be printed.
deactivateIf true the logging is disabled. If false the logging is immediately enabled.
Returns
Internal datastruct for the logging framework.

Definition at line 92 of file Logging.cpp.

+ Here is the call graph for this function:

◆ getEffectiveLoggingLevel()

MessageTypeT getEffectiveLoggingLevel ( ) const

Definition at line 117 of file Logging.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getLogSender()

const LogSenderPtr & getLogSender ( ) const
protected

Retrieve log sender.

This method is usually called by using one of the loggin macro ARMARX_LOG.

Returns
pointer to the logSender

Definition at line 97 of file Logging.cpp.

◆ loghelper()

LogSenderPtr loghelper ( const char *  file,
int  line,
const char *  function 
) const
protected

Definition at line 102 of file Logging.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setLocalMinimumLoggingLevel()

void setLocalMinimumLoggingLevel ( MessageTypeT  level)

With setLocalMinimumLoggingLevel the minimum verbosity-level of log-messages can be set.

Parameters
levelThe minimum logging level

Definition at line 65 of file Logging.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setTag() [1/2]

void setTag ( const LogTag tag)

Definition at line 55 of file Logging.cpp.

+ Here is the caller graph for this function:

◆ setTag() [2/2]

void setTag ( const std::string &  tagName)

Definition at line 60 of file Logging.cpp.

+ Here is the call graph for this function:

Member Data Documentation

◆ minimumLoggingLevel

MessageTypeT minimumLoggingLevel
protected

Definition at line 272 of file Logging.h.

◆ spamFilter

SpamFilterDataPtr spamFilter
mutableprotected

Definition at line 273 of file Logging.h.

◆ tag

LogTag tag
protected

Definition at line 271 of file Logging.h.


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