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