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

Function cmd_log

plugins/askrene/askrene.c:349–371  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

347
348PRINTF_FMT(4, 5)
349static const char *cmd_log(const tal_t *ctx,
350 struct command *cmd,
351 enum log_level level,
352 const char *fmt,
353 ...)
354{
355 va_list args;
356 const char *msg;
357
358 va_start(args, fmt);
359 msg = tal_vfmt(ctx, fmt, args);
360 va_end(args);
361
362 plugin_notify_message(cmd, level, "%s", msg);
363
364 /* Notifications already get logged at debug. Otherwise reduce
365 * severity. */
366 if (level != LOG_DBG)
367 plugin_log(cmd->plugin,
368 level == LOG_BROKEN ? level : level - 1,
369 "%s: %s", cmd->id, msg);
370 return msg;
371}
372
373enum algorithm {
374 /* 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