The progress sink replaces normal logger output. Preserve actionable * failures verbatim and, when INFO/DEBUG was already selected before progress * initialization, preserve unrecognized diagnostic lines as well. Logger * callbacks do not include a trailing newline. */
| 420 | * initialization, preserve unrecognized diagnostic lines as well. Logger |
| 421 | * callbacks do not include a trailing newline. */ |
| 422 | static void passthrough_line(const char *line) { |
| 423 | flush_carriage(); |
| 424 | (void)fputs(line, s_out); |
| 425 | size_t line_len = strlen(line); |
| 426 | if (line_len == 0 || line[line_len - 1] != '\n') { |
| 427 | (void)fputc('\n', s_out); |
| 428 | } |
| 429 | (void)fflush(s_out); |
| 430 | } |
| 431 | |
| 432 | void cbm_progress_sink_fn(const char *line) { |
| 433 | progress_sink_mutex_ensure(); |
no test coverage detected