gossmap: add (and use) logging hook.
Default goes to stderr for LOG_UNUSUAL and higher. We have to whitelist more cases in map_catchup so we don't spam the logs with perfectly-expected (but ignored) messages though. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Alex Myers
parent
607b14fe12
commit
fdfc7ce62f
@@ -1840,6 +1840,18 @@ void plugin_logv(struct plugin *p, enum log_level l,
|
||||
jsonrpc_finish_and_send(p, js);
|
||||
}
|
||||
|
||||
void plugin_gossmap_logcb(struct plugin *plugin,
|
||||
enum log_level level,
|
||||
const char *fmt,
|
||||
...)
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, fmt);
|
||||
plugin_logv(plugin, level, fmt, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
struct json_stream *plugin_notification_start(struct plugin *plugin,
|
||||
const char *method)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user