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

Function cbm_log_mcp_request

src/foundation/log.c:357–370  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

355}
356
357void cbm_log_mcp_request(const char *method, const char *tool_name, bool is_error,
358 int64_t duration_us) {
359 char duration_ms[CBM_SZ_32];
360 snprintf(duration_ms, sizeof(duration_ms), "%" PRId64, duration_us / 1000);
361 if (tool_name && tool_name[0] != '\0') {
362 cbm_log(is_error ? CBM_LOG_WARN : CBM_LOG_INFO, "mcp.request", "protocol", "jsonrpc",
363 "method", method ? method : "", "tool", tool_name, "status",
364 is_error ? "error" : "ok", "duration_ms", duration_ms, NULL);
365 } else {
366 cbm_log(is_error ? CBM_LOG_WARN : CBM_LOG_INFO, "mcp.request", "protocol", "jsonrpc",
367 "method", method ? method : "", "status", is_error ? "error" : "ok", "duration_ms",
368 duration_ms, NULL);
369 }
370}
371
372void cbm_log_http_request(const char *component, const char *method, const char *path, int status,
373 int64_t duration_ms, size_t request_bytes, size_t response_bytes) {

Callers 2

cbm_mcp_server_handleFunction · 0.85
test_log.cFile · 0.85

Calls 1

cbm_logFunction · 0.85

Tested by

no test coverage detected