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

Function plugin_logv

plugins/libplugin.c:1841–1862  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1839}
1840
1841void plugin_logv(struct plugin *p, enum log_level l,
1842 const char *fmt, va_list ap)
1843{
1844 struct json_stream *js = new_json_stream(NULL, NULL, NULL);
1845
1846 json_object_start(js, NULL);
1847 json_add_string(js, "jsonrpc", "2.0");
1848 json_add_string(js, "method", "log");
1849
1850 json_object_start(js, "params");
1851 json_add_string(js, "level",
1852 l == LOG_TRACE ? "trace"
1853 : l == LOG_DBG ? "debug"
1854 : l == LOG_INFORM ? "info"
1855 : l == LOG_UNUSUAL ? "warn"
1856 : l == LOG_TRACE ? "trace"
1857 : "error");
1858 json_out_addv(js->jout, "message", true, fmt, ap);
1859 json_object_end(js);
1860
1861 jsonrpc_finish_and_send(p, js);
1862}
1863
1864void plugin_gossmap_logcb(struct plugin *plugin,
1865 enum log_level level,

Callers 3

plugin_gossmap_logcbFunction · 0.85
plugin_errvFunction · 0.85
plugin_logFunction · 0.85

Calls 6

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

Tested by

no test coverage detected