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

Function log_each_line_

lightningd/log.c:755–777  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

753 const u8 *, size_t), (arg))
754
755static void log_each_line_(const struct log_book *log_book,
756 void (*func)(struct timerel time,
757 enum log_level level,
758 const struct node_id *node_id,
759 const char *prefix,
760 const char *log,
761 size_t loglen,
762 const u8 *io,
763 size_t iolen,
764 void *arg),
765 void *arg)
766{
767 size_t off = 0;
768 const char *msg;
769 const u8 *io;
770 struct log_hdr l;
771
772 while (get_log_entry(tmpctx, log_book, &l, &msg, &io, &off)) {
773 func(time_between(l.time, log_book->init_time),
774 l.level, l.nc ? &l.nc->node_id : NULL,
775 l.prefix->prefix, msg, l.msglen, io, l.iolen, arg);
776 }
777}
778
779struct log_data {
780 int fd;

Callers

nothing calls this directly

Calls 2

get_log_entryFunction · 0.85
time_betweenFunction · 0.85

Tested by

no test coverage detected