| 1345 | static CBMLogFormat g_prev_log_format; |
| 1346 | |
| 1347 | static void capture_log_sink(const char *line) { |
| 1348 | size_t used = strlen(g_log_capture); |
| 1349 | size_t avail = sizeof(g_log_capture) - used; |
| 1350 | if (avail <= 1) { |
| 1351 | return; |
| 1352 | } |
| 1353 | int n = snprintf(g_log_capture + used, avail, "%s\n", line); |
| 1354 | if (n < 0 || (size_t)n >= avail) { |
| 1355 | g_log_capture[sizeof(g_log_capture) - 1] = '\0'; |
| 1356 | } |
| 1357 | } |
| 1358 | |
| 1359 | static void capture_logs_start(void) { |
| 1360 | g_log_capture[0] = '\0'; |
nothing calls this directly
no outgoing calls
no test coverage detected