00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00022
00023 #ifndef ICL_CORE_LOGGING_LOGGING_MACROS__LOGGING__FMT_H_INCLUDED
00024 #define ICL_CORE_LOGGING_LOGGING_MACROS__LOGGING__FMT_H_INCLUDED
00025
00026 #include "icl_core_logging/LoggingMacros_SLOGGING_FMT.h"
00027
00028 #define LOGGING_FMT_LOG_FLCO(streamname, level, filename, line, classname, objectname, ...) \
00029 do { \
00030 ::icl_core::logging::LogStream& stream = streamname::instance(); \
00031 SLOGGING_FMT_LOG_FLCO(stream, level, filename, line, classname, objectname, __VA_ARGS__); \
00032 } while (0)
00033 #define LOGGING_FMT_LOG_CO(streamname, level, classname, objectname, ...) LOGGING_FMT_LOG_FLCO(streamname, level, __FILE__, __LINE__, #classname, objectname, __VA_ARGS__)
00034 #define LOGGING_FMT_LOG_C(streamname, level, classname, ...) LOGGING_FMT_LOG_FLCO(streamname, level, __FILE__, __LINE__, #classname, "", __VA_ARGS__)
00035 #define LOGGING_FMT_LOG(streamname, level, ...) LOGGING_FMT_LOG_FLCO(streamname, level, __FILE__, __LINE__, "", "", __VA_ARGS__)
00036
00037
00038 #define LOGGING_FMT_ERROR(streamname, ...) LOGGING_FMT_LOG(streamname, icl_core::logging::eLL_ERROR, __VA_ARGS__)
00039 #define LOGGING_FMT_WARNING(streamname, ...) LOGGING_FMT_LOG(streamname, icl_core::logging::eLL_WARNING, __VA_ARGS__)
00040 #define LOGGING_FMT_INFO(streamname, ...) LOGGING_FMT_LOG(streamname, icl_core::logging::eLL_INFO, __VA_ARGS__)
00041 #ifdef _IC_DEBUG_
00042 # define LOGGING_FMT_DEBUG(streamname, ...) LOGGING_FMT_LOG(streamname, icl_core::logging::eLL_DEBUG, __VA_ARGS__)
00043 # define LOGGING_FMT_TRACE(streamname, ...) LOGGING_FMT_LOG(streamname, icl_core::logging::eLL_TRACE, __VA_ARGS__)
00044 #else
00045 # define LOGGING_FMT_DEBUG(streamname, ...) (void)0
00046 # define LOGGING_FMT_TRACE(streamname, ...) (void)0
00047 #endif
00048
00049
00050 #define LOGGING_FMT_ERROR_C(streamname, classname, ...) LOGGING_FMT_LOG_C(streamname, ::icl_core::logging::eLL_ERROR, classname, __VA_ARGS__)
00051 #define LOGGING_FMT_WARNING_C(streamname, classname, ...) LOGGING_FMT_LOG_C(streamname, ::icl_core::logging::eLL_WARNING, classname, __VA_ARGS__)
00052 #define LOGGING_FMT_INFO_C(streamname, classname, ...) LOGGING_FMT_LOG_C(streamname, ::icl_core::logging::eLL_INFO, classname, __VA_ARGS__)
00053 #ifdef _IC_DEBUG_
00054 # define LOGGING_FMT_DEBUG_C(streamname, classname, ...) LOGGING_FMT_LOG_C(streamname, ::icl_core::logging::eLL_DEBUG, classname, __VA_ARGS__)
00055 # define LOGGING_FMT_TRACE_C(streamname, classname, ...) LOGGING_FMT_LOG_C(streamname, ::icl_core::logging::eLL_TRACE, classname, __VA_ARGS__)
00056 #else
00057 # define LOGGING_FMT_DEBUG_C(streamname, classname, ...) (void)0
00058 # define LOGGING_FMT_TRACE_C(streamname, classname, ...) (void)0
00059 #endif
00060
00061
00062 #define LOGGING_FMT_ERROR_CO(streamname, classname, objectname, ...) LOGGING_FMT_LOG_CO(streamname, ::icl_core::logging::eLL_ERROR, classname, objectname, __VA_ARGS__)
00063 #define LOGGING_FMT_WARNING_CO(streamname, classname, objectname, ...) LOGGING_FMT_LOG_CO(streamname, ::icl_core::logging::eLL_WARNING, classname, objectname, __VA_ARGS__)
00064 #define LOGGING_FMT_INFO_CO(streamname, classname, objectname, ...) LOGGING_FMT_LOG_CO(streamname, ::icl_core::logging::eLL_INFO, classname, objectname, __VA_ARGS__)
00065 #ifdef _IC_DEBUG_
00066 # define LOGGING_FMT_DEBUG_CO(streamname, classname, objectname, ...) LOGGING_FMT_LOG_CO(streamname, ::icl_core::logging::eLL_DEBUG, classname, objectname, __VA_ARGS__)
00067 # define LOGGING_FMT_TRACE_CO(streamname, classname, objectname, ...) LOGGING_FMT_LOG_CO(streamname, ::icl_core::logging::eLL_TRACE, classname, objectname, __VA_ARGS__)
00068 #else
00069 # define LOGGING_FMT_DEBUG_CO(streamname, classname, objectname, ...) (void)0
00070 # define LOGGING_FMT_TRACE_CO(streamname, classname, objectname, ...) (void)0
00071 #endif
00072
00073 #endif