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

@ -103,7 +103,7 @@ static int out_func(int c, void *ctx)
const struct log_output *out_ctx = (const struct log_output *)ctx;
int idx;
if (IS_ENABLED(CONFIG_LOG_IMMEDIATE)) {
if (IS_ENABLED(CONFIG_LOG_MODE_IMMEDIATE)) {
/* Backend must be thread safe in synchronous operation. */
out_ctx->func((uint8_t *)&c, 1, out_ctx->control_block->ctx);
return 0;