37 #include "cxResourceExport.h"
40 #include "boost/shared_ptr.hpp"
62 MessageLogger(
const char *file,
int line,
const char *
function,
const QString& channel, MESSAGE_LEVEL severity);
71 this->getStream() << value;
76 boost::shared_ptr<class MessageLoggerInternalData> mInternalData;
77 std::stringstream& getStream();
88 cxResource_EXPORT
void report(QString msg);
97 #define CX_LOG_SEVERITY_INTERNAL(severity) \
98 cx::MessageLogger(__FILE__, __LINE__, Q_FUNC_INFO, "console", severity)
100 #define CX_LOG_CHANNEL_SEVERITY_INTERNAL(channel, severity) \
101 cx::MessageLogger(__FILE__, __LINE__, Q_FUNC_INFO, channel, severity)
110 #define CX_LOG_DEBUG CX_LOG_SEVERITY_INTERNAL(cx::mlDEBUG).logger
111 #define CX_LOG_INFO CX_LOG_SEVERITY_INTERNAL(cx::mlINFO).logger
112 #define CX_LOG_SUCCESS CX_LOG_SEVERITY_INTERNAL(cx::mlSUCCESS).logger
113 #define CX_LOG_WARNING CX_LOG_SEVERITY_INTERNAL(cx::mlWARNING).logger
114 #define CX_LOG_ERROR CX_LOG_SEVERITY_INTERNAL(cx::mlERROR).logger
115 #define CX_LOG_VOLATILE CX_LOG_SEVERITY_INTERNAL(cx::mlVOLATILE).logger
122 #define CX_LOG_CHANNEL_DEBUG(channel) CX_LOG_CHANNEL_SEVERITY_INTERNAL(channel, cx::mlDEBUG).logger()
123 #define CX_LOG_CHANNEL_INFO(channel) CX_LOG_CHANNEL_SEVERITY_INTERNAL(channel, cx::mlINFO).logger()
124 #define CX_LOG_CHANNEL_SUCCESS(channel) CX_LOG_CHANNEL_SEVERITY_INTERNAL(channel, cx::mlSUCCESS).logger()
125 #define CX_LOG_CHANNEL_WARNING(channel) CX_LOG_CHANNEL_SEVERITY_INTERNAL(channel, cx::mlWARNING).logger()
126 #define CX_LOG_CHANNEL_ERROR(channel) CX_LOG_CHANNEL_SEVERITY_INTERNAL(channel, cx::mlERROR).logger()
127 #define CX_LOG_CHANNEL_VOLATILE(channel) CX_LOG_CHANNEL_SEVERITY_INTERNAL(channel, cx::mlVOLATILE).logger()
131 #define CX_ASSERT(statement) \
135 CX_LOG_ERROR("Assert failure!");\
void reportError(QString msg)
void reportVolatile(QString msg)
void reportWarning(QString msg)
MessageLogger & operator<<(T value)
void reportSuccess(QString msg)
void reportDebug(QString msg)