24 #include <boost/current_function.hpp>
52 return level(name.c_str());
106 hintList.push_back(std::make_pair(
"AsynchIo",
network));
107 hintList.push_back(std::make_pair(
"TCP",
network));
108 hintList.push_back(std::make_pair(
"epoll",
network));
109 hintList.push_back(std::make_pair(
"Pollable",
network));
110 hintList.push_back(std::make_pair(
"Socket",
network));
112 hintList.push_back(std::make_pair(
"Sasl",
security));
113 hintList.push_back(std::make_pair(
"Ssl",
security));
114 hintList.push_back(std::make_pair(
"Acl",
security));
115 hintList.push_back(std::make_pair(
"acl",
security));
116 hintList.push_back(std::make_pair(
"cyrus",
security));
118 hintList.push_back(std::make_pair(
"amqp_",
protocol));
119 hintList.push_back(std::make_pair(
"framing",
protocol));
121 hintList.push_back(std::make_pair(
"management",
management));
122 hintList.push_back(std::make_pair(
"qmf",
management));
123 hintList.push_back(std::make_pair(
"console",
management));
124 hintList.push_back(std::make_pair(
"Management",
management));
126 hintList.push_back(std::make_pair(
"cluster",
ha));
127 hintList.push_back(std::make_pair(
"qpid/ha",
ha));
128 hintList.push_back(std::make_pair(
"qpid\\ha",
ha));
129 hintList.push_back(std::make_pair(
"replication",
ha));
130 hintList.push_back(std::make_pair(
"ClusterSafe",
ha));
132 hintList.push_back(std::make_pair(
"broker",
broker));
133 hintList.push_back(std::make_pair(
"SessionState",
broker));
134 hintList.push_back(std::make_pair(
"DataDir",
broker));
135 hintList.push_back(std::make_pair(
"qpidd",
broker));
136 hintList.push_back(std::make_pair(
"xml",
broker));
137 hintList.push_back(std::make_pair(
"QpidBroker",
broker));
139 hintList.push_back(std::make_pair(
"store",
store));
141 hintList.push_back(std::make_pair(
"assert",
system));
142 hintList.push_back(std::make_pair(
"Exception",
system));
143 hintList.push_back(std::make_pair(
"sys",
system));
144 hintList.push_back(std::make_pair(
"SCM",
system));
146 hintList.push_back(std::make_pair(
"tests",
test));
148 hintList.push_back(std::make_pair(
"messaging",
messaging));
149 hintList.push_back(std::make_pair(
"types",
messaging));
151 hintList.push_back(std::make_pair(
"client",
client));
157 std::list<std::pair<const char* const, Category> > hintList;
165 const char*
function;
179 #define QPID_LOG_STATEMENT_INIT_CAT(LEVEL, CATEGORY) \
180 { 0, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION, (::qpid::log::LEVEL), \
181 (::qpid::log::CATEGORY) }
185 #define QPID_LOG_STATEMENT_INIT(LEVEL) \
186 QPID_LOG_STATEMENT_INIT_CAT ( LEVEL , unspecified )
199 #define QPID_LOG_IF(LEVEL, TEST, MESSAGE) \
201 using ::qpid::log::Statement; \
202 static Statement stmt_= QPID_LOG_STATEMENT_INIT(LEVEL); \
203 static Statement::Initializer init_(stmt_); \
204 if (stmt_.enabled && (TEST)) \
205 stmt_.log(::qpid::Msg() << MESSAGE); \
212 #define QPID_LOG_IF_CAT(LEVEL, CATEGORY, TEST, MESSAGE) \
214 using ::qpid::log::Statement; \
215 static Statement stmt_= QPID_LOG_STATEMENT_INIT_CAT(LEVEL, CATEGORY); \
216 static Statement::Initializer init_(stmt_); \
217 if (stmt_.enabled && (TEST)) \
218 stmt_.log(::qpid::Msg() << MESSAGE); \
231 #define QPID_LOG_TEST(LEVEL, FLAG) \
233 using ::qpid::log::Statement; \
234 static Statement stmt_= QPID_LOG_STATEMENT_INIT(LEVEL); \
235 static Statement::Initializer init_(stmt_); \
236 FLAG = stmt_.enabled; \
249 #define QPID_LOG_TEST_CAT(LEVEL, CATEGORY, FLAG) \
251 using ::qpid::log::Statement; \
252 static Statement stmt_= QPID_LOG_STATEMENT_INIT_CAT(LEVEL, CATEGORY); \
253 static Statement::Initializer init_(stmt_); \
254 FLAG = stmt_.enabled; \
273 #define QPID_LOG(LEVEL, MESSAGE) QPID_LOG_IF(LEVEL, true, MESSAGE);
292 #define QPID_LOG_CAT(LEVEL, CATEGORY, MESSAGE) QPID_LOG_IF_CAT(LEVEL, CATEGORY, true, MESSAGE);