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

Function cbm_daemon_bootstrap_log_directory

src/daemon/bootstrap.c:341–356  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

339static const char BOOTSTRAP_START_FAILURE_LOG_NAME[] = "cbm-daemon.start-failures.log";
340
341bool cbm_daemon_bootstrap_log_directory(char *out, size_t capacity) {
342 if (!out || capacity == 0) {
343 return false;
344 }
345 out[0] = '\0';
346 const char *cache = cbm_resolve_cache_dir();
347 if (!cache || !cache[0]) {
348 return false;
349 }
350 int written = snprintf(out, capacity, "%s/logs", cache);
351 if (written <= 0 || (size_t)written >= capacity) {
352 out[0] = '\0';
353 return false;
354 }
355 return true;
356}
357
358/* One record field: the line format is tab-separated, so a tab or newline in
359 * a value (a path, in theory) becomes '?' rather than a parser ambiguity. */

Calls 1

cbm_resolve_cache_dirFunction · 0.85

Tested by

no test coverage detected