[PATCH 2/2] doc/contributing: guidelines for logging, tracing and telemetry
Stephen Hemminger
stephen at networkplumber.org
Tue Jun 13 17:21:25 CEST 2023
On Tue, 13 Jun 2023 15:33:55 +0100
Bruce Richardson <bruce.richardson at intel.com> wrote:
> +Below are some guidelines for when each should be used:
> +
> +* For reporting error conditions, or other abnormal runtime issues, *logging* should be used.
> + Depending on the severity of the issue, the appropriate log level, for example,
> + ``ERROR``, ``WARNING`` or ``NOTICE``, should be used.
> +* In general, it is not recommended that the DPDK logging functions should be used for debugging.
> + Although the ``DEBUG`` log level may be used in components, it should only be used sparingly,
> + and the *tracing* functionality used instead.
> + More specifically:
> +
> + * for cases where a path through the code is only likely to be taken once,
> + for example, initialization code, either *logging* at ``DEBUG`` level or *tracing* may be used -
> + though tracing is preferred.
> + * where a path is to be taken multiple times within a short timeframe, for example,
> + datapath or regular control plane code, *tracing* should be used.
When a new feature, bus or device type is added it *must* not log when not present.
No new messages for existing users please.
More information about the dev
mailing list