36 #ifndef __POINTMATCHER_PRIVATE_H 37 #define __POINTMATCHER_PRIVATE_H 44 extern std::shared_ptr<Logger>
logger;
48 #define __POINTMATCHER_FUNCTION__ __FUNCSIG__ 49 #elif defined(__GNUC__) 50 #define __POINTMATCHER_FUNCTION__ __PRETTY_FUNCTION__ 52 #define __POINTMATCHER_FUNCTION__ "" 56 #define LOG_INFO_STREAM(args) \ 58 boost::mutex::scoped_lock lock(PointMatcherSupport::loggerMutex); \ 59 if (PointMatcherSupport::logger.get() && \ 60 PointMatcherSupport::logger->hasInfoChannel()) { \ 61 PointMatcherSupport::logger->beginInfoEntry(__FILE__, __LINE__, __POINTMATCHER_FUNCTION__); \ 62 (*PointMatcherSupport::logger->infoStream()) << args; \ 63 PointMatcherSupport::logger->finishInfoEntry(__FILE__, __LINE__, __POINTMATCHER_FUNCTION__); \ 66 #define LOG_WARNING_STREAM(args) \ 68 boost::mutex::scoped_lock lock(PointMatcherSupport::loggerMutex); \ 69 if (PointMatcherSupport::logger.get() && \ 70 PointMatcherSupport::logger->hasWarningChannel()) { \ 71 PointMatcherSupport::logger->beginWarningEntry(__FILE__, __LINE__, __POINTMATCHER_FUNCTION__); \ 72 (*PointMatcherSupport::logger->warningStream()) << args; \ 73 PointMatcherSupport::logger->finishWarningEntry(__FILE__, __LINE__, __POINTMATCHER_FUNCTION__); \ 79 #endif // __POINTMATCHER_PRIVATE_H boost::mutex loggerMutex
mutex to protect access to logging
Functions and classes that are not dependant on scalar type are defined in this namespace.
std::shared_ptr< Logger > logger
the current logger