MCPcopy Create free account
hub / github.com/ElementsProject/lightning / plugin_logv

Function plugin_logv

plugins/libplugin.c:1236–1255  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1234}
1235
1236static void plugin_logv(struct plugin *p, enum log_level l,
1237 const char *fmt, va_list ap)
1238{
1239 struct json_stream *js = new_json_stream(NULL, NULL, NULL);
1240
1241 json_object_start(js, NULL);
1242 json_add_string(js, "jsonrpc", "2.0");
1243 json_add_string(js, "method", "log");
1244
1245 json_object_start(js, "params");
1246 json_add_string(js, "level",
1247 l == LOG_DBG ? "debug"
1248 : l == LOG_INFORM ? "info"
1249 : l == LOG_UNUSUAL ? "warn"
1250 : "error");
1251 json_out_addv(js->jout, "message", true, fmt, ap);
1252 json_object_end(js);
1253
1254 jsonrpc_finish_and_send(p, js);
1255}
1256
1257struct json_stream *plugin_notification_start(struct plugin *plugin,
1258 const char *method)

Callers 2

plugin_errvFunction · 0.85
plugin_logFunction · 0.85

Calls 6

new_json_streamFunction · 0.85
json_out_addvFunction · 0.85
jsonrpc_finish_and_sendFunction · 0.85
json_object_startFunction · 0.50
json_add_stringFunction · 0.50
json_object_endFunction · 0.50

Tested by

no test coverage detected