Go to the documentation of this file.00001 #ifndef LOGGING_ACEMACROS_H_
00002 #define LOGGING_ACEMACROS_H_
00003
00004 #ifdef ENABLE_LOG4CPP_MACROS
00005
00006 #include "loggingLog4cppMACROS.h"
00007 #include "loggingLog4cpp.h"
00008
00009 #define FIELD_UNAVAILABLE "Unavailable"
00010
00011 #define ACS_DEBUG(routine, text) \
00012 LOG(log4cpp::Priority::Debug, routine, text);
00013
00014 #define ACS_STATIC_DEBUG(routine, text) \
00015 STATIC_LOG(log4cpp::Priority::Debug, routine. text);
00016
00017 #define ACS_DEBUG_PARAM(routine, text, param) \
00018 { \
00019 logging::BasicLogInfo tStruct; \
00020 tStruct = ::logging::Logger::formatLog (log4cpp::Priority::Debug, text, param); \
00021 LOG(tStruct.priority, routine, tStruct.message); \
00022 }
00023
00024 #define ACS_STATIC_DEBUG_PARAM(routine, text, param) \
00025 { \
00026 logging::BasicLogInfo tStruct; \
00027 tStruct = ::logging::Logger::formatLog (log4cpp::Priority::Debug, text, param); \
00028 STATIC_LOG(tStruct.priority, routine, tStruct.message); \
00029 }
00030
00031 #define ACS_TRACE(routine) \
00032 LOG(log4cpp::Priority::TRACE, routine, FIELD_UNAVAILABLE);
00033
00034 #define ACS_STATIC_TRACE(routine) \
00035 STATIC_LOG(log4cpp::Priority::Trace, routine, FIELD_UNAVAILABLE);
00036
00037 #define ACS_SHORT_LOG(X) \
00038 { \
00039 logging::BasicLogInfo tStruct; \
00040 tStruct = ::logging::Logger::formatLog X; \
00041 LOG(tStruct.priority, FIELD_UNAVAILABLE, tStruct.message); \
00042 }
00043
00044 #define ACS_STATIC_SHORT_LOG(X) \
00045 { \
00046 logging::BasicLogInfo tStruct; \
00047 tStruct = ::logging::Logger::formatLog X; \
00048 STATIC_LOG(tStruct.priority, FIELD_UNAVAILABLE, tStruct.message); \
00049 }
00050
00051 #define ACS_LOG(flags, routine, X) \
00052 {\
00053 logging::BasicLogInfo tStruct; \
00054 tStruct = ::logging::Logger::formatLog X; \
00055 LOG(tStruct.priority, routine, tStruct.message); \
00056 }
00057
00058 #define ACS_STATIC_LOG(flags, routine, X) \
00059 {\
00060 logging::BasicLogInfo tStruct; \
00061 tStruct = ::logging::Logger::formatLog X; \
00062 STATIC_LOG(tStruct.priority, routine, tStruct.message); \
00063 }
00064 #endif
00065
00066 #endif