Computer Assited Medical Intervention Tool Kit  version 4.0
Classes | Namespaces | Macros
Log.h File Reference
#include "CamiTKAPI.h"
#include <stdlib.h>
#include <QDateTime>

Go to the source code of this file.

Classes

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

Namespaces

 camitk
 

Macros

#define CAMITK_DEBUG(CLASSNAME, METHODNAME, MSG)   ;
 
#define CAMITK_ERROR(CLASSNAME, METHODNAME, MSG)   Log("ERROR", CLASSNAME, METHODNAME, MSG)
 
#define CAMITK_ERROR_IF(B, CLASSNAME, METHODNAME, MSG)
 
#define CAMITK_INFO(CLASSNAME, METHODNAME, MSG)   Log("INFO", CLASSNAME, METHODNAME, MSG)
 
#define CAMITK_INFO_IF(B, CLASSNAME, METHODNAME, MSG)
 
#define CAMITK_WARNING(CLASSNAME, METHODNAME, MSG)   ;
 
#define Log(TYPE, CLASSNAME, METHODNAME, MSG)
 log macro More...
 

Macro Definition Documentation

◆ CAMITK_DEBUG

#define CAMITK_DEBUG (   CLASSNAME,
  METHODNAME,
  MSG 
)    ;

◆ CAMITK_ERROR

#define CAMITK_ERROR (   CLASSNAME,
  METHODNAME,
  MSG 
)    Log("ERROR", CLASSNAME, METHODNAME, MSG)

◆ CAMITK_ERROR_IF

#define CAMITK_ERROR_IF (   B,
  CLASSNAME,
  METHODNAME,
  MSG 
)
Value:
{ \
if ((B)) { \
CAMITK_ERROR(CLASSNAME, METHODNAME, MSG) \
} \
}

◆ CAMITK_INFO

#define CAMITK_INFO (   CLASSNAME,
  METHODNAME,
  MSG 
)    Log("INFO", CLASSNAME, METHODNAME, MSG)

◆ CAMITK_INFO_IF

#define CAMITK_INFO_IF (   B,
  CLASSNAME,
  METHODNAME,
  MSG 
)
Value:
{ \
if (((B))) { \
CAMITK_INFO(CLASSNAME, METHODNAME, MSG) \
} \
}

◆ CAMITK_WARNING

#define CAMITK_WARNING (   CLASSNAME,
  METHODNAME,
  MSG 
)    ;

◆ Log

#define Log (   TYPE,
  CLASSNAME,
  METHODNAME,
  MSG 
)
Value:
{ \
(*camitk::Log::getLogStream()) << (TYPE); \
} \
(*camitk::Log::getLogStream()) << " " << QDateTime::currentDateTime().toString(Qt::ISODate).toStdString(); \
} \
(*camitk::Log::getLogStream()) << " | " << (CLASSNAME) << "::" << (METHODNAME) << std::endl; \
(*camitk::Log::getLogStream()) << MSG << std::endl; \
(*camitk::Log::getLogStream()) << "-----------------------------" << std::endl; \
}
static bool getShowUser()
get the status of show user information
Definition: Log.cpp:61
static bool getShowTime()
get show time information
Definition: Log.cpp:51
static std::string getUserInformation()
get the user information
Definition: Log.cpp:66
static std::ostream * getLogStream()
get the logFile (singleton)
Definition: Log.cpp:89

log macro