CustusX  20.03-rc1
An IGT application

Logging of status, errors, debug to console and file. More...

Namespaces

 cx
 Namespace for all CustusX production code.
 

Classes

class  cx::Audio
 Interface for playing sounds. More...
 
class  cx::MessageListener
 
class  cx::MessageRepository
 

Macros

#define CX_LOG_SEVERITY_INTERNAL(severity)   cx::MessageLogger(__FILE__, __LINE__, Q_FUNC_INFO, "console", severity)
 
#define CX_LOG_CHANNEL_SEVERITY_INTERNAL(channel, severity)   cx::MessageLogger(__FILE__, __LINE__, Q_FUNC_INFO, channel, severity)
 
#define CX_LOG_DEBUG_CHECKPOINT()   CX_LOG_CHANNEL_SEVERITY_INTERNAL("checkpoints", cx::mlDEBUG).logger() << "CHECKPOINT: " << __FILE__ << " at " << __LINE__ << " in " << Q_FUNC_INFO << " : "
 
#define CX_LOG_DEBUG   CX_LOG_SEVERITY_INTERNAL(cx::mlDEBUG).logger
 
#define CX_LOG_INFO   CX_LOG_SEVERITY_INTERNAL(cx::mlINFO).logger
 
#define CX_LOG_SUCCESS   CX_LOG_SEVERITY_INTERNAL(cx::mlSUCCESS).logger
 
#define CX_LOG_WARNING   CX_LOG_SEVERITY_INTERNAL(cx::mlWARNING).logger
 
#define CX_LOG_ERROR   CX_LOG_SEVERITY_INTERNAL(cx::mlERROR).logger
 
#define CX_LOG_VOLATILE   CX_LOG_SEVERITY_INTERNAL(cx::mlVOLATILE).logger
 
#define CX_LOG_CHANNEL_DEBUG(channel)   CX_LOG_CHANNEL_SEVERITY_INTERNAL(channel, cx::mlDEBUG).logger()
 
#define CX_LOG_CHANNEL_INFO(channel)   CX_LOG_CHANNEL_SEVERITY_INTERNAL(channel, cx::mlINFO).logger()
 
#define CX_LOG_CHANNEL_SUCCESS(channel)   CX_LOG_CHANNEL_SEVERITY_INTERNAL(channel, cx::mlSUCCESS).logger()
 
#define CX_LOG_CHANNEL_WARNING(channel)   CX_LOG_CHANNEL_SEVERITY_INTERNAL(channel, cx::mlWARNING).logger()
 
#define CX_LOG_CHANNEL_ERROR(channel)   CX_LOG_CHANNEL_SEVERITY_INTERNAL(channel, cx::mlERROR).logger()
 
#define CX_LOG_CHANNEL_VOLATILE(channel)   CX_LOG_CHANNEL_SEVERITY_INTERNAL(channel, cx::mlVOLATILE).logger()
 
#define CX_ASSERT(statement)
 

Typedefs

typedef cx::Message Message
 

Functions

 Q_DECLARE_METATYPE (Message)
 

Detailed Description

Logging of status, errors, debug to console and file.

Thread for log handling. Used inside Reporter.

Thread for log handling. Used inside LogFileWatcher.

Log file, format, read and write.

Logging service.

A representation of a Reporter message.

Author
Christian Askeland, SINTEF
Date
2014-12-28
Author
Janne Beate Lervik Bakeng, SINTEF
Date
24.08.2010
See also
Reporter

Send info in different error levels, and route them to file, or to a console via qt signals. Use the class ConsoleWidget for this. Reporter also captures cout and cerr.

Use the MessageListener to catch emitted log messages.

Author
Janne Beate Lervik Bakeng, SINTEF
Christian Askeland, SINTEF
Date
16.10.2008

Call methods in the object's thread, via the thread message queue.

Thread for log handling. Used inside Log.

Macro Definition Documentation

#define CX_ASSERT (   statement)
Value:
{ \
if (!(statement)) \
{ \
CX_LOG_ERROR("Assert failure!");\
} \
}
#define CX_LOG_ERROR
Definition: cxLogger.h:99

Definition at line 116 of file cxLogger.h.

#define CX_LOG_CHANNEL_DEBUG (   channel)    CX_LOG_CHANNEL_SEVERITY_INTERNAL(channel, cx::mlDEBUG).logger()

Log to a named channel Usage: CX_LOG_CHANNEL_INFO("channel_name") << "Message " << "to output"; Will be written to the file channel_name.txt

Definition at line 107 of file cxLogger.h.

#define CX_LOG_CHANNEL_ERROR (   channel)    CX_LOG_CHANNEL_SEVERITY_INTERNAL(channel, cx::mlERROR).logger()

Definition at line 111 of file cxLogger.h.

#define CX_LOG_CHANNEL_INFO (   channel)    CX_LOG_CHANNEL_SEVERITY_INTERNAL(channel, cx::mlINFO).logger()

Definition at line 108 of file cxLogger.h.

#define CX_LOG_CHANNEL_SEVERITY_INTERNAL (   channel,
  severity 
)    cx::MessageLogger(__FILE__, __LINE__, Q_FUNC_INFO, channel, severity)

Definition at line 79 of file cxLogger.h.

#define CX_LOG_CHANNEL_SUCCESS (   channel)    CX_LOG_CHANNEL_SEVERITY_INTERNAL(channel, cx::mlSUCCESS).logger()

Definition at line 109 of file cxLogger.h.

#define CX_LOG_CHANNEL_VOLATILE (   channel)    CX_LOG_CHANNEL_SEVERITY_INTERNAL(channel, cx::mlVOLATILE).logger()

Definition at line 112 of file cxLogger.h.

#define CX_LOG_CHANNEL_WARNING (   channel)    CX_LOG_CHANNEL_SEVERITY_INTERNAL(channel, cx::mlWARNING).logger()

Definition at line 110 of file cxLogger.h.

#define CX_LOG_DEBUG   CX_LOG_SEVERITY_INTERNAL(cx::mlDEBUG).logger

Log to the default channel Usage: One of the following: CX_LOG_INFO("Message to output"); CX_LOG_INFO() << "Message " << "to output";

Definition at line 95 of file cxLogger.h.

#define CX_LOG_DEBUG_CHECKPOINT ( )    CX_LOG_CHANNEL_SEVERITY_INTERNAL("checkpoints", cx::mlDEBUG).logger() << "CHECKPOINT: " << __FILE__ << " at " << __LINE__ << " in " << Q_FUNC_INFO << " : "

Macro for creating debug marks in the code. Usage: One of the following: CX_LOG_DEBUG_CHECKPOINT(); CX_LOG_DEBUG_CHECKPOINT() << "Message " << "to output";

Definition at line 88 of file cxLogger.h.

#define CX_LOG_ERROR   CX_LOG_SEVERITY_INTERNAL(cx::mlERROR).logger

Definition at line 99 of file cxLogger.h.

#define CX_LOG_INFO   CX_LOG_SEVERITY_INTERNAL(cx::mlINFO).logger

Definition at line 96 of file cxLogger.h.

#define CX_LOG_SEVERITY_INTERNAL (   severity)    cx::MessageLogger(__FILE__, __LINE__, Q_FUNC_INFO, "console", severity)

Definition at line 76 of file cxLogger.h.

#define CX_LOG_SUCCESS   CX_LOG_SEVERITY_INTERNAL(cx::mlSUCCESS).logger

Definition at line 97 of file cxLogger.h.

#define CX_LOG_VOLATILE   CX_LOG_SEVERITY_INTERNAL(cx::mlVOLATILE).logger

Definition at line 100 of file cxLogger.h.

#define CX_LOG_WARNING   CX_LOG_SEVERITY_INTERNAL(cx::mlWARNING).logger

Definition at line 98 of file cxLogger.h.

Typedef Documentation

Definition at line 86 of file cxLogMessage.h.

Function Documentation

Q_DECLARE_METATYPE ( Message  )