-
Notifications
You must be signed in to change notification settings - Fork 421
Add LoggerScope for a thread-local Logger instance #4223
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
base: main
Are you sure you want to change the base?
Conversation
|
👋 Hi! I see this is a draft PR. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4223 +/- ##
==========================================
- Coverage 89.34% 89.33% -0.01%
==========================================
Files 180 180
Lines 138166 138195 +29
Branches 138166 138195 +29
==========================================
+ Hits 123438 123453 +15
- Misses 12123 12137 +14
Partials 2605 2605
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
I played with this a bit, sadly Rust doesn't allow you to convert an arbitrary (
(of course the [1] https://git.bitcoin.ninja/?p=rust-lightning;a=shortlog;h=refs/heads/claude/2025-11-dyn-logger [2] |
|
I've tried to make it work on top of your First I thought you wanted to bound everything on Proc macro for logger scope is interesting, and can indeed be extended with a node id in testing. |
|
The type passed to |
a64e87d to
ddf5cb4
Compare
|
I had tried that, but it didn't work. Same sized error. Pushed the commit. Maybe I am doing something wrong. |
|
I am wondering what the performance implications are of the logger scope. Just adding a node id in TLS would test-only, but storing the logger instance itself is production code that wouldn't be running if there was a global logger instead. |
|
I don't think its going to be material in either direct. Storing a |
Right, looks like claude just forgot to update the |
|
Oh, claude didn't update any of the references to dyn lol. Dumb LLMs just ignore half of what you tell them, I hadn't bothered to look at what it did, either. Anyway, gotta update all those bounds! |
No description provided.