Logging: both to the command itself and the log file */
| 245 | |
| 246 | /* Logging: both to the command itself and the log file */ |
| 247 | static void payment_log(struct payment *payment, |
| 248 | enum log_level level, |
| 249 | const char *fmt, |
| 250 | ...) |
| 251 | { |
| 252 | va_list args; |
| 253 | const char *msg; |
| 254 | |
| 255 | va_start(args, fmt); |
| 256 | msg = tal_vfmt(tmpctx, fmt, args); |
| 257 | va_end(args); |
| 258 | |
| 259 | if (payment->cmd) |
| 260 | plugin_notify_message(payment->cmd, level, "%s", msg); |
| 261 | plugin_log(payment->plugin, level, "%"PRIu64": %s", |
| 262 | payment->unique_id, msg); |
| 263 | } |
| 264 | |
| 265 | static void attempt_log(struct attempt *attempt, |
| 266 | enum log_level level, |
no test coverage detected