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

Function plugin_logv

plugins/libplugin.c:1831–1852  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1829}
1830
1831void plugin_logv(struct plugin *p, enum log_level l,
1832 const char *fmt, va_list ap)
1833{
1834 struct json_stream *js = new_json_stream(NULL, NULL, NULL);
1835
1836 json_object_start(js, NULL);
1837 json_add_string(js, "jsonrpc", "2.0");
1838 json_add_string(js, "method", "log");
1839
1840 json_object_start(js, "params");
1841 json_add_string(js, "level",
1842 l == LOG_TRACE ? "trace"
1843 : l == LOG_DBG ? "debug"
1844 : l == LOG_INFORM ? "info"
1845 : l == LOG_UNUSUAL ? "warn"
1846 : l == LOG_TRACE ? "trace"
1847 : "error");
1848 json_out_addv(js->jout, "message", true, fmt, ap);
1849 json_object_end(js);
1850
1851 jsonrpc_finish_and_send(p, js);
1852}
1853
1854void plugin_gossmap_logcb(struct plugin *plugin,
1855 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