mirror of
https://github.com/Telecominfraproject/wlan-cloud-lib-cppkafka.git
synced 2025-11-03 20:18:06 +00:00
committed by
Matias Fontanini
parent
df04b27e22
commit
d3ef9cad32
@@ -101,7 +101,7 @@ public:
|
|||||||
try {
|
try {
|
||||||
// Log it
|
// Log it
|
||||||
handle_->get_configuration().get_log_callback()(*handle_,
|
handle_->get_configuration().get_log_callback()(*handle_,
|
||||||
static_cast<int>(LogLevel::LOG_ERR),
|
static_cast<int>(LogLevel::LogErr),
|
||||||
library_name,
|
library_name,
|
||||||
error_msg.str());
|
error_msg.str());
|
||||||
}
|
}
|
||||||
@@ -109,7 +109,7 @@ public:
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
rd_kafka_log_print(handle_->get_handle(),
|
rd_kafka_log_print(handle_->get_handle(),
|
||||||
static_cast<int>(LogLevel::LOG_ERR),
|
static_cast<int>(LogLevel::LogErr),
|
||||||
library_name,
|
library_name,
|
||||||
error_msg.str().c_str());
|
error_msg.str().c_str());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,14 +34,14 @@ namespace cppkafka {
|
|||||||
|
|
||||||
// Based on syslog.h levels
|
// Based on syslog.h levels
|
||||||
enum class LogLevel : int {
|
enum class LogLevel : int {
|
||||||
LOG_EMERG = 0, /* system is unusable */
|
LogEmerg = 0, /* system is unusable */
|
||||||
LOG_ALERT = 1, /* action must be taken immediately */
|
LogAlert = 1, /* action must be taken immediately */
|
||||||
LOG_CRIT = 2, /* critical conditions */
|
LogCrit = 2, /* critical conditions */
|
||||||
LOG_ERR = 3, /* error conditions */
|
LogErr = 3, /* error conditions */
|
||||||
LOG_WARNING = 4, /* warning conditions */
|
LogWarning = 4, /* warning conditions */
|
||||||
LOG_NOTICE = 5, /* normal but significant condition */
|
LogNotice = 5, /* normal but significant condition */
|
||||||
LOG_INFO = 6, /* informational */
|
LogInfo = 6, /* informational */
|
||||||
LOG_DEBUG = 7 /* debug-level messages */
|
LogDebug = 7 /* debug-level messages */
|
||||||
};
|
};
|
||||||
|
|
||||||
} //cppkafka
|
} //cppkafka
|
||||||
|
|||||||
@@ -99,10 +99,10 @@ Consumer::~Consumer() {
|
|||||||
error_cb(*this, static_cast<int>(ex.get_error().get_error()), error_msg.str());
|
error_cb(*this, static_cast<int>(ex.get_error().get_error()), error_msg.str());
|
||||||
}
|
}
|
||||||
else if (logger_cb) {
|
else if (logger_cb) {
|
||||||
logger_cb(*this, static_cast<int>(LogLevel::LOG_ERR), "cppkafka", error_msg.str());
|
logger_cb(*this, static_cast<int>(LogLevel::LogErr), "cppkafka", error_msg.str());
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
rd_kafka_log_print(get_handle(), static_cast<int>(LogLevel::LOG_ERR), "cppkafka", error_msg.str().c_str());
|
rd_kafka_log_print(get_handle(), static_cast<int>(LogLevel::LogErr), "cppkafka", error_msg.str().c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user