| 604 | } |
| 605 | |
| 606 | static void maybe_print(struct logger *log, |
| 607 | const struct log_hdr *l, |
| 608 | const char *logmsg, |
| 609 | const u8 *iomsg) |
| 610 | { |
| 611 | if (l->level >= log->print_level) |
| 612 | log_to_files(log->log_book->prefix, log->prefix->prefix, l->level, |
| 613 | l->nc ? &l->nc->node_id : NULL, |
| 614 | log->need_refiltering ? &log->log_book->print_filters : NULL, |
| 615 | &l->time, logmsg, strlen(logmsg), |
| 616 | iomsg, l->iolen, |
| 617 | log->log_book->print_timestamps, |
| 618 | log->log_book->default_print_level, |
| 619 | log->log_book->log_files); |
| 620 | } |
| 621 | |
| 622 | static void maybe_notify_log(struct logger *log, |
| 623 | const struct log_hdr *l, |