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

Function log_io

lightningd/log.c:693–718  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

691}
692
693void log_io(struct logger *log, enum log_level dir,
694 const struct node_id *node_id,
695 const char *str TAKES,
696 const void *data TAKES, size_t len)
697{
698 int save_errno = errno;
699 struct log_hdr l;
700
701 assert(dir == LOG_IO_IN || dir == LOG_IO_OUT);
702
703 init_log_hdr(log, &l, dir, node_id, strlen(str), len);
704
705 if (l.level >= log->print_level)
706 log_to_files(log->log_book->prefix, log->prefix->prefix, l.level,
707 l.nc ? &l.nc->node_id : NULL,
708 log->need_refiltering ? &log->log_book->print_filters : NULL,
709 &l.time, str, strlen(str),
710 data, len,
711 log->log_book->print_timestamps,
712 log->log_book->default_print_level,
713 log->log_book->log_files);
714
715 str = cap_header(tmpctx, &l, str);
716 add_entry(log->log_book, &l, str, data);
717 errno = save_errno;
718}
719
720void log_(struct logger *log, enum log_level level,
721 const struct node_id *node_id,

Callers 7

plugin_read_jsonFunction · 0.70
log_status_msgFunction · 0.70
parse_requestFunction · 0.70
start_json_streamFunction · 0.70
read_jsonFunction · 0.70
jsonrpc_request_start_Function · 0.70

Calls 4

init_log_hdrFunction · 0.85
log_to_filesFunction · 0.85
cap_headerFunction · 0.85
add_entryFunction · 0.85

Tested by

no test coverage detected