ElementsProject / lightning

Core Lightning — Lightning Network implementation focusing on spec compliance and performance
Other
2.81k stars 889 forks source link

rust cln-plugin log messages dropped if CLN_PLUGIN_LOG isn't set #7658

Closed laanwj closed 3 days ago

laanwj commented 1 week ago

Since commit 60e1532dd89ec8a434ce4b31359c54558c41b4b1 (released in crate 0.1.8), which switched the logging framework to tracing-subscriber, rust plugins do not log info and warnings anymore. This is, unless the environment variable CLN_PLUGIN_LOG is set appropriately, eg

CLN_PLUGIN_LOG=info  ./lightningd/lightningd ...

This isn't really documented (see also #6927), and confused me a lot.

According to the commit message of 064a5a69406d8d44e005c94e914126626d1bf460, the default log level floor was info. This behavior changed.

Looking in the tracing-subscriber documentation it looks like the new default logger has a minimum level of ERROR, instead. Personally i think the old default makes more sense.