|
Computer Assited Medical Intervention Tool Kit
version 5.0
|
|
Go to the documentation of this file.
35 class InterfaceLogger;
204 static void setLogger(InterfaceLogger* logger);
207 static InterfaceLogger* getLogger();
216 static InterfaceLogger* applicationLogger;
220 #define CAMITK_PRINT_POINTER(PTR) (QString(#PTR) + QString("->[0x%1]").arg((quintptr)PTR, QT_POINTER_SIZE * 2, 16, QChar('0')))
223 #if !defined(CAMITK_DISABLE_LOG)
224 #define CAMITK_LOG(LEVEL,MSG,SENDER) camitk::Log::getLogger()->log(MSG, LEVEL, __FILE__, Q_FUNC_INFO, __LINE__, SENDER);
225 #define CAMITK_LOG_ALT(LEVEL,MSG) camitk::Log::getLogger()->log(MSG, LEVEL, __FILE__, __func__, __LINE__);
227 #define CAMITK_LOG(LEVEL,MSG,SENDER)
228 #define CAMITK_LOG_ALT(LEVEL,MSG)
233 #define CAMITK_TRACE(MSG) CAMITK_LOG(camitk::InterfaceLogger::TRACE, MSG, this)
234 #define CAMITK_TRACE_ALT(MSG) CAMITK_LOG_ALT(camitk::InterfaceLogger::TRACE, MSG)
238 #define CAMITK_INFO(MSG) CAMITK_LOG(camitk::InterfaceLogger::INFO, MSG, this)
239 #define CAMITK_INFO_ALT(MSG) CAMITK_LOG_ALT(camitk::InterfaceLogger::INFO, MSG)
243 #define CAMITK_WARNING(MSG) CAMITK_LOG(camitk::InterfaceLogger::WARNING, MSG, this)
244 #define CAMITK_WARNING_ALT(MSG) CAMITK_LOG_ALT(camitk::InterfaceLogger::WARNING, MSG)
249 #define CAMITK_WINDOWS_SYSTEM_ERROR_SAFEGUARD ERROR
253 #define CAMITK_ERROR(MSG) CAMITK_LOG(camitk::InterfaceLogger::ERROR, MSG, this)
254 #define CAMITK_ERROR_ALT(MSG) CAMITK_LOG_ALT(camitk::InterfaceLogger::ERROR, MSG)
256 #ifdef CAMITK_WINDOWS_SYSTEM_ERROR_SAFEGUARD
257 #define ERROR CAMITK_WINDOWS_SYSTEM_ERROR_SAFEGUARD
262 #define CAMITK_TRACE_IF(COND, MSG) \
269 #define CAMITK_TRACE_IF_ALT(COND, MSG) \
272 CAMITK_TRACE_ALT(MSG) \
276 #define CAMITK_INFO_IF(COND, MSG) \
283 #define CAMITK_INFO_IF_ALT(COND, MSG) \
286 CAMITK_INFO_ALT(MSG) \
290 #define CAMITK_WARNING_IF(COND, MSG) \
293 CAMITK_WARNING(MSG) \
297 #define CAMITK_WARNING_IF_ALT(COND, MSG) \
300 CAMITK_WARNING_ALT(MSG) \
304 #define CAMITK_ERROR_IF(COND, MSG) \
311 #define CAMITK_ERROR_IF_ALT(COND, MSG) \
314 CAMITK_ERROR_ALT(MSG) \
@ NONE
No message is logged.
Definition: InterfaceLogger.h:61
static void setLogger(InterfaceLogger *logger)
set the application logger and delete the previous logger Call this method transfers the logger insta...
Definition: Log.cpp:59
@ ERROR
Only error messages are logged.
Definition: InterfaceLogger.h:62
static InterfaceLogger * getLogger()
get the current application logger
Definition: Log.cpp:73
@ INFO
information, warning and error messages are logged
Definition: InterfaceLogger.h:64
LogLevel
Definition: InterfaceLogger.h:60
static InterfaceLogger::LogLevel getLevelFromString(QString levelString)
get the enum value from the text
Definition: Log.cpp:109
@ WARNING
Only Warning and Error messages are logged.
Definition: InterfaceLogger.h:63
static QString getLevelAsString(InterfaceLogger::LogLevel level)
get the enum value as a text
Definition: Log.cpp:82
@ TRACE
all types of messages are logged
Definition: InterfaceLogger.h:65
#define CAMITK_API
Definition: CamiTKAPI.h:49
Definition: Action.cpp:35
static InterfaceLogger * applicationLogger
Global Logger manager.
Definition: Log.h:239