Commit graph

6 commits

Author SHA1 Message Date
Krzysztof Chruściński
8652e8e413 logging: Fix LOG_OUTPUT dependency
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>
2024-10-09 18:37:49 +01:00
Daniel Leung
cb0a3ce6aa logging: dictionary: keep string section if always runtime
If logging packages need to be created at runtime, the format
strings need to be in memory for the packaging code to know
what to be packed. So prevent stripping the logging string
section if CONFIG_LOG_ALWAYS_RUNTIME is enabled.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-28 21:14:14 +02:00
Krzysztof Chruściński
5bafa25e13 logging: Use strings stripping for dictionary backends
Enabled by default strings stripping for dictionary based
backends.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-01-15 09:58:39 +01:00
Lucas Denefle
2efc9cc847 logging: enable setting custom logging output func
To enable custom formatting of the log output while still using existing
backend, this commit adds the `log_output_custom` feature.
To use, register a commit with `log_custom_output_msg_set` then set the
log backend format set using `log_backend_format_set` with
`LOG_OUTPUT_CUSTOM`

Signed-off-by: Lucas Denefle <lucas.denefle@converge.io>
2022-10-06 19:15:35 -04:00
Krzysztof Chruscinski
c5f2cdef09 logging: Remove logging v1 from the logging
Remove v1 implementation from log_core and all references in the tree.
Remove modules used by v1: log_list and log_msg.
Remove Kconfig v1 specific options.
Remove Kconfig flags used for distinction between v1 and v2.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-06-16 10:51:15 -04:00
Aastha Grover
c0d7e10beb logging: Add support to backends to switch log format at runtime.
Adding mechanism to all the backends to switch the logging formats
at runtime while leveraging the function pointer table based upon
the Kconfigs which also cleans up the logging backend design.
Also demonstrate the working API with the changes
to syst sample. Clean up Kconfig for backends and add a standard
template to generate the Kconfigs for logging formats to be used
by all backends.

Signed-off-by: Aastha Grover <aastha.grover@intel.com>
2022-02-23 14:12:22 -06:00