log: fix dump of registered logs when disabled
authorOlivier Matz <olivier.matz@6wind.com>
Tue, 18 Apr 2017 14:22:25 +0000 (16:22 +0200)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 19 Apr 2017 23:31:18 +0000 (01:31 +0200)
commit2fc8e0bf04d804b1c51b3d3a390231a31cecf6b4
tree7deb89fe87e74b2aa3ad6f935b90cca955eb3b1d
parent73454ace6ac6fa45fd2be27675a3c2e2907e45ae
log: fix dump of registered logs when disabled

When we pass --log-level=0, it disables the logs. This level is
not displayed properly by the function that dumps the registered log
types (it shows "unknown"). Show "disabled" instead.

Before:

  ./build/app/test --log-level=0
  RTE>>dump_log_types
  global log level is unknown
  ...

After:

  ./build/app/test --log-level=0
  RTE>>dump_log_types
  global log level is disabled
  ...

Fixes: 432050bfd05b ("eal: dump registered log types")

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
lib/librte_eal/common/eal_common_log.c