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

Function application_worker_diagnostic

src/daemon/application.c:345–359  ·  view source on GitHub ↗

Reuse the supervisor's bounded completed-line relay. Only actionable worker * diagnostics enter the daemon journal; ordinary progress stays in worker logs. */

Source from the content-addressed store, hash-verified

343/* Reuse the supervisor's bounded completed-line relay. Only actionable worker
344 * diagnostics enter the daemon journal; ordinary progress stays in worker logs. */
345static void application_worker_diagnostic(const char *line, void *context) {
346 const application_default_worker_t *worker = context;
347 if (!line || !worker) {
348 return;
349 }
350 if (!strncmp(line, "level=error ", strlen("level=error ")) ||
351 strstr(line, "\"level\":\"error\"")) {
352 cbm_log_error("index.worker", "project", worker->project ? worker->project : "", "record",
353 line);
354 } else if (!strncmp(line, "level=warn ", strlen("level=warn ")) ||
355 strstr(line, "\"level\":\"warn\"")) {
356 cbm_log_warn("index.worker", "project", worker->project ? worker->project : "", "record",
357 line);
358 }
359}
360
361static int application_worker_start_default(void *context, const char *args_json,
362 size_t memory_budget_bytes, const char *marker_file,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected