Skip to content

Commit 594aa10

Browse files
author
Tamás Kiss
committed
logging: fix dictionary mode for dropped messages on rtt backend
With the dictionary feature enabled, the RTT backend would still print the "messages dropped" message as a string instead of the binary format. Fix that by calling the correct process function when dictionary mode is enabled. Signed-off-by: Tamás Kiss <[email protected]>
1 parent 3ae962f commit 594aa10

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

subsys/logging/backends/log_backend_rtt.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include <zephyr/logging/log_backend.h>
88
#include <zephyr/logging/log_core.h>
99
#include <zephyr/logging/log_output.h>
10+
#include <zephyr/logging/log_output_dict.h>
1011
#include <zephyr/logging/log_backend_std.h>
1112
#include <SEGGER_RTT.h>
1213

@@ -311,7 +312,11 @@ static void dropped(const struct log_backend *const backend, uint32_t cnt)
311312
{
312313
ARG_UNUSED(backend);
313314

314-
log_backend_std_dropped(&log_output_rtt, cnt);
315+
if (IS_ENABLED(CONFIG_LOG_BACKEND_RTT_OUTPUT_DICTIONARY)) {
316+
log_dict_output_dropped_process(&log_output_rtt, cnt);
317+
} else {
318+
log_backend_std_dropped(&log_output_rtt, cnt);
319+
}
315320
}
316321

317322
static void process(const struct log_backend *const backend,

0 commit comments

Comments
 (0)