16 #include "cxResourceExport.h"
19 #include "boost/shared_ptr.hpp"
41 MessageLogger(
const char *file,
int line,
const char *
function,
const QString& channel, MESSAGE_LEVEL severity);
50 this->getStream() << value;
55 boost::shared_ptr<class MessageLoggerInternalData> mInternalData;
56 std::stringstream& getStream();
67 cxResource_EXPORT
void report(QString msg);
76 #define CX_LOG_SEVERITY_INTERNAL(severity) \
77 cx::MessageLogger(__FILE__, __LINE__, Q_FUNC_INFO, "console", severity)
79 #define CX_LOG_CHANNEL_SEVERITY_INTERNAL(channel, severity) \
80 cx::MessageLogger(__FILE__, __LINE__, Q_FUNC_INFO, channel, severity)
88 #define CX_LOG_DEBUG_CHECKPOINT() CX_LOG_CHANNEL_SEVERITY_INTERNAL("checkpoints", cx::mlDEBUG).logger() << "CHECKPOINT: " << __FILE__ << " at " << __LINE__ << " in " << Q_FUNC_INFO << " : "
95 #define CX_LOG_DEBUG CX_LOG_SEVERITY_INTERNAL(cx::mlDEBUG).logger
96 #define CX_LOG_INFO CX_LOG_SEVERITY_INTERNAL(cx::mlINFO).logger
97 #define CX_LOG_SUCCESS CX_LOG_SEVERITY_INTERNAL(cx::mlSUCCESS).logger
98 #define CX_LOG_WARNING CX_LOG_SEVERITY_INTERNAL(cx::mlWARNING).logger
99 #define CX_LOG_ERROR CX_LOG_SEVERITY_INTERNAL(cx::mlERROR).logger
100 #define CX_LOG_VOLATILE CX_LOG_SEVERITY_INTERNAL(cx::mlVOLATILE).logger
107 #define CX_LOG_CHANNEL_DEBUG(channel) CX_LOG_CHANNEL_SEVERITY_INTERNAL(channel, cx::mlDEBUG).logger()
108 #define CX_LOG_CHANNEL_INFO(channel) CX_LOG_CHANNEL_SEVERITY_INTERNAL(channel, cx::mlINFO).logger()
109 #define CX_LOG_CHANNEL_SUCCESS(channel) CX_LOG_CHANNEL_SEVERITY_INTERNAL(channel, cx::mlSUCCESS).logger()
110 #define CX_LOG_CHANNEL_WARNING(channel) CX_LOG_CHANNEL_SEVERITY_INTERNAL(channel, cx::mlWARNING).logger()
111 #define CX_LOG_CHANNEL_ERROR(channel) CX_LOG_CHANNEL_SEVERITY_INTERNAL(channel, cx::mlERROR).logger()
112 #define CX_LOG_CHANNEL_VOLATILE(channel) CX_LOG_CHANNEL_SEVERITY_INTERNAL(channel, cx::mlVOLATILE).logger()
116 #define CX_ASSERT(statement) \
120 CX_LOG_ERROR("Assert failure!");\