[dpdk-dev] [PATCH 2/6] rte_log.h: add detailed log levels RTE_LOG{FINE, FINER, FINEST}

Stephen Hemminger stephen at networkplumber.org
Fri Nov 13 17:07:41 CET 2015


On Fri, 13 Nov 2015 06:47:34 +0000
Matthew Hall <mhall at mhcomputing.net> wrote:

> Signed-off-by: Matthew Hall <mhall at mhcomputing.net>
> ---
>  lib/librte_eal/common/include/rte_log.h | 19 +++++++++++--------
>  1 file changed, 11 insertions(+), 8 deletions(-)
> 
> diff --git a/lib/librte_eal/common/include/rte_log.h b/lib/librte_eal/common/include/rte_log.h
> index 9dad24e..7dc19e1 100644
> --- a/lib/librte_eal/common/include/rte_log.h
> +++ b/lib/librte_eal/common/include/rte_log.h
> @@ -90,14 +90,17 @@ extern struct rte_logs rte_logs;
>  #define RTE_LOGTYPE_USER8   0x80000000 /**< User-defined log type 8. */
>  
>  /* Can't use 0, as it gives compiler warnings */
> -#define RTE_LOG_EMERG    1U  /**< System is unusable.               */
> -#define RTE_LOG_ALERT    2U  /**< Action must be taken immediately. */
> -#define RTE_LOG_CRIT     3U  /**< Critical conditions.              */
> -#define RTE_LOG_ERR      4U  /**< Error conditions.                 */
> -#define RTE_LOG_WARNING  5U  /**< Warning conditions.               */
> -#define RTE_LOG_NOTICE   6U  /**< Normal but significant condition. */
> -#define RTE_LOG_INFO     7U  /**< Informational.                    */
> -#define RTE_LOG_DEBUG    8U  /**< Debug-level messages.             */
> +#define RTE_LOG_EMERG     1U  /**< System is unusable.               */
> +#define RTE_LOG_ALERT     2U  /**< Action must be taken immediately. */
> +#define RTE_LOG_CRIT      3U  /**< Critical conditions.              */
> +#define RTE_LOG_ERR       4U  /**< Error conditions.                 */
> +#define RTE_LOG_WARNING   5U  /**< Warning conditions.               */
> +#define RTE_LOG_NOTICE    6U  /**< Normal but significant condition. */
> +#define RTE_LOG_INFO      7U  /**< Informational.                    */
> +#define RTE_LOG_DEBUG     8U  /**< Debug-level messages.             */
> +#define RTE_LOG_FINE      9U  /**< Fine-level messages.              */
> +#define RTE_LOG_FINER    10U  /**< Finer-level messages.             */
> +#define RTE_LOG_FINEST   11U  /**< Finest-level messages.            */
>  
>  /** The default log stream. */
>  extern FILE *eal_default_log_stream;

I understand the motivation but the existing levels match syslog
which are what you want for a production application.

The new levels are only for developer logs. I don't think we want all
the developer levels beyond debug in the upstream tree anyway.



More information about the dev mailing list