mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-03-21 08:40:19 +00:00
logging: log_vprintf: prune ansi sequences when not interactive
Previously colored output using the inline TERM_* macros from color_out.h was done only using the color_printf() function. Since there are now places where they are used with log_msg(), we need to prune ansi codes here too.
This commit is contained in:
@@ -124,6 +124,8 @@ int log_vprintf(int level, const char *format, va_list ap)
|
||||
} else {
|
||||
buf.append(TERM_RESET);
|
||||
}
|
||||
} else {
|
||||
prune_ansi_sequences_inplace(buf.get());
|
||||
}
|
||||
int ret = buf.get().size();
|
||||
buf.submit();
|
||||
|
||||
Reference in New Issue
Block a user