Module: check_mk
Branch: master
Commit: 1c928e65fd2d5ec3f17877c4b0fdefa751626eca
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1c928e65fd2d5e…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Mon Aug 29 13:56:08 2016 +0200
More logging level deobfuscation.
---
livestatus/src/logger.cc | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/livestatus/src/logger.cc b/livestatus/src/logger.cc
index 5e4f5be..26ead67 100644
--- a/livestatus/src/logger.cc
+++ b/livestatus/src/logger.cc
@@ -43,7 +43,7 @@ void open_logfile() {
// needed to determine main thread later
g_mainthread_id = pthread_self();
if (g_logfile == nullptr) {
- logger(LG_WARN, "Cannot open logfile %s: %s", g_logfile_path,
+ logger(LOG_WARNING, "Cannot open logfile %s: %s", g_logfile_path,
strerror(errno));
}
}
@@ -55,17 +55,17 @@ void close_logfile() {
}
}
-void logger(int priority, const char *loginfo, ...) {
+void logger(int /*priority*/, const char *loginfo, ...) {
va_list ap;
va_start(ap, loginfo);
// Only the main process may use the Nagios log methods
- if ((g_logfile == nullptr) || g_mainthread_id == pthread_self()) {
+ if (g_logfile == nullptr || g_mainthread_id == pthread_self()) {
char buffer[8192];
snprintf(buffer, 20, "livestatus: ");
vsnprintf(buffer + strlen(buffer), sizeof(buffer) - strlen(buffer),
loginfo, ap);
- write_to_all_logs(buffer, priority);
+ write_to_all_logs(buffer, NSLOG_INFO_MESSAGE);
} else if (g_logfile != nullptr) {
char timestring[64];
time_t now_t = time(nullptr);