log: print UNUSUAL messages before log initialization too.

Otherwise we don't print out the upgrading messages when we move things!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2019-11-23 12:16:58 +10:30
parent 57a32ee044
commit a06fa7f267

View File

@ -307,9 +307,9 @@ const char *log_prefix(const struct log *log)
enum log_level log_print_level(struct log *log)
{
if (!log->print_level) {
/* Not set globally yet? Print BROKEN messages only */
/* Not set globally yet? Print UNUSUAL / BROKEN messages only */
if (!log->lr->default_print_level)
return LOG_BROKEN;
return LOG_UNUSUAL;
log->print_level = tal(log, enum log_level);
*log->print_level = filter_level(log->lr, log->prefix);
}