Browse Source

lightningd: remove per-peer log book.

We had a separate logbook for each peer, and copy log entries above
the printable log level into the master logbook.  This didn't always
work well, since we didn't dump it on crash for example.

Keep a single global logbook instead, and remove this infrastructure.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
travis-debug
Rusty Russell 5 years ago
parent
commit
86fb54a33b
  1. 3
      lightningd/channel.c
  2. 4
      lightningd/jsonrpc.c
  3. 4
      lightningd/lightningd.c
  4. 149
      lightningd/log.c
  5. 56
      lightningd/log.h
  6. 2
      lightningd/opening_control.c
  7. 23
      lightningd/peer_control.c
  8. 3
      lightningd/peer_control.h
  9. 2
      lightningd/subd.c
  10. 3
      lightningd/test/run-find_my_abspath.c
  11. 32
      lightningd/test/run-invoice-select-inchan.c
  12. 9
      lightningd/test/run-jsonrpc.c
  13. 37
      wallet/test/run-wallet.c

3
lightningd/channel.c

@ -208,9 +208,8 @@ struct channel *new_channel(struct peer *peer, u64 dbid,
channel->billboard.transient = tal_strdup(channel, transient_billboard);
if (!log) {
/* FIXME: update log prefix when we get scid */
channel->log = new_log(channel,
peer->log_book,
peer->ld->log_book,
&channel->peer->id,
"chan #%"PRIu64":",
dbid);

4
lightningd/jsonrpc.c

@ -903,8 +903,8 @@ static struct io_plan *jcon_connected(struct io_conn *conn,
list_head_init(&jcon->commands);
/* We want to log on destruction, so we free this in destructor. */
jcon->log = new_log(ld->log_book, ld->log_book, NULL, "%sjcon fd %i:",
log_prefix(ld->log), io_conn_fd(conn));
jcon->log = new_log(ld->log_book, ld->log_book, NULL, "jcon fd %i:",
io_conn_fd(conn));
tal_add_destructor(jcon, destroy_jcon);

4
lightningd/lightningd.c

@ -161,11 +161,11 @@ static struct lightningd *new_lightningd(const tal_t *ctx)
htlc_in_map_init(&ld->htlcs_in);
htlc_out_map_init(&ld->htlcs_out);
/*~ We have a two-level log-book infrastructure: we define a 20MB log
/*~ We have a multi-entry log-book infrastructure: we define a 100MB log
* book to hold all the entries (and trims as necessary), and multiple
* log objects which each can write into it, each with a unique
* prefix. */
ld->log_book = new_log_book(ld, 20*1024*1024, LOG_INFORM);
ld->log_book = new_log_book(ld, 100*1024*1024, LOG_INFORM);
/*~ Note the tal context arg (by convention, the first argument to any
* allocation function): ld->log will be implicitly freed when ld
* is. */

149
lightningd/log.c

@ -35,17 +35,9 @@ struct log *crashlog;
struct log_book {
size_t mem_used;
size_t max_mem;
void (*print)(const char *prefix,
enum log_level level,
const struct node_id *node_id,
bool continued,
const struct timeabs *time,
const char *str,
const u8 *io, size_t io_len,
void *arg);
void *print_arg;
enum log_level print_level;
struct timeabs init_time;
FILE *outf;
struct list_head log;
/* Although log_book will copy log entries to parent log_book
@ -121,18 +113,6 @@ static void log_to_file(const char *prefix,
fflush(logf);
}
static void log_to_stdout(const char *prefix,
enum log_level level,
const struct node_id *node_id,
bool continued,
const struct timeabs *time,
const char *str,
const u8 *io, size_t io_len,
void *unused UNUSED)
{
log_to_file(prefix, level, node_id, continued, time, str, io, io_len, stdout);
}
static size_t mem_used(const struct log_entry *e)
{
return sizeof(*e) + strlen(e->log) + 1 + tal_count(e->io);
@ -174,7 +154,7 @@ struct log_book *new_log_book(struct lightningd *ld, size_t max_mem,
assert(max_mem > sizeof(struct log) * 2);
lr->mem_used = 0;
lr->max_mem = max_mem;
lr->print = log_to_stdout;
lr->outf = stdout;
lr->print_level = printlevel;
lr->init_time = time_now();
lr->ld = ld;
@ -207,51 +187,11 @@ new_log(const tal_t *ctx, struct log_book *record,
return log;
}
struct log_book *get_log_book(const struct log *log)
{
return log->lr;
}
enum log_level get_log_level(struct log_book *lr)
{
return lr->print_level;
}
void set_log_outfn_(struct log_book *lr,
void (*print)(const char *prefix,
enum log_level level,
const struct node_id *node,
bool continued,
const struct timeabs *time,
const char *str,
const u8 *io, size_t io_len,
void *arg),
void *arg)
{
lr->print = print;
lr->print_arg = arg;
}
const char *log_prefix(const struct log *log)
{
return log->prefix;
}
size_t log_max_mem(const struct log_book *lr)
{
return lr->max_mem;
}
size_t log_used(const struct log_book *lr)
{
return lr->mem_used;
}
const struct timeabs *log_init_time(const struct log_book *lr)
{
return &lr->init_time;
}
static void add_entry(struct log *log, struct log_entry *l)
{
log->lr->mem_used += mem_used(l);
@ -289,9 +229,9 @@ static void maybe_print(const struct log *log, const struct log_entry *l,
size_t offset)
{
if (l->level >= log->lr->print_level)
log->lr->print(log->prefix, l->level, l->node_id, offset != 0,
&l->time, l->log + offset,
l->io, tal_bytelen(l->io), log->lr->print_arg);
log_to_file(log->prefix, l->level, l->node_id, offset != 0,
&l->time, l->log + offset,
l->io, tal_bytelen(l->io), log->lr->outf);
}
void logv(struct log *log, enum log_level level,
@ -333,9 +273,9 @@ void log_io(struct log *log, enum log_level dir,
/* Print first, in case we need to truncate. */
if (l->level >= log->lr->print_level)
log->lr->print(log->prefix, l->level, l->node_id, false,
&l->time, str,
data, len, log->lr->print_arg);
log_to_file(log->prefix, l->level, l->node_id, false,
&l->time, str,
data, len, log->lr->outf);
l->log = tal_strdup(l, str);
@ -392,16 +332,27 @@ void log_add(struct log *log, const char *fmt, ...)
va_end(ap);
}
void log_each_line_(const struct log_book *lr,
void (*func)(unsigned int skipped,
struct timerel time,
enum log_level level,
const struct node_id *node_id,
const char *prefix,
const char *log,
const u8 *io,
void *arg),
void *arg)
#define log_each_line(lr, func, arg) \
log_each_line_((lr), \
typesafe_cb_preargs(void, void *, (func), (arg), \
unsigned int, \
struct timerel, \
enum log_level, \
const struct node_id *, \
const char *, \
const char *, \
const u8 *), (arg))
static void log_each_line_(const struct log_book *lr,
void (*func)(unsigned int skipped,
struct timerel time,
enum log_level level,
const struct node_id *node_id,
const char *prefix,
const char *log,
const u8 *io,
void *arg),
void *arg)
{
const struct log_entry *i;
@ -528,15 +479,12 @@ static struct io_plan *setup_read(struct io_conn *conn, struct lightningd *ld);
static struct io_plan *rotate_log(struct io_conn *conn, struct lightningd *ld)
{
FILE *logf;
log_info(ld->log, "Ending log due to SIGHUP");
fclose(ld->log->lr->print_arg);
fclose(ld->log->lr->outf);
logf = fopen(ld->logfile, "a");
if (!logf)
ld->log->lr->outf = fopen(ld->logfile, "a");
if (!ld->log->lr->outf)
err(1, "failed to reopen log file %s", ld->logfile);
set_log_outfn(ld->log->lr, log_to_file, logf);
log_info(ld->log, "Started log due to SIGHUP");
return setup_read(conn, ld);
@ -569,25 +517,23 @@ static void setup_log_rotation(struct lightningd *ld)
char *arg_log_to_file(const char *arg, struct lightningd *ld)
{
const struct log_entry *i;
FILE *logf;
int size;
if (ld->logfile) {
fclose(ld->log->lr->print_arg);
fclose(ld->log->lr->outf);
ld->logfile = tal_free(ld->logfile);
} else
setup_log_rotation(ld);
ld->logfile = tal_strdup(ld, arg);
logf = fopen(arg, "a");
if (!logf)
ld->log->lr->outf = fopen(arg, "a");
if (!ld->log->lr->outf)
return tal_fmt(NULL, "Failed to open: %s", strerror(errno));
set_log_outfn(ld->log->lr, log_to_file, logf);
/* For convenience make a block of empty lines just like Bitcoin Core */
size = ftell(logf);
size = ftell(ld->log->lr->outf);
if (size > 0)
fprintf(logf, "\n\n\n\n");
fprintf(ld->log->lr->outf, "\n\n\n\n");
/* Catch up */
list_for_each(&ld->log->lr->log, i, list)
@ -646,7 +592,6 @@ static void log_dump_to_file(int fd, const struct log_book *lr)
write_all(fd, "\n\n", strlen("\n\n"));
}
/* FIXME: Dump peer logs! */
void log_backtrace_exit(void)
{
int fd;
@ -699,6 +644,8 @@ struct log_info {
enum log_level level;
struct json_stream *response;
unsigned int num_skipped;
/* If non-null, only show messages about this peer */
const struct node_id *node_id;
};
static void add_skipped(struct log_info *info)
@ -723,6 +670,11 @@ static void log_to_json(unsigned int skipped,
{
info->num_skipped += skipped;
if (info->node_id) {
if (!node_id || !node_id_eq(node_id, info->node_id))
return;
}
if (level < info->level) {
info->num_skipped++;
return;
@ -751,13 +703,16 @@ static void log_to_json(unsigned int skipped,
}
void json_add_log(struct json_stream *response,
const struct log_book *lr, enum log_level minlevel)
const struct log_book *lr,
const struct node_id *node_id,
enum log_level minlevel)
{
struct log_info info;
info.level = minlevel;
info.response = response;
info.num_skipped = 0;
info.node_id = node_id;
json_array_start(info.response, "log");
log_each_line(lr, log_to_json, &info);
@ -808,10 +763,10 @@ static struct command_result *json_getlog(struct command *cmd,
response = json_stream_success(cmd);
/* Suppress logging for this stream, to not bloat io logs */
json_stream_log_suppress_for_cmd(response, cmd);
json_add_time(response, "created_at", log_init_time(lr)->ts);
json_add_num(response, "bytes_used", (unsigned int) log_used(lr));
json_add_num(response, "bytes_max", (unsigned int) log_max_mem(lr));
json_add_log(response, lr, *minlevel);
json_add_time(response, "created_at", lr->init_time.ts);
json_add_num(response, "bytes_used", (unsigned int)lr->mem_used);
json_add_num(response, "bytes_max", (unsigned int)lr->max_mem);
json_add_log(response, lr, NULL, *minlevel);
return command_success(cmd, response);
}

56
lightningd/log.h

@ -51,59 +51,7 @@ void logv(struct log *log, enum log_level level, const struct node_id *node_id,
bool call_notifier, const char *fmt, va_list ap);
void logv_add(struct log *log, const char *fmt, va_list ap);
enum log_level get_log_level(struct log_book *lr);
const char *log_prefix(const struct log *log);
struct log_book *get_log_book(const struct log *log);
#define set_log_outfn(lr, print, arg) \
set_log_outfn_((lr), \
typesafe_cb_preargs(void, void *, (print), (arg),\
const char *, \
enum log_level, \
const struct node_id *, \
bool, \
const struct timeabs *, \
const char *, \
const u8 *, size_t), (arg))
/* If level == LOG_IO_IN/LOG_IO_OUT, then io contains data */
void set_log_outfn_(struct log_book *lr,
void (*print)(const char *prefix,
enum log_level level,
const struct node_id *node_id,
bool continued,
const struct timeabs *time,
const char *str,
const u8 *io, size_t io_len,
void *arg),
void *arg);
size_t log_max_mem(const struct log_book *lr);
size_t log_used(const struct log_book *lr);
const struct timeabs *log_init_time(const struct log_book *lr);
#define log_each_line(lr, func, arg) \
log_each_line_((lr), \
typesafe_cb_preargs(void, void *, (func), (arg), \
unsigned int, \
struct timerel, \
enum log_level, \
const struct node_id *, \
const char *, \
const char *, \
const u8 *), (arg))
void log_each_line_(const struct log_book *lr,
void (*func)(unsigned int skipped,
struct timerel time,
enum log_level level,
const struct node_id *node_id,
const char *prefix,
const char *log,
const u8 *io,
void *arg),
void *arg);
void opt_register_logging(struct lightningd *ld);
@ -118,7 +66,9 @@ void log_backtrace_exit(void);
/* Adds an array showing log entries */
void json_add_log(struct json_stream *result,
const struct log_book *lr, enum log_level minlevel);
const struct log_book *lr,
const struct node_id *node_id,
enum log_level minlevel);
struct command_result *param_loglevel(struct command *cmd,
const char *name,

2
lightningd/opening_control.c

@ -628,7 +628,7 @@ new_uncommitted_channel(struct peer *peer)
uc->transient_billboard = NULL;
uc->dbid = wallet_get_channel_dbid(ld->wallet);
uc->log = new_log(uc, uc->peer->log_book, &uc->peer->id,
uc->log = new_log(uc, ld->log_book, &uc->peer->id,
"chan #%"PRIu64":", uc->dbid);
uc->fc = NULL;

23
lightningd/peer_control.c

@ -72,24 +72,6 @@ static void destroy_peer(struct peer *peer)
list_del_from(&peer->ld->peers, &peer->list);
}
/* We copy per-peer entries above --log-level into the main log. */
static void copy_to_parent_log(const char *prefix,
enum log_level level,
const struct node_id *node_id,
bool continued,
const struct timeabs *time UNUSED,
const char *str,
const u8 *io, size_t io_len,
struct log *parent_log)
{
if (level == LOG_IO_IN || level == LOG_IO_OUT)
log_io(parent_log, level, node_id, prefix, io, io_len);
else if (continued)
log_add(parent_log, "%s ... %s", prefix, str);
else
log_(parent_log, level, node_id, false, "%s %s", prefix, str);
}
static void peer_update_features(struct peer *peer, const u8 *features TAKES)
{
tal_free(peer->features);
@ -116,9 +98,6 @@ struct peer *new_peer(struct lightningd *ld, u64 dbid,
peer->ignore_htlcs = false;
#endif
/* Max 128k per peer. */
peer->log_book = new_log_book(peer->ld, 128*1024, get_log_level(ld->log_book));
set_log_outfn(peer->log_book, copy_to_parent_log, ld->log);
list_add_tail(&ld->peers, &peer->list);
tal_add_destructor(peer, destroy_peer);
return peer;
@ -1145,7 +1124,7 @@ static void json_add_peer(struct lightningd *ld,
json_array_end(response);
if (ll)
json_add_log(response, p->log_book, *ll);
json_add_log(response, ld->log_book, &p->id, *ll);
json_object_end(response);
}

3
lightningd/peer_control.h

@ -36,9 +36,6 @@ struct peer {
/* Our (only) uncommitted channel, still opening. */
struct uncommitted_channel *uncommitted_channel;
/* History */
struct log_book *log_book;
/* Where we connected to, or it connected from. */
struct wireaddr_internal addr;

2
lightningd/subd.c

@ -639,7 +639,7 @@ static struct subd *new_subd(struct lightningd *ld,
}
sd->ld = ld;
if (base_log) {
sd->log = new_log(sd, get_log_book(base_log), node_id,
sd->log = new_log(sd, ld->log_book, node_id,
"%s-%s", name, log_prefix(base_log));
} else {
sd->log = new_log(sd, ld->log_book, node_id,

3
lightningd/test/run-find_my_abspath.c

@ -75,9 +75,6 @@ bool fromwire_status_peer_billboard(const tal_t *ctx UNNEEDED, const void *p UNN
/* Generated stub for fromwire_status_peer_error */
bool fromwire_status_peer_error(const tal_t *ctx UNNEEDED, const void *p UNNEEDED, struct channel_id *channel UNNEEDED, wirestring **desc UNNEEDED, bool *soft_error UNNEEDED, struct per_peer_state **pps UNNEEDED, u8 **error_for_them UNNEEDED)
{ fprintf(stderr, "fromwire_status_peer_error called!\n"); abort(); }
/* Generated stub for get_log_book */
struct log_book *get_log_book(const struct log *log UNNEEDED)
{ fprintf(stderr, "get_log_book called!\n"); abort(); }
/* Generated stub for gossip_init */
void gossip_init(struct lightningd *ld UNNEEDED, int connectd_fd UNNEEDED)
{ fprintf(stderr, "gossip_init called!\n"); abort(); }

32
lightningd/test/run-invoice-select-inchan.c

@ -120,9 +120,6 @@ void fulfill_htlc(struct htlc_in *hin UNNEEDED, const struct preimage *preimage
/* Generated stub for get_block_height */
u32 get_block_height(const struct chain_topology *topo UNNEEDED)
{ fprintf(stderr, "get_block_height called!\n"); abort(); }
/* Generated stub for get_log_level */
enum log_level get_log_level(struct log_book *lr UNNEEDED)
{ fprintf(stderr, "get_log_level called!\n"); abort(); }
/* Generated stub for htlc_is_trimmed */
bool htlc_is_trimmed(enum side htlc_owner UNNEEDED,
struct amount_msat htlc_amount UNNEEDED,
@ -178,7 +175,9 @@ void json_add_hex_talarr(struct json_stream *result UNNEEDED,
{ fprintf(stderr, "json_add_hex_talarr called!\n"); abort(); }
/* Generated stub for json_add_log */
void json_add_log(struct json_stream *result UNNEEDED,
const struct log_book *lr UNNEEDED, enum log_level minlevel UNNEEDED)
const struct log_book *lr UNNEEDED,
const struct node_id *node_id UNNEEDED,
enum log_level minlevel UNNEEDED)
{ fprintf(stderr, "json_add_log called!\n"); abort(); }
/* Generated stub for json_add_node_id */
void json_add_node_id(struct json_stream *response UNNEEDED,
@ -267,15 +266,6 @@ void log_(struct log *log UNNEEDED, enum log_level level UNNEEDED,
const char *fmt UNNEEDED, ...)
{ fprintf(stderr, "log_ called!\n"); abort(); }
/* Generated stub for log_add */
void log_add(struct log *log UNNEEDED, const char *fmt UNNEEDED, ...)
{ fprintf(stderr, "log_add called!\n"); abort(); }
/* Generated stub for log_io */
void log_io(struct log *log UNNEEDED, enum log_level dir UNNEEDED,
const struct node_id *node_id UNNEEDED,
const char *comment UNNEEDED,
const void *data UNNEEDED, size_t len UNNEEDED)
{ fprintf(stderr, "log_io called!\n"); abort(); }
/* Generated stub for new_bolt11 */
struct bolt11 *new_bolt11(const tal_t *ctx UNNEEDED,
const struct amount_msat *msat TAKES UNNEEDED)
@ -285,10 +275,6 @@ struct log *new_log(const tal_t *ctx UNNEEDED, struct log_book *record UNNEEDED,
const struct node_id *default_node_id UNNEEDED,
const char *fmt UNNEEDED, ...)
{ fprintf(stderr, "new_log called!\n"); abort(); }
/* Generated stub for new_log_book */
struct log_book *new_log_book(struct lightningd *ld UNNEEDED, size_t max_mem UNNEEDED,
enum log_level printlevel UNNEEDED)
{ fprintf(stderr, "new_log_book called!\n"); abort(); }
/* Generated stub for new_reltimer_ */
struct oneshot *new_reltimer_(struct timers *timers UNNEEDED,
const tal_t *ctx UNNEEDED,
@ -431,18 +417,6 @@ void per_peer_state_set_fds(struct per_peer_state *pps UNNEEDED,
void plugin_hook_call_(struct lightningd *ld UNNEEDED, const struct plugin_hook *hook UNNEEDED,
void *payload UNNEEDED, void *cb_arg UNNEEDED)
{ fprintf(stderr, "plugin_hook_call_ called!\n"); abort(); }
/* Generated stub for set_log_outfn_ */
void set_log_outfn_(struct log_book *lr UNNEEDED,
void (*print)(const char *prefix UNNEEDED,
enum log_level level UNNEEDED,
const struct node_id *node_id UNNEEDED,
bool continued UNNEEDED,
const struct timeabs *time UNNEEDED,
const char *str UNNEEDED,
const u8 *io UNNEEDED, size_t io_len UNNEEDED,
void *arg) UNNEEDED,
void *arg UNNEEDED)
{ fprintf(stderr, "set_log_outfn_ called!\n"); abort(); }
/* Generated stub for subd_release_channel */
void subd_release_channel(struct subd *owner UNNEEDED, void *channel UNNEEDED)
{ fprintf(stderr, "subd_release_channel called!\n"); abort(); }

9
lightningd/test/run-jsonrpc.c

@ -9,12 +9,6 @@ size_t bigsize_get(const u8 *p UNNEEDED, size_t max UNNEEDED, bigsize_t *val UNN
/* Generated stub for bigsize_put */
size_t bigsize_put(u8 buf[BIGSIZE_MAX_LEN] UNNEEDED, bigsize_t v UNNEEDED)
{ fprintf(stderr, "bigsize_put called!\n"); abort(); }
/* Generated stub for db_begin_transaction_ */
void db_begin_transaction_(struct db *db UNNEEDED, const char *location UNNEEDED)
{ fprintf(stderr, "db_begin_transaction_ called!\n"); abort(); }
/* Generated stub for db_commit_transaction */
void db_commit_transaction(struct db *db UNNEEDED)
{ fprintf(stderr, "db_commit_transaction called!\n"); abort(); }
/* Generated stub for default_rpcfile */
char *default_rpcfile(const tal_t *ctx UNNEEDED)
{ fprintf(stderr, "default_rpcfile called!\n"); abort(); }
@ -55,9 +49,6 @@ void log_io(struct log *log UNNEEDED, enum log_level dir UNNEEDED,
const char *comment UNNEEDED,
const void *data UNNEEDED, size_t len UNNEEDED)
{ fprintf(stderr, "log_io called!\n"); abort(); }
/* Generated stub for log_prefix */
const char *log_prefix(const struct log *log UNNEEDED)
{ fprintf(stderr, "log_prefix called!\n"); abort(); }
/* Generated stub for memleak_remove_strmap_ */
void memleak_remove_strmap_(struct htable *memtable UNNEEDED, const struct strmap *m UNNEEDED)
{ fprintf(stderr, "memleak_remove_strmap_ called!\n"); abort(); }

37
wallet/test/run-wallet.c

@ -249,7 +249,9 @@ void json_add_hex_talarr(struct json_stream *result UNNEEDED,
{ fprintf(stderr, "json_add_hex_talarr called!\n"); abort(); }
/* Generated stub for json_add_log */
void json_add_log(struct json_stream *result UNNEEDED,
const struct log_book *lr UNNEEDED, enum log_level minlevel UNNEEDED)
const struct log_book *lr UNNEEDED,
const struct node_id *node_id UNNEEDED,
enum log_level minlevel UNNEEDED)
{ fprintf(stderr, "json_add_log called!\n"); abort(); }
/* Generated stub for json_add_node_id */
void json_add_node_id(struct json_stream *response UNNEEDED,
@ -372,15 +374,6 @@ bool json_to_short_channel_id(const char *buffer UNNEEDED, const jsmntok_t *tok
void kill_uncommitted_channel(struct uncommitted_channel *uc UNNEEDED,
const char *why UNNEEDED)
{ fprintf(stderr, "kill_uncommitted_channel called!\n"); abort(); }
/* Generated stub for log_add */
void log_add(struct log *log UNNEEDED, const char *fmt UNNEEDED, ...)
{ fprintf(stderr, "log_add called!\n"); abort(); }
/* Generated stub for log_io */
void log_io(struct log *log UNNEEDED, enum log_level dir UNNEEDED,
const struct node_id *node_id UNNEEDED,
const char *comment UNNEEDED,
const void *data UNNEEDED, size_t len UNNEEDED)
{ fprintf(stderr, "log_io called!\n"); abort(); }
/* Generated stub for notify_connect */
void notify_connect(struct lightningd *ld UNNEEDED, struct node_id *nodeid UNNEEDED,
struct wireaddr_internal *addr UNNEEDED)
@ -700,11 +693,6 @@ static void wallet_test_fatal(const char *fmt, ...)
#define transaction_wrap(db, ...) \
(db_begin_transaction(db), __VA_ARGS__, db_commit_transaction(db), wallet_err == NULL)
enum log_level get_log_level(struct log_book *lr UNNEEDED)
{
return LOG_DBG;
}
struct log *new_log(const tal_t *ctx UNNEEDED, struct log_book *record UNNEEDED, const struct node_id *default_node_id UNNEEDED, const char *fmt UNNEEDED, ...)
{
return NULL;
@ -716,25 +704,6 @@ struct log_book *new_log_book(struct lightningd *ld UNNEEDED, size_t max_mem UNN
return NULL;
}
void set_log_outfn_(struct log_book *lr UNNEEDED,
void (*print)(const char *prefix UNNEEDED,
enum log_level level UNNEEDED,
const struct node_id *node_id UNNEEDED,
bool continued UNNEEDED,
const struct timeabs *time UNNEEDED,
const char *str UNNEEDED,
const u8 *io UNNEEDED,
size_t io_len UNNEEDED,
void *arg) UNNEEDED,
void *arg UNNEEDED)
{
}
const char *log_prefix(const struct log *log UNNEEDED)
{
return "";
}
void txfilter_add_scriptpubkey(struct txfilter *filter UNNEEDED, const u8 *script TAKES)
{
if (taken(script))

Loading…
Cancel
Save