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

Function cmd_log

plugins/askrene/askrene.c:300–322  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

298
299PRINTF_FMT(4, 5)
300static const char *cmd_log(const tal_t *ctx,
301 struct command *cmd,
302 enum log_level level,
303 const char *fmt,
304 ...)
305{
306 va_list args;
307 const char *msg;
308
309 va_start(args, fmt);
310 msg = tal_vfmt(ctx, fmt, args);
311 va_end(args);
312
313 plugin_notify_message(cmd, level, "%s", msg);
314
315 /* Notifications already get logged at debug. Otherwise reduce
316 * severity. */
317 if (level != LOG_DBG)
318 plugin_log(cmd->plugin,
319 level == LOG_BROKEN ? level : level - 1,
320 "%s: %s", cmd->id, msg);
321 return msg;
322}
323
324enum algorithm {
325 /* Min. Cost Flow by successive shortests paths. */

Callers 5

apply_layersFunction · 0.85
reap_childFunction · 0.85
log_msg_inFunction · 0.85
do_getroutesFunction · 0.85
json_getroutesFunction · 0.85

Calls 2

plugin_notify_messageFunction · 0.50
plugin_logFunction · 0.50

Tested by

no test coverage detected