2016-12-17 12:56:56 -05:00
|
|
|
# Copyright (c) 2016 Intel Corporation
|
2017-01-18 17:01:01 -08:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
2016-12-17 12:56:56 -05:00
|
|
|
|
2022-09-09 06:25:51 +02:00
|
|
|
menu "Logging"
|
|
|
|
|
|
|
|
config LOG
|
2019-03-25 17:00:12 +01:00
|
|
|
bool "Logging"
|
logging: Add basic userspace support
This commit adds basic userspace support to the logging subsystem.
With this change, the following API could be called from user mode:
- LOG_*()
- LOG_INST_*(),
- LOG_HEXDUMP_*(),
- LOG_HEXDUMP_INST_*(),
- LOG_PANIC(), LOG_PROCESS(),
- log_printk(), log_generic(), log_buffrered_cnt(),
- log_filter_set(NULL, ...)
With userspace disabled, the logger behavior and performance
is not affected. With userspace enabled, the calls from kernel
space have an additional overhead introduced by _is_user_context().
The logger behavior changes when it is called from the user context.
All strings logged using LOG_*() and LOG_INST_*() API from userspace
are rendered in place for security reasons and then placed in
log_strdup() memory pool, which should be large enough to hold bursts
of log messages.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
2019-08-22 11:13:22 +02:00
|
|
|
select PRINTK if USERSPACE
|
2018-05-16 08:50:33 +02:00
|
|
|
help
|
|
|
|
Global switch for the logger, when turned off log calls will not be
|
|
|
|
compiled in.
|
|
|
|
|
|
|
|
if LOG
|
2019-03-25 17:00:12 +01:00
|
|
|
|
2022-12-06 15:31:46 -08:00
|
|
|
config LOG_CORE_INIT_PRIORITY
|
|
|
|
int "Log Core Initialization Priority"
|
|
|
|
range 0 99
|
|
|
|
default 0
|
|
|
|
|
2021-01-18 14:31:11 +01:00
|
|
|
rsource "Kconfig.mode"
|
2018-05-16 08:50:33 +02:00
|
|
|
|
2021-01-18 14:31:11 +01:00
|
|
|
rsource "Kconfig.filtering"
|
2019-10-29 05:45:55 +08:00
|
|
|
|
2022-03-29 15:47:01 +02:00
|
|
|
rsource "Kconfig.processing"
|
|
|
|
|
2022-06-24 07:00:31 +02:00
|
|
|
if !LOG_MODE_MINIMAL
|
2018-12-20 09:01:14 +01:00
|
|
|
|
2021-01-18 14:31:11 +01:00
|
|
|
rsource "Kconfig.formatting"
|
2019-10-29 05:56:10 +08:00
|
|
|
|
2022-06-24 07:00:31 +02:00
|
|
|
if !LOG_FRONTEND_ONLY
|
|
|
|
|
2022-09-24 13:39:42 -04:00
|
|
|
rsource "backends/Kconfig"
|
2018-10-17 10:17:14 +02:00
|
|
|
|
2022-06-24 07:00:31 +02:00
|
|
|
endif # !LOG_FRONTEND_ONLY
|
|
|
|
|
|
|
|
endif # !LOG_MODE_MINIMAL
|
2019-03-13 09:54:56 +01:00
|
|
|
|
2022-03-29 15:45:41 +02:00
|
|
|
if LOG_FRONTEND
|
|
|
|
|
2024-04-25 08:11:59 +02:00
|
|
|
rsource "frontends/Kconfig"
|
2022-03-29 15:45:41 +02:00
|
|
|
|
|
|
|
endif #LOG_FRONTEND
|
|
|
|
|
2021-08-12 09:12:24 +02:00
|
|
|
if LOG_MULTIDOMAIN
|
|
|
|
|
|
|
|
rsource "Kconfig.links"
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
2021-01-18 14:31:11 +01:00
|
|
|
rsource "Kconfig.misc"
|
2018-09-13 12:52:32 +03:00
|
|
|
|
2019-03-25 17:00:12 +01:00
|
|
|
endif # LOG
|
2022-09-09 06:25:51 +02:00
|
|
|
|
|
|
|
config LOG_OUTPUT
|
|
|
|
bool "Formatter helper"
|
|
|
|
help
|
|
|
|
Module which provides formatting of log messages to a human-readable
|
|
|
|
strings.
|
|
|
|
|
|
|
|
endmenu
|