From bef137209d2e81cbf16752dd9df89fecd15f7795 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Fri, 30 Jun 2023 00:59:47 +0930 Subject: [PATCH] libplugin: expose plugin_logv. If you have your own logging infra, you'll want this. Signed-off-by: Rusty Russell --- plugins/libplugin.c | 4 ++-- plugins/libplugin.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/libplugin.c b/plugins/libplugin.c index 109ba9588..e66f09ca5 100644 --- a/plugins/libplugin.c +++ b/plugins/libplugin.c @@ -1357,8 +1357,8 @@ struct plugin_timer *plugin_timer_(struct plugin *p, struct timerel t, return timer; } -static void plugin_logv(struct plugin *p, enum log_level l, - const char *fmt, va_list ap) +void plugin_logv(struct plugin *p, enum log_level l, + const char *fmt, va_list ap) { struct json_stream *js = new_json_stream(NULL, NULL, NULL); diff --git a/plugins/libplugin.h b/plugins/libplugin.h index efda2f492..4868cf442 100644 --- a/plugins/libplugin.h +++ b/plugins/libplugin.h @@ -372,6 +372,7 @@ struct plugin_timer *plugin_timer_(struct plugin *p, /* Log something */ void plugin_log(struct plugin *p, enum log_level l, const char *fmt, ...) PRINTF_FMT(3, 4); +void plugin_logv(struct plugin *p, enum log_level l, const char *fmt, va_list ap); /* Notify the caller of something. */ struct json_stream *plugin_notify_start(struct command *cmd, const char *method);