36 #ifndef __POINTMATCHER_PRIVATE_H 37 #define __POINTMATCHER_PRIVATE_H 46 extern std::shared_ptr<Logger>
logger;
50 #define __POINTMATCHER_FUNCTION__ __FUNCSIG__ 51 #elif defined(__GNUC__) 52 #define __POINTMATCHER_FUNCTION__ __PRETTY_FUNCTION__ 54 #define __POINTMATCHER_FUNCTION__ "" 58 #define LOG_INFO_STREAM(args) \ 60 boost::mutex::scoped_lock lock(PointMatcherSupport::loggerMutex); \ 61 if (PointMatcherSupport::logger.get() && \ 62 PointMatcherSupport::logger->hasInfoChannel()) { \ 63 PointMatcherSupport::logger->beginInfoEntry(__FILE__, __LINE__, __POINTMATCHER_FUNCTION__); \ 64 (*PointMatcherSupport::logger->infoStream()) << args; \ 65 PointMatcherSupport::logger->finishInfoEntry(__FILE__, __LINE__, __POINTMATCHER_FUNCTION__); \ 68 #define LOG_WARNING_STREAM(args) \ 70 boost::mutex::scoped_lock lock(PointMatcherSupport::loggerMutex); \ 71 if (PointMatcherSupport::logger.get() && \ 72 PointMatcherSupport::logger->hasWarningChannel()) { \ 73 PointMatcherSupport::logger->beginWarningEntry(__FILE__, __LINE__, __POINTMATCHER_FUNCTION__); \ 74 (*PointMatcherSupport::logger->warningStream()) << args; \ 75 PointMatcherSupport::logger->finishWarningEntry(__FILE__, __LINE__, __POINTMATCHER_FUNCTION__); \ 81 #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