Computer Assited Medical Intervention Tool Kit  version 4.1
Classes | Namespaces | Macros
Log.h File Reference
#include "CamiTKAPI.h"
#include "InterfaceLogger.h"

Go to the source code of this file.

Classes

class  camitk::Log
 This class is a log utility. More...
 

Namespaces

 camitk
 

Macros

#define CAMITK_ERROR(MSG)   CAMITK_LOG(camitk::InterfaceLogger::ERROR, MSG, this)
 Log for error verbosity (the minimum verbosity) Will always appear. More...
 
#define CAMITK_ERROR_ALT(MSG)   CAMITK_LOG_ALT(camitk::InterfaceLogger::ERROR, MSG)
 
#define CAMITK_ERROR_IF(COND, MSG)
 
#define CAMITK_ERROR_IF_ALT(COND, MSG)
 
#define CAMITK_INFO(MSG)   CAMITK_LOG(camitk::InterfaceLogger::INFO, MSG, this)
 Log for info verbosity (the second most verbose one) The msg will appear only if the user asked for INFO verbosity. More...
 
#define CAMITK_INFO_ALT(MSG)   CAMITK_LOG_ALT(camitk::InterfaceLogger::INFO, MSG)
 
#define CAMITK_INFO_IF(COND, MSG)
 
#define CAMITK_INFO_IF_ALT(COND, MSG)
 
#define CAMITK_LOG(LEVEL, MSG, SENDER)   camitk::Log::getLogger()->log(MSG, LEVEL, __FILE__, Q_FUNC_INFO, __LINE__, SENDER);
 
#define CAMITK_LOG_ALT(LEVEL, MSG)   camitk::Log::getLogger()->log(MSG, LEVEL, __FILE__, __func__, __LINE__);
 
#define CAMITK_TRACE(MSG)   CAMITK_LOG(camitk::InterfaceLogger::TRACE, MSG, this)
 Log for trace verbosity (the most verbose one, should be used for bug report) The msg will appear only if the user asked for TRACE verbosity. More...
 
#define CAMITK_TRACE_ALT(MSG)   CAMITK_LOG_ALT(camitk::InterfaceLogger::TRACE, MSG)
 
#define CAMITK_TRACE_IF(COND, MSG)
 The LOG_VERBOSITY_IF Macros are triggered only if the given condition is true. More...
 
#define CAMITK_TRACE_IF_ALT(COND, MSG)
 
#define CAMITK_WARNING(MSG)   CAMITK_LOG(camitk::InterfaceLogger::WARNING, MSG, this)
 Log for warning verbosity (the most common one) Will appear by default. More...
 
#define CAMITK_WARNING_ALT(MSG)   CAMITK_LOG_ALT(camitk::InterfaceLogger::WARNING, MSG)
 
#define CAMITK_WARNING_IF(COND, MSG)
 
#define CAMITK_WARNING_IF_ALT(COND, MSG)
 

Macro Definition Documentation

◆ CAMITK_ERROR

#define CAMITK_ERROR (   MSG)    CAMITK_LOG(camitk::InterfaceLogger::ERROR, MSG, this)

Log for error verbosity (the minimum verbosity) Will always appear.

Referenced by ComputeCurvatures::apply(), SetPathToTestData::apply(), OpenAction::apply(), RemoveLastInstanciatedAction::apply(), GridTopology::apply(), SelectLastInstanciatedAction::apply(), CenterMesh::apply(), SaveActionState::applyAction(), ActionStateMachine::checkSCXMLFile(), MeshQuality::computeMeasure(), ActionStateMachine::createAllActionStates(), ActionStateMachine::createTransitions(), DicomComponent::DicomComponent(), LoggerParameters::errorButtonClicked(), ImageLutWidget::fillHistogramTable(), camitk::Component::getChildrenFrame(), camitk::Component::getFrameName(), MeshQuality::getQualityColor(), camitk::Component::getRepresentation(), camitk::Component::getTransform(), camitk::Component::getTransformFromFrame(), camitk::Component::getTransformFromWorld(), SimulationDialog::getWidget(), ImpMainWindow::initActions(), VolumeRenderingWidget::load(), camitk::Application::notify(), camitk::SettingsDialog::on_addActionExtensionButton_released(), ItkImageComponentExtension::open(), PMLComponent::parseMultiComponent(), SaveDisplacementFromTransformation::process(), VtkImageComponent::readMetaImageTransformMatrix(), ItkImageComponent::readVolume(), ObjExtension::save(), OffExtension::save(), VolumeRenderingWidget::save(), PMLComponent::selectCell(), ActionStateMachine::setCamiTKAction(), ActionStateMachine::setCamiTKSaveAction(), camitk::Application::setMainWindow(), and camitk::Component::setParentFrame().

◆ CAMITK_ERROR_ALT

#define CAMITK_ERROR_ALT (   MSG)    CAMITK_LOG_ALT(camitk::InterfaceLogger::ERROR, MSG)

◆ CAMITK_ERROR_IF

#define CAMITK_ERROR_IF (   COND,
  MSG 
)
Value:
{ \
if (((COND))) { \
CAMITK_ERROR(MSG) \
} \
}

Referenced by DicomComponent::readDirectCosinesAngle().

◆ CAMITK_ERROR_IF_ALT

#define CAMITK_ERROR_IF_ALT (   COND,
  MSG 
)
Value:
{ \
if (((COND))) { \
CAMITK_ERROR_ALT(MSG) \
} \
}

◆ CAMITK_INFO

#define CAMITK_INFO (   MSG)    CAMITK_LOG(camitk::InterfaceLogger::INFO, MSG, this)

◆ CAMITK_INFO_ALT

#define CAMITK_INFO_ALT (   MSG)    CAMITK_LOG_ALT(camitk::InterfaceLogger::INFO, MSG)

◆ CAMITK_INFO_IF

#define CAMITK_INFO_IF (   COND,
  MSG 
)
Value:
{ \
if (((COND))) { \
CAMITK_INFO(MSG) \
} \
}

◆ CAMITK_INFO_IF_ALT

#define CAMITK_INFO_IF_ALT (   COND,
  MSG 
)
Value:
{ \
if (((COND))) { \
CAMITK_INFO_ALT(MSG) \
} \
}

◆ CAMITK_LOG

#define CAMITK_LOG (   LEVEL,
  MSG,
  SENDER 
)    camitk::Log::getLogger()->log(MSG, LEVEL, __FILE__, Q_FUNC_INFO, __LINE__, SENDER);

◆ CAMITK_LOG_ALT

#define CAMITK_LOG_ALT (   LEVEL,
  MSG 
)    camitk::Log::getLogger()->log(MSG, LEVEL, __FILE__, __func__, __LINE__);

◆ CAMITK_TRACE

#define CAMITK_TRACE (   MSG)    CAMITK_LOG(camitk::InterfaceLogger::TRACE, MSG, this)

◆ CAMITK_TRACE_ALT

#define CAMITK_TRACE_ALT (   MSG)    CAMITK_LOG_ALT(camitk::InterfaceLogger::TRACE, MSG)

◆ CAMITK_TRACE_IF

#define CAMITK_TRACE_IF (   COND,
  MSG 
)
Value:
{ \
if (((COND))) { \
CAMITK_TRACE(MSG) \
} \
}

The LOG_VERBOSITY_IF Macros are triggered only if the given condition is true.

This allow to log only if something unexpected happens

◆ CAMITK_TRACE_IF_ALT

#define CAMITK_TRACE_IF_ALT (   COND,
  MSG 
)
Value:
{ \
if (((COND))) { \
CAMITK_TRACE_ALT(MSG) \
} \
}

◆ CAMITK_WARNING

#define CAMITK_WARNING (   MSG)    CAMITK_LOG(camitk::InterfaceLogger::WARNING, MSG, this)

◆ CAMITK_WARNING_ALT

#define CAMITK_WARNING_ALT (   MSG)    CAMITK_LOG_ALT(camitk::InterfaceLogger::WARNING, MSG)

◆ CAMITK_WARNING_IF

#define CAMITK_WARNING_IF (   COND,
  MSG 
)
Value:
{ \
if (((COND))) { \
CAMITK_WARNING(MSG) \
} \
}

◆ CAMITK_WARNING_IF_ALT

#define CAMITK_WARNING_IF_ALT (   COND,
  MSG 
)
Value:
{ \
if (((COND))) { \
CAMITK_WARNING_ALT(MSG) \
} \
}

Referenced by camitk::Application::open().