00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00022
00023 #ifndef ICL_CORE_LOGGING_LOGGING_MACROS__MLOGGING__FMT_H_INCLUDED
00024 #define ICL_CORE_LOGGING_LOGGING_MACROS__MLOGGING__FMT_H_INCLUDED
00025
00026 #include "icl_core_logging/LoggingMacros_SLOGGING_FMT.h"
00027
00028 #define MLOGGING_FMT_LOG_FLCO(streamname, level, filename, line, classname, objectname, ...) \
00029 do { \
00030 if (Debug()) \
00031 { \
00032 ::icl_core::logging::LogStream& stream = streamname::instance(); \
00033 SLOGGING_FMT_LOG_FLCO(stream, level, filename, line, classname, objectname, __VA_ARGS__); \
00034 } \
00035 } while (0)
00036 #define MLOGGING_FMT_LOG_COF(streamname, level, classname, objectname, function, ...) MLOGGING_FMT_LOG_FLCO(streamname, level, __FILE__, __LINE__, #classname, objectname, __VA_ARGS__)
00037 #define MLOGGING_FMT_LOG_C(streamname, level, classname, ...) MLOGGING_FMT_LOG_FLCO(streamname, level, __FILE__, __LINE__, #classname, "", __VA_ARGS__)
00038 #define MLOGGING_FMT_LOG(streamname, level, ...) MLOGGING_FMT_LOG_FLCO(streamname, level, __FILE__, __LINE__, "", "", __VA_ARGS__)
00039
00040
00041 #define MLOGGING_FMT_ERROR(streamname, ...) MLOGGING_FMT_LOG(streamname, ::icl_core::logging::eLL_ERROR, __VA_ARGS__)
00042 #define MLOGGING_FMT_WARNING(streamname, ...) MLOGGING_FMT_LOG(streamname, ::icl_core::logging::eLL_WARNING, __VA_ARGS__)
00043 #define MLOGGING_FMT_INFO(streamname, ...) MLOGGING_FMT_LOG(streamname, ::icl_core::logging::eLL_INFO, __VA_ARGS__)
00044 #ifdef _IC_DEBUG_
00045 # define MLOGGING_FMT_DEBUG(streamname, ...) MLOGGING_FMT_LOG(streamname, ::icl_core::logging::eLL_DEBUG, __VA_ARGS__)
00046 # define MLOGGING_FMT_TRACE(streamname, ...) MLOGGING_FMT_LOG(streamname, ::icl_core::logging::eLL_TRACE, __VA_ARGS__)
00047 #else
00048 # define MLOGGING_FMT_DEBUG(streamname, ...) (void)0
00049 # define MLOGGING_FMT_TRACE(streamname, ...) (void)0
00050 #endif
00051
00052
00053 #define MLOGGING_FMT_ERROR_C(streamname, classname, ...) MLOGGING_FMT_LOG_C(streamname, ::icl_core::logging::eLL_ERROR, classname, __VA_ARGS__)
00054 #define MLOGGING_FMT_WARNING_C(streamname, classname, ...) MLOGGING_FMT_LOG_C(streamname, ::icl_core::logging::eLL_WARNING, classname, __VA_ARGS__)
00055 #define MLOGGING_FMT_INFO_C(streamname, classname, ...) MLOGGING_FMT_LOG_C(streamname, ::icl_core::logging::eLL_INFO, classname, __VA_ARGS__)
00056 #ifdef _IC_DEBUG_
00057 # define MLOGGING_FMT_DEBUG_C(streamname, classname, ...) MLOGGING_FMT_LOG_C(streamname, ::icl_core::logging::eLL_DEBUG, classname, __VA_ARGS__)
00058 # define MLOGGING_FMT_TRACE_C(streamname, classname, ...) MLOGGING_FMT_LOG_C(streamname, ::icl_core::logging::eLL_TRACE, classname, __VA_ARGS__)
00059 #else
00060 # define MLOGGING_FMT_DEBUG_C(streamname, classname, ...) (void)0
00061 # define MLOGGING_FMT_TRACE_C(streamname, classname, ...) (void)0
00062 #endif
00063
00064
00065 #define MLOGGING_FMT_ERROR_CO(streamname, classname, objectname, ...) MLOGGING_FMT_LOG_COF(streamname, ::icl_core::logging::eLL_ERROR, classname, objectname, function, __VA_ARGS__)
00066 #define MLOGGING_FMT_WARNING_CO(streamname, classname, objectname, ...) MLOGGING_FMT_LOG_COF(streamname, ::icl_core::logging::eLL_WARNING, classname, objectname, function, __VA_ARGS__)
00067 #define MLOGGING_FMT_INFO_CO(streamname, classname, objectname, ...) MLOGGING_FMT_LOG_COF(streamname, ::icl_core::logging::eLL_INFO, classname, objectname, function, __VA_ARGS__)
00068 #ifdef _IC_DEBUG_
00069 # define MLOGGING_FMT_DEBUG_CO(streamname, classname, objectname, ...) MLOGGING_FMT_LOG_COF(streamname, ::icl_core::logging::eLL_DEBUG, classname, objectname, function, __VA_ARGS__)
00070 # define MLOGGING_FMT_TRACE_CO(streamname, classname, objectname, ...) MLOGGING_FMT_LOG_COF(streamname, ::icl_core::logging::eLL_TRACE, classname, objectname, function, __VA_ARGS__)
00071 #else
00072 # define MLOGGING_FMT_DEBUG_CO(streamname, classname, objectname, ...) (void)0
00073 # define MLOGGING_FMT_TRACE_CO(streamname, classname, objectname, ...) (void)0
00074 #endif
00075
00076
00077 #endif