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

Function ui_log_level_name

src/ui/http_server.c:849–857  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

847}
848
849static const char *ui_log_level_name(yyjson_val *v) {
850 static const char *const known[] = {"debug", "log", "info", "warn", "error"};
851 const char *s = (v && yyjson_is_str(v)) ? yyjson_get_str(v) : "";
852 for (size_t i = 0; i < sizeof(known) / sizeof(known[0]); i++) {
853 if (strcmp(s, known[i]) == 0)
854 return known[i];
855 }
856 return "log";
857}
858
859/* Append `,"key":"<escaped value>"` for a string member, or nothing when the
860 * member is absent or not a string (required ones are written empty). */

Callers 1

handle_ui_log_postFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected