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

Function log_io

lightningd/log.c:706–731  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

704}
705
706void log_io(struct logger *log, enum log_level dir,
707 const struct node_id *node_id,
708 const char *str TAKES,
709 const void *data TAKES, size_t len)
710{
711 int save_errno = errno;
712 struct log_hdr l;
713
714 assert(dir == LOG_IO_IN || dir == LOG_IO_OUT);
715
716 init_log_hdr(log, &l, dir, node_id, strlen(str), len);
717
718 if (l.level >= log->print_level)
719 log_to_files(log->log_book->prefix, log->prefix->prefix, l.level,
720 l.nc ? &l.nc->node_id : NULL,
721 log->need_refiltering ? &log->log_book->print_filters : NULL,
722 &l.time, str, strlen(str),
723 data, len,
724 log->log_book->print_timestamps,
725 log->log_book->default_print_level,
726 log->log_book->log_files);
727
728 str = cap_header(tmpctx, &l, str);
729 add_entry(log->log_book, &l, str, data);
730 errno = save_errno;
731}
732
733void log_(struct logger *log, enum log_level level,
734 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