Skip to content

Fix overly spammy TRACE logging in async onion message event handling #3507

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

Conversation

tnull
Copy link
Contributor

@tnull tnull commented Jan 7, 2025

In #3449, we introduced TRACE-level logging for event handling. However, in onion messenger we'd now log (twice, actually) every time process_events_async is called, which is very very spammy:

2025-01-07 14:42:29 TRACE [lightning::onion_message::messenger:1450] Done handling events async, results: []
2025-01-07 14:42:29 TRACE [lightning::onion_message::messenger:1450] Done handling events async, results: []
2025-01-07 14:42:29 TRACE [lightning::onion_message::messenger:1450] Done handling events async, results: []
2025-01-07 14:42:29 TRACE [lightning::onion_message::messenger:1450] Done handling events async, results: []
2025-01-07 14:42:29 TRACE [lightning::onion_message::messenger:1450] Done handling events async, results: []
2025-01-07 14:42:30 TRACE [lightning::onion_message::messenger:1450] Done handling events async, results: []
2025-01-07 14:42:30 TRACE [lightning::onion_message::messenger:1450] Done handling events async, results: []
2025-01-07 14:42:30 TRACE [lightning::onion_message::messenger:1450] Done handling events async, results: []
2025-01-07 14:42:30 TRACE [lightning::onion_message::messenger:1450] Done handling events async, results: []
2025-01-07 14:42:30 TRACE [lightning::onion_message::messenger:1450] Done handling events async, results: []
....

Here we fix this by short-cutting to only proceed when we actualy have any event futures to poll.

We recently introduced `TRACE`-level logging for event handling.
However, in onion messenger we'd now log (twice, actually) every time
`process_events_async` is called, which is very very spammy. Here we fix
this by short-cutting to only proceed when we actualy have any event
futures to poll.
@tnull tnull force-pushed the 2025-01-fix-spammy-async-om-event-handling-logs branch from 0f3e667 to aa87886 Compare January 8, 2025 08:16
@tnull
Copy link
Contributor Author

tnull commented Jan 8, 2025

Rebased on 0.1 as Github required me to (not sure why, as there weren't any conflicts, we probably need to configure that).

@tnull
Copy link
Contributor Author

tnull commented Jan 8, 2025

Going ahead and landing this as it's ~trivial, has an ACK and the sibling PR #3508 has two.

@tnull tnull merged commit c8ec8eb into lightningdevkit:0.1 Jan 8, 2025
16 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants