[sr-dev] git:master:95dd5245: kafka: get log levels from syslog.h header

Vicente Hernando vhernando at systemonenoc.com
Mon Nov 4 18:01:45 CET 2019


Module: kamailio
Branch: master
Commit: 95dd5245ce2499f97ade9cf3f24b2ee52690880c
URL: https://github.com/kamailio/kamailio/commit/95dd5245ce2499f97ade9cf3f24b2ee52690880c

Author: Vicente Hernando <vhernando at systemonenoc.com>
Committer: Vicente Hernando <vhernando at systemonenoc.com>
Date: 2019-10-31T00:00:24+01:00

kafka: get log levels from syslog.h header

---

Modified: src/modules/kafka/kfk.c

---

Diff:  https://github.com/kamailio/kamailio/commit/95dd5245ce2499f97ade9cf3f24b2ee52690880c.diff
Patch: https://github.com/kamailio/kamailio/commit/95dd5245ce2499f97ade9cf3f24b2ee52690880c.patch

---

diff --git a/src/modules/kafka/kfk.c b/src/modules/kafka/kfk.c
index 8cf48b7b41..859a4657b7 100644
--- a/src/modules/kafka/kfk.c
+++ b/src/modules/kafka/kfk.c
@@ -27,6 +27,7 @@
  * - Module: \ref kfk
  */
 
+#include <syslog.h> /* For log levels. */
 #include <librdkafka/rdkafka.h>
 
 #include "../../core/dprint.h"
@@ -107,20 +108,6 @@ static rd_kafka_topic_t* kfk_topic_get(str *topic_name);
 static int kfk_stats_add(const char *topic, rd_kafka_resp_err_t err);
 static void kfk_stats_topic_free(kfk_stats_t *st_topic);
 
-/**
- * \name Logging_macros from /usr/include/sys/syslog.h
- */
-/*@{*/
-#define	LOG_EMERG	0	/* system is unusable */
-#define	LOG_ALERT	1	/* action must be taken immediately */
-#define	LOG_CRIT	2	/* critical conditions */
-#define	LOG_ERR		3	/* error conditions */
-#define	LOG_WARNING	4	/* warning conditions */
-#define	LOG_NOTICE	5	/* normal but significant condition */
-#define	LOG_INFO	6	/* informational */
-#define	LOG_DEBUG	7	/* debug-level messages */
-/*@}*/
-
 /**
  * \brief Kafka logger callback
  */




More information about the sr-dev mailing list