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

Function new_log

lightningd/log.c:313–333  ·  view source on GitHub ↗

With different entry points */

Source from the content-addressed store, hash-verified

311
312/* With different entry points */
313struct log *
314new_log(const tal_t *ctx, struct log_book *record,
315 const struct node_id *default_node_id,
316 const char *fmt, ...)
317{
318 struct log *log = tal(ctx, struct log);
319 va_list ap;
320
321 log->lr = tal_link(log, record);
322 va_start(ap, fmt);
323 /* Owned by the log book itself, since it can be referenced
324 * by log entries, too */
325 log->prefix = log_prefix_new(log->lr, take(tal_vfmt(NULL, fmt, ap)));
326 va_end(ap);
327 log->default_node_id = tal_dup_or_null(log, struct node_id,
328 default_node_id);
329
330 /* Initialized on first use */
331 log->print_level = NULL;
332 return log;
333}
334
335const char *log_prefix(const struct log *log)
336{

Callers 8

new_unsaved_channelFunction · 0.70
new_channelFunction · 0.70
new_subdFunction · 0.70
plugins_newFunction · 0.70
plugin_registerFunction · 0.70
new_uncommitted_channelFunction · 0.70
jcon_connectedFunction · 0.70
new_lightningdFunction · 0.70

Calls 1

log_prefix_newFunction · 0.85

Tested by

no test coverage detected