Allow logging to specify an explicit log level instead of a macro
authorMatt Corallo <git@bluematt.me>
Mon, 28 Jun 2021 20:38:48 +0000 (20:38 +0000)
committerMatt Corallo <git@bluematt.me>
Tue, 29 Jun 2021 19:36:47 +0000 (19:36 +0000)
commit7fa6a7d48e5cec139481ceee95baadb2cf06486e
tree6aba7e4e7a7cab92b71191e0572d8145310f2fa3
parentd36a875f9895c06804802ebb199e2103cba89b6d
Allow logging to specify an explicit log level instead of a macro

For log entries which may have a variable level, we can't call an
arbitrary macro and need to be able to pass an explicit level. This
does so without breaking the compile-time disabling of certain log
levels.

Further, we "fix" the comparison order of log levels to make more
significant levels sort "higher", which implicitly makes more sense
than sorting "lower".

Finally, we remove the "Off" log level as no log entry should ever
be logged at the "Off" level - that would be nonsensical.
lightning/src/util/logger.rs
lightning/src/util/macro_logger.rs