feat(coprocessor): add log level configurations#263
Merged
dartdart26 merged 1 commit intomainfrom Jun 16, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a --log-level option for configuring log verbosity, switches WebSocket connection retries to indefinite loops with logging, and replaces ad-hoc println!/eprintln! calls in the fhevm-listener service with structured tracing macros.
- Added
log_level: Levelto CLI args and propagated it intotracing_subscribersetup. - Changed
get_chain_idto retry indefinitely with logged errors. - Replaced all
println!/eprintln!infhevm-listenerwithinfo!,warn!, anderror!.
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| transaction-sender/tests/common.rs | Simplified get_chain_id invocation in tests. |
| transaction-sender/src/lib.rs | Removed retry params, implemented infinite retry with logs. |
| sns-executor/src/lib.rs | Added log_level field to Config. |
| fhevm-listener/src/cmd/mod.rs | Introduced log_level CLI arg and structured logging. |
| fhevm-listener/Cargo.toml | Added tracing and tracing-subscriber dependencies. |
| coprocessor/src/lib.rs (async_main) | Passed args.log_level into tracing_subscriber. |
| coprocessor/src/daemon_cli.rs | Added log_level to daemon CLI args. |
Comments suppressed due to low confidence (1)
coprocessor/fhevm-engine/transaction-sender/src/lib.rs:93
- [nitpick] Use Rust doc comments (
///) instead of//so these lines appear in generated docs and IDE tooltips.
// Gets the chain ID from the given WebSocket URL.
bbcf8ed to
67e1a47
Compare
rudy-6-4
reviewed
Jun 13, 2025
rudy-6-4
reviewed
Jun 13, 2025
rudy-6-4
reviewed
Jun 13, 2025
rudy-6-4
reviewed
Jun 13, 2025
rudy-6-4
reviewed
Jun 13, 2025
rudy-6-4
approved these changes
Jun 13, 2025
cebd0a3 to
50f58fa
Compare
Add the `log-level` cmd line option to configure the log level. Also, make sure gw-listener and transaction-sender retry connecting to the node infinitely at startup as the `WsConnect` options don't apply to connect during provider creation. Finally, add structured logging to fhevm-listener instead of println!s. Also, added some TODOs to remove panics and, instead, propagate errors. Will be done in a separate PR. As a side note, using structured logging in all other services where it is applicable will be done in a separate PR as well (as we usually only utilize the `message` field in the log macros).
50f58fa to
e86a45c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add the
log-levelcmd line option to configure the log level.Also, make sure gw-listener and transaction-sender retry connecting to the node infinitely at startup as the
WsConnectoptions don't apply to connect during provider creation.Finally, add structured logging to fhevm-listener instead of println!s. Also, added some TODOs to remove panics and, instead, propagate errors. Will be done in a separate PR.
As a side note, using structured logging in all other services where it is applicable will be done in a separate PR as well (as we usually only utilize the
messagefield in the log macros).Resolves https://github.com/zama-ai/fhevm-internal/issues/88