|
void | event_cb (RdKafka::Event &event) override |
|
Definition at line 256 of file KafkaImporter.cpp.
void EventCb::event_cb |
( |
RdKafka::Event & |
event | ) |
|
|
inlineoverride |
Definition at line 258 of file KafkaImporter.cpp.
References logger::ERROR, logger::INFO, LOG, run, and VLOG.
259 switch (event.type()) {
260 case RdKafka::Event::EVENT_ERROR:
261 LOG(
ERROR) <<
"ERROR (" << RdKafka::err2str(event.err()) <<
"): " << event.str();
262 if (event.err() == RdKafka::ERR__ALL_BROKERS_DOWN) {
263 LOG(
ERROR) <<
"All brokers are down, we may need special handling here";
268 case RdKafka::Event::EVENT_STATS:
269 VLOG(2) <<
"\"STATS\": " <<
event.str();
272 case RdKafka::Event::EVENT_LOG:
273 LOG(
INFO) <<
"LOG-" <<
event.severity() <<
"-" <<
event.fac().c_str() <<
":"
274 <<
event.str().c_str();
277 case RdKafka::Event::EVENT_THROTTLE:
278 LOG(
INFO) <<
"THROTTLED: " <<
event.throttle_time() <<
"ms by "
279 <<
event.broker_name() <<
" id " << (int)event.broker_id();
283 LOG(
INFO) <<
"EVENT " <<
event.type() <<
" (" << RdKafka::err2str(event.err())
284 <<
"): " << event.str();
The documentation for this class was generated from the following file: