MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / capture_log_sink

Function capture_log_sink

tests/test_graph_buffer.c:1347–1357  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1345static CBMLogFormat g_prev_log_format;
1346
1347static 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
1359static void capture_logs_start(void) {
1360 g_log_capture[0] = '\0';

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected