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

Function filter_level

lightningd/log.c:297–310  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

295}
296
297static enum log_level filter_level(struct log_book *lr,
298 const struct log_prefix *lp,
299 const struct node_id *node_id)
300{
301 struct print_filter *i;
302 const char *node_id_str = node_id ? node_id_to_hexstr(tmpctx, node_id) : "";
303
304 assert(lr->default_print_level != NULL);
305 list_for_each(&lr->print_filters, i, list) {
306 if (strstr(lp->prefix, i->prefix) || strstr(node_id_str, i->prefix))
307 return i->level;
308 }
309 return *lr->default_print_level;
310}
311
312/* With different entry points */
313struct log *

Callers 2

log_print_levelFunction · 0.85
logging_options_parsedFunction · 0.85

Calls 1

node_id_to_hexstrFunction · 0.50

Tested by

no test coverage detected