Computer Assisted Medical Intervention Tool Kit  version 6.0
Loading...
Searching...
No Matches
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

namespace  camitk

Macros

#define CAMITK_ERROR(MSG)
 Log for error verbosity (the minimum verbosity) Will always appear.
#define CAMITK_ERROR_ALT(MSG)
#define CAMITK_ERROR_IF(COND, MSG)
#define CAMITK_ERROR_IF_ALT(COND, MSG)
#define CAMITK_INFO(MSG)
 Log for info verbosity (the second most verbose one) The msg will appear only if the user asked for INFO verbosity.
#define CAMITK_INFO_ALT(MSG)
#define CAMITK_INFO_IF(COND, MSG)
#define CAMITK_INFO_IF_ALT(COND, MSG)
#define CAMITK_LOG(LEVEL, MSG, SENDER)
 Generic log macro (it is NOT recommended to use it directly...).
#define CAMITK_LOG_ALT(LEVEL, MSG)
#define CAMITK_PRINT_POINTER(PTR)
 Helper macro that produce a QString representing a pointer.
#define CAMITK_TRACE(MSG)
 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.
#define CAMITK_TRACE_ALT(MSG)
#define CAMITK_TRACE_IF(COND, MSG)
 The LOG_VERBOSITY_IF Macros are triggered only if the given condition is true.
#define CAMITK_TRACE_IF_ALT(COND, MSG)
#define CAMITK_WARNING(MSG)
 Log for warning verbosity (the most common one) Will appear by default.
#define CAMITK_WARNING_ALT(MSG)
#define CAMITK_WARNING_IF(COND, MSG)
#define CAMITK_WARNING_IF_ALT(COND, MSG)

Macro Definition Documentation

◆ CAMITK_ERROR

#define CAMITK_ERROR ( MSG)

◆ CAMITK_ERROR_ALT

◆ CAMITK_ERROR_IF

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

◆ CAMITK_ERROR_IF_ALT

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

◆ CAMITK_INFO

◆ CAMITK_INFO_ALT

◆ 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 )
Value:
camitk::Log::getLogger()->log(MSG, LEVEL, __FILE__, Q_FUNC_INFO, __LINE__, SENDER);
virtual QString log(const QString msg, const LogLevel level, char const *fileName, char const *methodName, int lineNumber, const QObject *sender=nullptr)=0
Log a message: If the logger is allowed to write on standard output, it will display the message (and...
static InterfaceLogger * getLogger()
get the current application logger
Definition Log.cpp:50

Generic log macro (it is NOT recommended to use it directly...).

◆ CAMITK_LOG_ALT

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

◆ CAMITK_PRINT_POINTER

#define CAMITK_PRINT_POINTER ( PTR)
Value:
(QString(#PTR) + QString("->[0x%1]").arg((quintptr)PTR, QT_POINTER_SIZE * 2, 16, QChar('0')))

Helper macro that produce a QString representing a pointer.

◆ CAMITK_TRACE

◆ CAMITK_TRACE_ALT

◆ 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)
Value:
@ WARNING
Only Warning and Error messages are logged.
Definition InterfaceLogger.h:63

Log for warning verbosity (the most common one) Will appear by default.

Referenced by AppendMeshes::apply(), ChangeLanguage::apply(), ComputeCurvatures::apply(), ComputeNormals::apply(), ExportAsMDL::apply(), ExtractSelection::apply(), FillWithPoints::apply(), GenerateModel::apply(), ICPRegistration::apply(), LoadTransformation::apply(), MergeMeshes::apply(), OpenFile::apply(), OpenWorkspaceFile::apply(), PixelColorChanger::apply(), RegionGrowing::apply(), ReorientImage::apply(), RigidTransform::apply(), SaveAction::apply(), SaveAllAction::apply(), SaveAsAction::apply(), SimpleElastixRegistrationAction::apply(), VolumeRenderingAction::apply(), WarpOut::apply(), DicomComponent::DicomComponent(), camitk::Action::getParameterValue(), camitk::Component::getPropertyValue(), AnglesAndTranslationAction::getWidget(), ImageLutAction::getWidget(), MeshProjection::getWidget(), QtPropertyFieldEditor::getWidget(), SimpleElastixRegistrationAction::getWidget(), MultiPickingWidget::manuallyModified(), MMLComponent::MMLComponent(), camitk::MeshComponent::removeSelectedData(), camitk::ComponentExtension::save(), MshExtension::save(), ObjExtension::save(), OffExtension::save(), VtkImageComponentExtension::save(), CamiTKExtensionEditor::saveClicked(), camitk::Action::setParameterValue(), camitk::Component::setPropertyValue(), camitk::SingleImageComponent::setSelected(), ImpMainWindow::toggleMenuBar(), camitk::Action::trigger(), camitk::CppHotPlugAction::update(), and LoggerParameters::warningButtonClicked().

◆ CAMITK_WARNING_ALT

◆ CAMITK_WARNING_IF

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

Referenced by camitk::RendererWidget::screenshot().

◆ CAMITK_WARNING_IF_ALT

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

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