Skip to content

Commit d3ef9ca

Browse files
zenonparkermfontanini
authored andcommitted
Fix #111: Rename LogLevel enums (#112)
1 parent df04b27 commit d3ef9ca

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

include/cppkafka/detail/callback_invoker.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,15 +101,15 @@ class CallbackInvoker
101101
try {
102102
// Log it
103103
handle_->get_configuration().get_log_callback()(*handle_,
104-
static_cast<int>(LogLevel::LOG_ERR),
104+
static_cast<int>(LogLevel::LogErr),
105105
library_name,
106106
error_msg.str());
107107
}
108108
catch (...) {} // sink everything
109109
}
110110
else {
111111
rd_kafka_log_print(handle_->get_handle(),
112-
static_cast<int>(LogLevel::LOG_ERR),
112+
static_cast<int>(LogLevel::LogErr),
113113
library_name,
114114
error_msg.str().c_str());
115115
}

include/cppkafka/logging.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,14 @@ namespace cppkafka {
3434

3535
// Based on syslog.h levels
3636
enum class LogLevel : int {
37-
LOG_EMERG = 0, /* system is unusable */
38-
LOG_ALERT = 1, /* action must be taken immediately */
39-
LOG_CRIT = 2, /* critical conditions */
40-
LOG_ERR = 3, /* error conditions */
41-
LOG_WARNING = 4, /* warning conditions */
42-
LOG_NOTICE = 5, /* normal but significant condition */
43-
LOG_INFO = 6, /* informational */
44-
LOG_DEBUG = 7 /* debug-level messages */
37+
LogEmerg = 0, /* system is unusable */
38+
LogAlert = 1, /* action must be taken immediately */
39+
LogCrit = 2, /* critical conditions */
40+
LogErr = 3, /* error conditions */
41+
LogWarning = 4, /* warning conditions */
42+
LogNotice = 5, /* normal but significant condition */
43+
LogInfo = 6, /* informational */
44+
LogDebug = 7 /* debug-level messages */
4545
};
4646

4747
} //cppkafka

src/consumer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,10 @@ Consumer::~Consumer() {
9999
error_cb(*this, static_cast<int>(ex.get_error().get_error()), error_msg.str());
100100
}
101101
else if (logger_cb) {
102-
logger_cb(*this, static_cast<int>(LogLevel::LOG_ERR), "cppkafka", error_msg.str());
102+
logger_cb(*this, static_cast<int>(LogLevel::LogErr), "cppkafka", error_msg.str());
103103
}
104104
else {
105-
rd_kafka_log_print(get_handle(), static_cast<int>(LogLevel::LOG_ERR), "cppkafka", error_msg.str().c_str());
105+
rd_kafka_log_print(get_handle(), static_cast<int>(LogLevel::LogErr), "cppkafka", error_msg.str().c_str());
106106
}
107107
}
108108
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy