00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00027
00028 #ifndef ICL_CORE_LOGGING_LOGGING_MACROS__MLOGGING_H_INCLUDED
00029 #define ICL_CORE_LOGGING_LOGGING_MACROS__MLOGGING_H_INCLUDED
00030
00031 #include "icl_core_logging/LoggingMacros_SLOGGING.h"
00032
00033 #define MLOGGING_LOG_FLCO(streamname, level, filename, line, classname, objectname, arg) \
00034 do { \
00035 if (Debug()) \
00036 { \
00037 ::icl_core::logging::LogStream& stream = streamname::instance(); \
00038 SLOGGING_LOG_FLCO(stream, level, filename, line, classname, objectname, arg); \
00039 } \
00040 } while (0)
00041 #define MLOGGING_LOG_COF(streamname, level, classname, objectname, function, arg) MLOGGING_LOG_FLCO(streamname, level, __FILE__, __LINE__, #classname, objectname, arg)
00042 #define MLOGGING_LOG_C(streamname, level, classname, arg) MLOGGING_LOG_FLCO(streamname, level, __FILE__, __LINE__, #classname, "", arg)
00043 #define MLOGGING_LOG(streamname, level, arg) MLOGGING_LOG_FLCO(streamname, level, __FILE__, __LINE__, "", "", arg)
00044
00045
00046 #define MLOGGING_ERROR(streamname, arg) MLOGGING_LOG(streamname, ::icl_core::logging::eLL_ERROR, arg)
00047 #define MLOGGING_WARNING(streamname, arg) MLOGGING_LOG(streamname, ::icl_core::logging::eLL_WARNING, arg)
00048 #define MLOGGING_INFO(streamname, arg) MLOGGING_LOG(streamname, ::icl_core::logging::eLL_INFO, arg)
00049 #ifdef _IC_DEBUG_
00050 # define MLOGGING_DEBUG(streamname, arg) MLOGGING_LOG(streamname, ::icl_core::logging::eLL_DEBUG, arg)
00051 # define MLOGGING_TRACE(streamname, arg) MLOGGING_LOG(streamname, ::icl_core::logging::eLL_TRACE, arg)
00052 #else
00053 # define MLOGGING_DEBUG(streamname, arg) (void)0
00054 # define MLOGGING_TRACE(streamname, arg) (void)0
00055 #endif
00056
00057
00058 #define MLOGGING_ERROR_C(streamname, classname, arg) MLOGGING_LOG_C(streamname, ::icl_core::logging::eLL_ERROR, classname, arg)
00059 #define MLOGGING_WARNING_C(streamname, classname, arg) MLOGGING_LOG_C(streamname, ::icl_core::logging::eLL_WARNING, classname, arg)
00060 #define MLOGGING_INFO_C(streamname, classname, arg) MLOGGING_LOG_C(streamname, ::icl_core::logging::eLL_INFO, classname, arg)
00061 #ifdef _IC_DEBUG_
00062 # define MLOGGING_DEBUG_C(streamname, classname, arg) MLOGGING_LOG_C(streamname, ::icl_core::logging::eLL_DEBUG, classname, arg)
00063 # define MLOGGING_TRACE_C(streamname, classname, arg) MLOGGING_LOG_C(streamname, ::icl_core::logging::eLL_TRACE, classname, arg)
00064 #else
00065 # define MLOGGING_DEBUG_C(streamname, classname, arg) (void)0
00066 # define MLOGGING_TRACE_C(streamname, classname, arg) (void)0
00067 #endif
00068
00069
00070 #define MLOGGING_ERROR_CO(streamname, classname, objectname, arg) MLOGGING_LOG_COF(streamname, ::icl_core::logging::eLL_ERROR, classname, objectname, function, arg)
00071 #define MLOGGING_WARNING_CO(streamname, classname, objectname, arg) MLOGGING_LOG_COF(streamname, ::icl_core::logging::eLL_WARNING, classname, objectname, function, arg)
00072 #define MLOGGING_INFO_CO(streamname, classname, objectname, arg) MLOGGING_LOG_COF(streamname, ::icl_core::logging::eLL_INFO, classname, objectname, function, arg)
00073 #ifdef _IC_DEBUG_
00074 # define MLOGGING_DEBUG_CO(streamname, classname, objectname, arg) MLOGGING_LOG_COF(streamname, ::icl_core::logging::eLL_DEBUG, classname, objectname, function, arg)
00075 # define MLOGGING_TRACE_CO(streamname, classname, objectname, arg) MLOGGING_LOG_COF(streamname, ::icl_core::logging::eLL_TRACE, classname, objectname, function, arg)
00076 #else
00077 # define MLOGGING_DEBUG_CO(streamname, classname, objectname, arg) (void)0
00078 # define MLOGGING_TRACE_CO(streamname, classname, objectname, arg) (void)0
00079 #endif
00080
00081
00082 #endif