[dpdk-dev] [PATCH 01/11] telemetry: initial telemetry infrastructure
Stephen Hemminger
stephen at networkplumber.org
Fri Aug 24 01:22:22 CEST 2018
On Thu, 23 Aug 2018 13:08:03 +0100
Ciara Power <ciara.power at intel.com> 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.
More information about the dev
mailing list