Commit graph

11 commits

Author SHA1 Message Date
Dawid Niedzwiecki ea630294d3 logging: add flag to skip source info
Add a flag to skip printing the source info.

Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
2024-01-22 14:05:11 -05:00
Flavio Ceolin 84f679d22d logging: Fix misuse of const and k_tid_t
"const k_tid_t" is "struct k_thread * const" and not
"const struct k_thread *" as the code may be assuming. Just
drop it.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-10-20 15:08:42 +02:00
Krzysztof Chruściński cebd140bee logging: log_output: Add optional tid formatting
Add option to prefix log message with thread ID or thread name.
Align tests and add test case to the log_output test.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2023-08-31 14:08:19 +02:00
Xudong Zheng 79c4c82baf logging: change log_output_timestamp_to_us() to take log_timestamp_t
If CONFIG_LOG_TIMESTAMP_64BIT is enabled, the timestamp will be 64-bit

Signed-off-by: Xudong Zheng <7pkvm5aw@slicealias.com>
2023-05-08 16:57:02 -04: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 15fdee04e3 logging: log_output: Add function for processing input arguments
Add function which formats a logging string from input parameters
and not from logging message. This function is more flexible since
it does not require data to be placed in the log message.

Converted a function for message processing to used this new function
internally.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-07-21 09:04:37 -04:00
Krzysztof Chruscinski 9833ca61c9 logging: Removing v2 suffix from logging names
Renaming objects which had 2 in the name to indicate that
it is v2 specific. Once logging v1 has been removed such
suffixes are redundant.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-06-23 15:46:37 -04:00
Krzysztof Chruscinski 7f1b4f88e3 logging: Rename files and test from log_msg2 to log_msg
Renaming log_msg2 files to log_msg.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-06-23 09:10:33 +02: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
Gerard Marull-Paretas fb9b3bcd93 include: migrate includes to <zephyr/...>
In order to bring consistency in-tree, migrate all includes within
include directory to the new prefix <zephyr/...>. Note that the
conversion has been scripted, refer to zephyrproject-rtos#45388 for more
details.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-05-06 20:03:00 +02:00
Yuval Peress 53ef68d459 include: Prefix includes to use a scope
Move include paths and add new target_include_directories to support
backwards compatibility:
* /include -> /include/zephyr
  example: <irq.h> -> <zephyr/irq.h>

Issue #41543

Signed-off-by: Yuval Peress <peress@google.com>
2022-04-08 19:03:32 +02:00
Renamed from include/logging/log_output.h (Browse further)