Add mock backend to support validating the output logs when switching the log format at runtime. This removes the need to use harness console when ztest framework is in use. Fixes #47077 Signed-off-by: Aastha Grover <aastha.grover@intel.com>
28 lines
666 B
Plaintext
28 lines
666 B
Plaintext
# SPDX-License-Identifier: Apache-2.0
|
|
# Copyright (c) 2022 Intel Corporation
|
|
|
|
config LOG_BACKEND_MOCK
|
|
bool "MOCK backend"
|
|
select LOG_OUTPUT
|
|
help
|
|
When enabled MOCK backend is used for logging. It is
|
|
used to capture the output buffer used for validation of
|
|
log messages. It will not output any logs.
|
|
|
|
if LOG_BACKEND_MOCK
|
|
|
|
backend = MOCK
|
|
backend-str = mock
|
|
source "subsys/logging/Kconfig.template.log_format_config"
|
|
|
|
endif # LOG_BACKEND_MOCK
|
|
|
|
config LOG_BACKEND_DEFAULT
|
|
string "DEFAULT backend"
|
|
default "log_backend_mock" if LOG_BACKEND_MOCK
|
|
help
|
|
Default value for the name of the backend enabled.
|
|
|
|
# Include Zephyr's Kconfig.
|
|
source "Kconfig.zephyr"
|