logging: add minimal implementation

The log mechanism, even in immediate mode, adds somewhere
between 1K-2K of footprint to applications that use it.

We want to standardize the logging APIs for all logging
within the kernel, but need to not let platforms with
very constrained RAM/ROM in the dust.

This patch introduces CONFIG_LOG_MINIMAL, which is a very
thin wrapper to printk(). It supports the APIs expressed
in logging/log.h.

This will be the new default for test cases.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
Andrew Boie 2019-09-22 16:44:43 -07:00 committed by Anas Nashif
commit 7e29c9da0b
7 changed files with 222 additions and 94 deletions

View file

@ -83,11 +83,11 @@ config TEST_LOGGING_DEFAULTS
bool "Enable test case logging defaults"
depends on TEST
select LOG
select LOG_IMMEDIATE
select LOG_MINIMAL
default y
help
Option which implements default policy of enabling logging in
immediate mode for all test cases. For tests that need alternate
minimal mode for all test cases. For tests that need alternate
logging configuration, or no logging at all, disable this
in the project-level defconfig.