MCPcopy Create free account
hub / github.com/ElementsProject/lightning / log_each_line_

Function log_each_line_

lightningd/log.c:742–764  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

740 const u8 *, size_t), (arg))
741
742static void log_each_line_(const struct log_book *log_book,
743 void (*func)(struct timerel time,
744 enum log_level level,
745 const struct node_id *node_id,
746 const char *prefix,
747 const char *log,
748 size_t loglen,
749 const u8 *io,
750 size_t iolen,
751 void *arg),
752 void *arg)
753{
754 size_t off = 0;
755 const char *msg;
756 const u8 *io;
757 struct log_hdr l;
758
759 while (get_log_entry(tmpctx, log_book, &l, &msg, &io, &off)) {
760 func(time_between(l.time, log_book->init_time),
761 l.level, l.nc ? &l.nc->node_id : NULL,
762 l.prefix->prefix, msg, l.msglen, io, l.iolen, arg);
763 }
764}
765
766struct log_data {
767 int fd;

Callers

nothing calls this directly

Calls 2

get_log_entryFunction · 0.85
time_betweenFunction · 0.85

Tested by

no test coverage detected