feat(crypto-ffi): Add per-level log methods to Logger callback interface - #6972
feat(crypto-ffi): Add per-level log methods to Logger callback interface#6972morlinbrot wants to merge 2 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% +0.01%
==========================================
Files 408 408
Lines 117273 117273
Branches 117273 117273
==========================================
+ Hits 105814 105826 +12
+ Misses 7519 7498 -21
- Partials 3940 3949 +9 ☔ 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:
|
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.