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

Function paymod_log_header

plugins/libplugin-pay.c:137–155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

135}
136
137static void
138paymod_log_header(struct payment *p, const char **type, u64 *id)
139{
140 struct payment *root = payment_root(p);
141 /* We prefer to show the command ID here since it is also known
142 * by `lightningd`, so in theory it can be used to correlate
143 * debugging logs between the main `lightningd` and whatever
144 * plugin is using the paymod system.
145 * We only fall back to a unique id per root payment if there
146 * is no command with an id associated with this payment.
147 */
148 if (root->cmd && root->cmd->id) {
149 *type = "cmd";
150 *id = *root->cmd->id;
151 } else {
152 *type = "id";
153 *id = root->id;
154 }
155}
156
157static void
158paymod_log(struct payment *p, enum log_level l, const char *fmt, ...)

Callers 2

paymod_logFunction · 0.85
paymod_errFunction · 0.85

Calls 1

payment_rootFunction · 0.85

Tested by

no test coverage detected