5 #define __func__ __FUNCTION__
19 m_logger = &Poco::Logger::get(logger_name);
29 static void setAllLoggerLevel(
int level) { Poco::Logger::setLevel(Poco::Logger::ROOT, level); }
38 #define LOG_TRACE(__arg) \
39 poco_trace(*m_logger, std::string("(") + __func__ + ") " + loggingPrefix() + __arg);
41 #define LOG_DEBUG(__arg) \
42 poco_debug(*m_logger, std::string("(") + __func__ + ") " + loggingPrefix() + __arg);
44 #define LOG_INFORMATION(__arg) \
45 poco_information(*m_logger, std::string("(") + __func__ + ") " + loggingPrefix() + __arg);
47 #define LOG_NOTICE(__arg) \
48 poco_notice(*m_logger, std::string("(") + __func__ + ") " + loggingPrefix() + __arg);
50 #define LOG_WARNING(__arg) \
51 poco_warning(*m_logger, std::string("(") + __func__ + ") " + loggingPrefix() + __arg);
53 #define LOG_ERROR(__arg) \
54 poco_error(*m_logger, std::string("(") + __func__ + ") " + loggingPrefix() + __arg);
56 #define LOG_CRITICAL(__arg) \
57 poco_critical(*m_logger, std::string("(") + __func__ + ") " + loggingPrefix() + __arg);
59 #define LOG_FATAL(__arg) \
60 poco_fatal(*m_logger, std::string("(") + __func__ + ") " + loggingPrefix() + __arg);
64 #define LOGSTR_TRACE(__arg) \
65 if (m_logger->trace()) \
67 Poco::Mutex::ScopedLock lock(m_logger_lock); \
68 m_logstr->trace() << "(" << __func__ << ") " << loggingPrefix() << __arg << std::endl; \
71 #define LOGSTR_DEBUG(__arg) \
72 if (m_logger->debug()) \
74 Poco::Mutex::ScopedLock lock(m_logger_lock); \
75 m_logstr->debug() << "(" << __func__ << ") " << loggingPrefix() << __arg << std::endl; \
78 #define LOGSTR_INFORMATION(__arg) \
79 if (m_logger->information()) \
81 Poco::Mutex::ScopedLock lock(m_logger_lock); \
82 m_logstr->information() << "(" << __func__ << ") " << loggingPrefix() << __arg << std::endl; \
85 #define LOGSTR_NOTICE(__arg) \
86 if (m_logger->notice()) \
88 Poco::Mutex::ScopedLock lock(m_logger_lock); \
89 m_logstr->notice() << "(" << __func__ << ") " << loggingPrefix() << __arg << std::endl; \
92 #define LOGSTR_WARNING(__arg) \
93 if (m_logger->warning()) \
95 Poco::Mutex::ScopedLock lock(m_logger_lock); \
96 m_logstr->warning() << "(" << __func__ << ") " << loggingPrefix() << __arg << std::endl; \
99 #define LOGSTR_ERROR(__arg) \
100 if (m_logger->error()) \
102 Poco::Mutex::ScopedLock lock(m_logger_lock); \
103 m_logstr->error() << "(" << __func__ << ") " << loggingPrefix() << __arg << std::endl; \
106 #define LOGSTR_CRITICAL(__arg) \
107 if (m_logger->critical()) \
109 Poco::Mutex::ScopedLock lock(m_logger_lock); \
110 m_logstr->critical() << "(" << __func__ << ") " << loggingPrefix() << __arg << std::endl; \
113 #define LOGSTR_FATAL(__arg) \
114 if (m_logger->fatal()) \
116 Poco::Mutex::ScopedLock lock(m_logger_lock); \
117 m_logstr->fatal() << "(" << __func__ << ") " << loggingPrefix() << __arg << std::endl; \
virtual std::string loggingPrefix() const
Poco::Mutex m_logger_lock
Base & operator=(const Base &)
void setThisLoggerLevel(int level)
static void setAllLoggerLevel(int level)
Base(const std::string &logger_name="UNKNOWN")
Poco::LogStream * m_logstr
void setLoggerName(const std::string &logger_name)