feat(crypto-ffi): Add per-level log methods to Logger callback interface - #6972
morlinbrot wants to merge 3 commits into
Conversation
The Logger trait previously only supported one catch-all log method which discarded the log level of tracing events. This adds dedicated per-level log methods to the trait. LoggerWrapper has a new internal level field that tracks the log level, it's instantiated with Level::DEBUG as a default Signed-off-by: morlinbrot <morlinbrot@mailbox.org>
Signed-off-by: morlinbrot <morlinbrot@mailbox.org>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6972 +/- ##
=======================================
Coverage 90.22% 90.23%
=======================================
Files 408 408
Lines 117273 117273
Branches 117273 117273
=======================================
+ Hits 105814 105819 +5
+ Misses 7519 7514 -5
Partials 3940 3940 ☔ View full report in Codecov by Harness. |
|
Pinging @Hywan since you reviewed a previously rejected PR and this implementation closely follows what you laid out in your comments there. Two notes on decisions I made:
|
poljar
left a comment
There was a problem hiding this comment.
Out of interest is this something you need or are you adding it because we have an issue for it?
| @@ -0,0 +1 @@ | |||
| Changed the Logger callback interface to support per-level log methods, replacing its single catch-all log method | |||
There was a problem hiding this comment.
Please mark this as a breaking change by adding [**breaking**] to the start of the fragment.
Signed-off-by: morlinbrot <morlinbrot@mailbox.org>
I was exploring the code base and came across the issues marked "good first issue". Though that's something I could do real quick. |
Closes #1759
The
Loggertrait previously only supported one catch-alllogmethod which discarded the log level of tracing events. This adds dedicated per-level log methods to the trait.LoggerWrapperhas a new internallevelfield that tracks the log level, it's instantiated withLevel::DEBUGas a default.NOTE: This is a breaking change to the crate's public bindings API contract. I did not find any special instructions for cases like this but I wanted to note it prominently.