24 #include <boost/current_function.hpp>
52 return level(name.c_str());
107 hintList.push_back(std::make_pair(
"AsynchIo",
network));
108 hintList.push_back(std::make_pair(
"TCP",
network));
109 hintList.push_back(std::make_pair(
"epoll",
network));
110 hintList.push_back(std::make_pair(
"Pollable",
network));
111 hintList.push_back(std::make_pair(
"Socket",
network));
113 hintList.push_back(std::make_pair(
"Sasl",
security));
114 hintList.push_back(std::make_pair(
"Ssl",
security));
115 hintList.push_back(std::make_pair(
"Acl",
security));
116 hintList.push_back(std::make_pair(
"acl",
security));
117 hintList.push_back(std::make_pair(
"cyrus",
security));
119 hintList.push_back(std::make_pair(
"amqp_",
protocol));
120 hintList.push_back(std::make_pair(
"framing",
protocol));
122 hintList.push_back(std::make_pair(
"management",
management));
123 hintList.push_back(std::make_pair(
"qmf",
management));
124 hintList.push_back(std::make_pair(
"console",
management));
125 hintList.push_back(std::make_pair(
"Management",
management));
127 hintList.push_back(std::make_pair(
"cluster",
ha));
128 hintList.push_back(std::make_pair(
"qpid/ha",
ha));
129 hintList.push_back(std::make_pair(
"qpid\\ha",
ha));
130 hintList.push_back(std::make_pair(
"replication",
ha));
131 hintList.push_back(std::make_pair(
"ClusterSafe",
ha));
133 hintList.push_back(std::make_pair(
"broker",
broker));
134 hintList.push_back(std::make_pair(
"SessionState",
broker));
135 hintList.push_back(std::make_pair(
"DataDir",
broker));
136 hintList.push_back(std::make_pair(
"qpidd",
broker));
137 hintList.push_back(std::make_pair(
"xml",
broker));
138 hintList.push_back(std::make_pair(
"QpidBroker",
broker));
140 hintList.push_back(std::make_pair(
"store",
store));
142 hintList.push_back(std::make_pair(
"assert",
system));
143 hintList.push_back(std::make_pair(
"Exception",
system));
144 hintList.push_back(std::make_pair(
"sys",
system));
145 hintList.push_back(std::make_pair(
"SCM",
system));
147 hintList.push_back(std::make_pair(
"tests",
test));
149 hintList.push_back(std::make_pair(
"messaging",
messaging));
150 hintList.push_back(std::make_pair(
"types",
messaging));
152 hintList.push_back(std::make_pair(
"client",
client));
158 std::list<std::pair<const char* const, Category> > hintList;
166 const char*
function;
180 #define QPID_LOG_STATEMENT_INIT_CAT(LEVEL, CATEGORY) \
181 { 0, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION, (::qpid::log::LEVEL), \
182 (::qpid::log::CATEGORY) }
186 #define QPID_LOG_STATEMENT_INIT(LEVEL) \
187 QPID_LOG_STATEMENT_INIT_CAT ( LEVEL , unspecified )
200 #define QPID_LOG_IF(LEVEL, TEST, MESSAGE) \
202 using ::qpid::log::Statement; \
203 static Statement stmt_= QPID_LOG_STATEMENT_INIT(LEVEL); \
204 static Statement::Initializer init_(stmt_); \
205 if (stmt_.enabled && (TEST)) \
206 stmt_.log(::qpid::Msg() << MESSAGE); \
213 #define QPID_LOG_IF_CAT(LEVEL, CATEGORY, TEST, MESSAGE) \
215 using ::qpid::log::Statement; \
216 static Statement stmt_= QPID_LOG_STATEMENT_INIT_CAT(LEVEL, CATEGORY); \
217 static Statement::Initializer init_(stmt_); \
218 if (stmt_.enabled && (TEST)) \
219 stmt_.log(::qpid::Msg() << MESSAGE); \
232 #define QPID_LOG_TEST(LEVEL, FLAG) \
234 using ::qpid::log::Statement; \
235 static Statement stmt_= QPID_LOG_STATEMENT_INIT(LEVEL); \
236 static Statement::Initializer init_(stmt_); \
237 FLAG = stmt_.enabled; \
250 #define QPID_LOG_TEST_CAT(LEVEL, CATEGORY, FLAG) \
252 using ::qpid::log::Statement; \
253 static Statement stmt_= QPID_LOG_STATEMENT_INIT_CAT(LEVEL, CATEGORY); \
254 static Statement::Initializer init_(stmt_); \
255 FLAG = stmt_.enabled; \
274 #define QPID_LOG(LEVEL, MESSAGE) QPID_LOG_IF(LEVEL, true, MESSAGE);
293 #define QPID_LOG_CAT(LEVEL, CATEGORY, MESSAGE) QPID_LOG_IF_CAT(LEVEL, CATEGORY, true, MESSAGE);