lightningd/log: clean up nomenclature.

`struct log` becomes `struct logger`, and the member which points to the
`struct log_book` becomes `->log_book` not `->lr`.

Also, we don't need to keep the log_book in struct plugin, since it has
access to ld's log_book.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2023-07-16 15:26:52 +09:30
parent 19d80e1f08
commit c074fe050f
37 changed files with 254 additions and 256 deletions

View File

@@ -59,7 +59,7 @@ struct plugin {
* freeing once empty. */
struct json_stream **js_arr;
struct log *log;
struct logger *log;
/* List of options that this plugin registered */
struct list_head plugin_opts;
@@ -104,8 +104,7 @@ struct plugins {
/* Currently pending requests by their request ID */
STRMAP(struct jsonrpc_request *) pending_requests;
struct log *log;
struct log_book *log_book;
struct logger *log;
struct lightningd *ld;
const char *default_dir;
@@ -349,7 +348,7 @@ struct io_plan *plugin_stdout_conn_init(struct io_conn *conn,
/**
* Needed for I/O logging for plugin messages.
*/
struct log *plugin_get_log(struct plugin *plugin);
struct logger *plugin_get_logger(struct plugin *plugin);
/**
* Tells the plugin system the directory for builtin plugins.