-
Notifications
You must be signed in to change notification settings - Fork 385
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drop log-limiting features #3431
Drop log-limiting features #3431
Conversation
@TheBlueMatt Let me know if this is reasonable. I think if we want to re-enable compile-time limiting we could do so by defining a limit as an associated type on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have reviewed this. Looks good to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is fine, yea.
lightning/src/util/macro_logger.rs
Outdated
@@ -185,23 +185,12 @@ macro_rules! log_internal { | |||
macro_rules! log_given_level { | |||
($logger: expr, $lvl:expr, $($arg:tt)+) => ( | |||
match $lvl { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can drop the match
now, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, indeed. It seems we can actually drop the entire log_given_level
macro now.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3431 +/- ##
==========================================
+ Coverage 89.22% 90.48% +1.26%
==========================================
Files 130 130
Lines 106965 111765 +4800
Branches 106965 111765 +4800
==========================================
+ Hits 95438 101131 +5693
+ Misses 8734 8252 -482
+ Partials 2793 2382 -411 ☔ View full report in Codecov by Sentry. |
LGTM, feel free to squash. |
Previously, LDK offered two ways to limit log outputs: filtering during runtime client-side by matching on any given `Record`'s `Level` value, as well as at compile time through the `max_level_*` feature flags. It turns out the latter approach was always broken when used outside of the `lightning` crate. Here, we therefore simply drop the feature-based filtering.
3afc3de
to
f6af8e3
Compare
Squashed fixups without further changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Simple enough and fixes CI issues.
Fixes #3424.
Previously, LDK offered two ways to limit log outputs: filtering during runtime client-side by matching on any given
Record
'sLevel
value, as well as at compile time through themax_level_*
feature flags.It turns out the latter approach was always broken when used outside of the
lightning
crate. Here, we therefore simply drop the feature-based filtering.