Skip to content

Commit

Permalink
logging: Fix LOG_OUTPUT dependency
Browse files Browse the repository at this point in the history
When CONFIG_LOG_OUTPUT is set, it indicates that logging strings
are formatted by the application (using log_output module). It is
not needed when backend works in the dictionary mode. So far
LOG_OUTPUT was set also when dictionary mode was used and that
prevented removing of the logging strings from binary which is
an important feature of the dictionary logging.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
  • Loading branch information
nordic-krch authored and fabiobaltieri committed Oct 9, 2024
1 parent df683fd commit 8652e8e
Show file tree
Hide file tree
Showing 14 changed files with 1 addition and 13 deletions.
1 change: 1 addition & 0 deletions subsys/logging/Kconfig.template.log_format_config
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ choice "LOG_BACKEND_$(backend)_OUTPUT"

config LOG_BACKEND_$(backend)_OUTPUT_TEXT
bool "Text"
select LOG_OUTPUT
help
Output in text.

Expand Down
1 change: 0 additions & 1 deletion subsys/logging/backends/Kconfig.adsp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
config LOG_BACKEND_ADSP
bool "Intel ADSP buffer backend"
depends on SOC_FAMILY_INTEL_ADSP
select LOG_OUTPUT
select LOG_BACKEND_SUPPORTS_FORMAT_TIMESTAMP
help
Enable backend for the host trace protocol of the Intel ADSP
Expand Down
1 change: 0 additions & 1 deletion subsys/logging/backends/Kconfig.adsp_mtrace
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
config LOG_BACKEND_ADSP_MTRACE
bool "Intel ADSP mtrace backend"
depends on SOC_FAMILY_INTEL_ADSP
select LOG_OUTPUT
select LOG_BACKEND_SUPPORTS_FORMAT_TIMESTAMP
help
Provide a logging backend which writes to SRAM window
Expand Down
1 change: 0 additions & 1 deletion subsys/logging/backends/Kconfig.ble
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ config LOG_BACKEND_BLE
bool "Bluetooth Low Energy (BLE) backend"
depends on BT
depends on LOG_PROCESS_THREAD_STACK_SIZE>=2048
select LOG_OUTPUT
select EXPERIMENTAL
help
Backend that sends log messages over Bluetooth LE Notifications. This
Expand Down
1 change: 0 additions & 1 deletion subsys/logging/backends/Kconfig.efi_console
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
config LOG_BACKEND_EFI_CONSOLE
bool "EFI_CONSOLE backend"
depends on X86_EFI_CONSOLE
select LOG_OUTPUT
default y if !UART_CONSOLE
help
When enabled backend is using EFI CONSOLE to output logs.
Expand Down
1 change: 0 additions & 1 deletion subsys/logging/backends/Kconfig.fs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
config LOG_BACKEND_FS
bool "File system backend"
depends on FILE_SYSTEM
select LOG_OUTPUT
select LOG_BACKEND_SUPPORTS_FORMAT_TIMESTAMP
help
When enabled, backend is using the configured file system to output logs.
Expand Down
1 change: 0 additions & 1 deletion subsys/logging/backends/Kconfig.native_posix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ config LOG_BACKEND_NATIVE_POSIX
bool "Native backend"
depends on ARCH_POSIX
default y
select LOG_OUTPUT
select LOG_BACKEND_SUPPORTS_FORMAT_TIMESTAMP
help
Enable backend in native_posix
Expand Down
1 change: 0 additions & 1 deletion subsys/logging/backends/Kconfig.net
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
config LOG_BACKEND_NET
bool "Networking backend"
depends on NETWORKING && (NET_UDP || NET_TCP) && !LOG_MODE_IMMEDIATE
select LOG_OUTPUT
help
Send syslog messages to network server.
See RFC 5424 (syslog protocol) and RFC 5426 (syslog over UDP) and
Expand Down
1 change: 0 additions & 1 deletion subsys/logging/backends/Kconfig.rtt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ config LOG_BACKEND_RTT
depends on USE_SEGGER_RTT
default y if !SHELL_BACKEND_RTT
select SEGGER_RTT_CUSTOM_LOCKING
select LOG_OUTPUT
select LOG_BACKEND_SUPPORTS_FORMAT_TIMESTAMP
help
When enabled, backend will use RTT for logging. This backend works on a per
Expand Down
1 change: 0 additions & 1 deletion subsys/logging/backends/Kconfig.semihost
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
config LOG_BACKEND_SEMIHOST
bool "Semihost as backend"
depends on SEMIHOST
select LOG_OUTPUT
select LOG_BACKEND_SUPPORTS_FORMAT_TIMESTAMP
help
Enable backend in semihost (using host stdout)
Expand Down
1 change: 0 additions & 1 deletion subsys/logging/backends/Kconfig.spinel
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ config LOG_BACKEND_SPINEL
bool "OpenThread dedicated Spinel protocol backend"
depends on !LOG_BACKEND_UART
depends on NET_L2_OPENTHREAD
select LOG_OUTPUT
help
When enabled, backend will use OpenThread dedicated SPINEL protocol for logging.
This protocol is byte oriented and wraps given messages into serial frames.
Expand Down
1 change: 0 additions & 1 deletion subsys/logging/backends/Kconfig.swo
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
config LOG_BACKEND_SWO
bool "Serial Wire Output (SWO) backend"
depends on HAS_SWO
select LOG_OUTPUT
select LOG_BACKEND_SUPPORTS_FORMAT_TIMESTAMP
help
When enabled, backend will use SWO for logging.
Expand Down
1 change: 0 additions & 1 deletion subsys/logging/backends/Kconfig.uart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ config LOG_BACKEND_UART
bool "UART backend"
depends on UART_CONSOLE
default y if !SHELL_BACKEND_SERIAL && !SHELL_BACKEND_RTT
select LOG_OUTPUT
select LOG_BACKEND_SUPPORTS_FORMAT_TIMESTAMP
help
When enabled backend is using UART to output logs.
Expand Down
1 change: 0 additions & 1 deletion subsys/logging/backends/Kconfig.xtensa_sim
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ config LOG_BACKEND_XTENSA_SIM
bool "Xtensa simulator backend"
depends on SOC_XTENSA_SAMPLE_CONTROLLER || SOC_XTENSA_DC233C || SOC_FAMILY_INTEL_ADSP
default y if SOC_XTENSA_SAMPLE_CONTROLLER || SOC_XTENSA_DC233C
select LOG_OUTPUT
select LOG_BACKEND_SUPPORTS_FORMAT_TIMESTAMP
help
Enable backend in xtensa simulator
Expand Down

0 comments on commit 8652e8e

Please sign in to comment.