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