Re: [PATCH 01/11] telemetry: initial telemetry infrastructure
From: Stephen Hemminger <stephen@networkplumber.org>
Date: 2018-08-23 23:22:25
From: Stephen Hemminger <stephen@networkplumber.org>
Date: 2018-08-23 23:22:25
On Thu, 23 Aug 2018 13:08:03 +0100 Ciara Power [off-list ref] wrote:
+/* Logging Macros */
+extern int telemetry_log_level;
+
+#define TELEMETRY_LOG(level, fmt, args...) \
+ rte_log(RTE_LOG_ ##level, telemetry_log_level, "%s(): "fmt "\n", \
+ __func__, ##args)
+
+#define TELEMETRY_LOG_ERR(fmt, args...) \
+ TELEMETRY_LOG(ERR, fmt, ## args)
+
+#define TELEMETRY_LOG_WARN(fmt, args...) \
+ TELEMETRY_LOG(WARNING, fmt, ## args)
+
+#define TELEMETRY_LOG_INFO(fmt, args...) \
+ TELEMETRY_LOG(INFO, fmt, ## args)
+
+typedef struct telemetry_impl {
+ pthread_t thread_id;
+ int thread_status;
+ uint32_t socket_id;
+} telemetry_impl;
+Your logging macros follow the standard DPDK style. Including automatically adding a new line. But as I look at the code, many of the TELEMETRY_LOG calls have a newline in the format. Therefore your log messages will be double spaced.