Skip to content

Commit

Permalink
logging: backend_fs: disable ANSI color for filesystem logging
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
EricNRS committed Jan 24, 2025
1 parent 5b9064c commit ca35530
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion subsys/logging/backends/log_backend_fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ static void dropped(const struct log_backend *const backend, uint32_t cnt)
static void process(const struct log_backend *const backend,
union log_msg_generic *msg)
{
uint32_t flags = log_backend_std_get_flags();
uint32_t flags = log_backend_std_get_flags() & ~LOG_OUTPUT_FLAG_COLORS;

log_format_func_t log_output_func = log_format_func_t_get(log_format_current);

Expand Down

0 comments on commit ca35530

Please sign in to comment.