common: new function command_log to log something about a specific command.
Needs implementations for lightningd and libplugin, since they both use this infrastructure. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include <ccan/compiler/compiler.h>
|
||||
#include <common/json_parse.h>
|
||||
#include <common/jsonrpc_errors.h>
|
||||
#include <common/status_levels.h>
|
||||
|
||||
struct command;
|
||||
struct command_result;
|
||||
@@ -33,6 +34,11 @@ command_fail_badparam(struct command *cmd,
|
||||
json_tok_full(buffer, tok));
|
||||
}
|
||||
|
||||
/* Do some logging (complaining!) about this command misuse */
|
||||
void command_log(struct command *cmd, enum log_level level,
|
||||
const char *fmt, ...)
|
||||
PRINTF_FMT(3, 4);
|
||||
|
||||
/* Also caller supplied: is this invoked simply to get usage? */
|
||||
bool command_usage_only(const struct command *cmd);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user