Uh oh!
There was an error while loading. Please reload this page.
Add configurable logger - #393
Conversation
b3761eb to
b0e7fefCompareThanks for looking into this and I def. agree we need to add the capability for custom loggers (see #309) but I'm not sure we want to go with the approach chosen here. As described over at #309, we probably want to try using the Let me know if that makes sense and also what additional requirements you see for a custom logger interface. If you intend to keep working on this, you might want to coordinate with @enigbe which just recently indicated interest in working on it / #309, too. |
Ah, I see. I was trying to avoid taking a dependency, but if you've already decided you want to use We originally did this in our local fork, as we can only see stdout logs right now. We can keep running with our fork until #309 is resolved. As far as requirements I'd like to see for #309:
eta:
That would be very trivially reversed, and that should hold true for any implementation that's extensible enough. Maybe that's a good litmus test for customization, as well. |
tnull
commented
Oct 28, 2024
Yes, we probably will go this way at least here in LDK Node, but possibly also at least optionally upstream as users keep stumbling across the fact that LDK doesn't use
Right, you can also expose trait objects arguments via
Cool, thanks. Will keep these in mind! My goal for now is to end up with a slightly improved |
domZippilli
commented
Oct 28, 2024
Heh, I tried this as well, too bad I tossed the commit. I think that would work as well, although it left me writing some awkward documentation ... along the lines of, "If you specify this, these other logging fields from config are ignored." |
domZippilli
commented
Oct 28, 2024
P.S. -- If you do this, give some thought to the |
tnull
commented
Oct 29, 2024
Yeah, that's a good point, maybe even more so regarding the upstream changes as we might need |
Description
Adds logger configuration to
ldk-node.Motivation
The first impulse for this was to be able to write to stdout, as that's more desirable for some containerized infrastructure. But rather than add a specific stdout implementation, we thought it better to make this extensible to write to arbitrary destinations (for example, a network log ingester). This additionally has the benefit of letting you customize how the writing happens; for example the
tracing-appendercrate uses anmpscfor writers, with a single thread performing all the actual I/O off of the queue.Details
The PR has three commits:
Configstruct itself. Users of the::default()configuration should see no change in behavior.