logging: Deprecate v1, default to v2

Reduced logging mode selection to deferred, immediate, minimal and
frontend. Decoupled logging version from mode and created CONFIG_LOG1
which can be used to explicitly select deprecated version.

From now on, chosing CONFIG_LOG_MODE_{IMMEDIATE,DEFERRED} will result
in version2.

Deprecated CONFIG_LOG2_MODE_{IMMEDIATE,DEFERRED} with cmake warning.

Codebase adapted to those changes.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
This commit is contained in:
Krzysztof Chruscinski 2022-01-12 15:52:48 +01:00 committed by Anas Nashif
commit 262cc55609
47 changed files with 199 additions and 178 deletions

View file

@ -75,7 +75,7 @@ void z_impl_z_log_msg2_runtime_vcreate(uint8_t domain_id, const void *source,
struct log_msg2_desc desc =
Z_LOG_MSG_DESC_INITIALIZER(domain_id, level, plen, dlen);
if (IS_ENABLED(CONFIG_LOG2_MODE_IMMEDIATE)) {
if (IS_ENABLED(CONFIG_LOG_MODE_IMMEDIATE)) {
msg = alloca(msg_wlen * sizeof(int));
} else {
msg = z_log_msg2_alloc(msg_wlen);