libplugin: logging support.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2019-05-21 17:02:37 +09:30
committed by Christian Decker
parent 6a8cd9a016
commit 44196e7d82
2 changed files with 44 additions and 10 deletions

View File

@@ -8,6 +8,7 @@
#include <common/json_helpers.h>
#include <common/jsonrpc_errors.h>
#include <common/param.h>
#include <common/status_levels.h>
struct command;
struct plugin_conn;
@@ -113,6 +114,9 @@ struct plugin_timer *plugin_timer(struct plugin_conn *rpc,
struct timerel t,
struct command_result *(*cb)(void));
/* Log something */
void PRINTF_FMT(2, 3) plugin_log(enum log_level l, const char *fmt, ...);
/* Macro to define arguments */
#define plugin_option(name, description, set, arg) \
(name), \