Skip to content

Commit d7bf4b3

Browse files
EricNRSkartben
authored andcommitted
logging: backend_fs: disable ANSI color for filesystem logging
Before the fix for #77150 was merged, with LOG_BACKEND_SHOW_COLOR=n and CONFIG_SHELL_VT100_COLORS=y the shell would still display colors by enabling the flag in the shell_log_backend.c. Now, LOG_BACKEND_SHOW_COLOR has to be enabled to allow shell logging color, but that writes ANSI escape sequences to the log files. Explicitly disable ANSI color output for the filesystem logging backend. Signed-off-by: Eric Holmberg <eric.holmberg@northriversystems.co.nz>
1 parent 56c5e93 commit d7bf4b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

subsys/logging/backends/log_backend_fs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ static void dropped(const struct log_backend *const backend, uint32_t cnt)
458458
static void process(const struct log_backend *const backend,
459459
union log_msg_generic *msg)
460460
{
461-
uint32_t flags = log_backend_std_get_flags();
461+
uint32_t flags = log_backend_std_get_flags() & ~LOG_OUTPUT_FLAG_COLORS;
462462

463463
log_format_func_t log_output_func = log_format_func_t_get(log_format_current);
464464

0 commit comments

Comments
 (0)