Applications that display or export DPDK logging configuration can query
numeric log levels, but have no direct way to retrieve the corresponding
level and component names. They must currently duplicate the level mapping
and cannot safely query a registered component name.

Add experimental APIs to return the canonical name for a log level and the
registered name for a log type. The returned strings are const and remain
owned by DPDK. Unit tests cover known and unknown levels and types, and the
new APIs are documented in the programmer guide and release notes.

The original downstream implementation was authored by Walt Robinson.

Validation:

- Full native Meson/Ninja build
- DPDK fast-tests / logs_autotest

Randy Tice (1):
  log: add name query functions

 app/test/test_logs.c                   | 11 +++++++++++
 doc/guides/prog_guide/log_lib.rst      |  7 +++++++
 doc/guides/rel_notes/release_26_11.rst |  5 +++++
 lib/log/log.c                          | 17 +++++++++++++++++
 lib/log/rte_log.h                      | 25 +++++++++++++++++++++++++
 5 files changed, 65 insertions(+)

-- 
2.35.6

Reply via email to