Skip to content

Conversation

ackintosh
Copy link
Member

@ackintosh ackintosh commented May 9, 2025

Proposed Changes

This PR relates to:

Building on these, this PR enables dependency logging for the simulators. The logs are written to separate files.

The libp2p/discv5 logs:

  • are saved to the directory specified with --log-dir
  • respects the RUST_LOG environment variable for log level configuration

Additional Info

The logs can be downloaded as follows:

image image

ackintosh added 2 commits May 10, 2025 06:57
- apply workspace filter
- enable dependency logging
@ackintosh ackintosh added the test improvement Improve tests label May 9, 2025
@ackintosh ackintosh changed the title Enable dependency logging for the simulator simulator: Write dependency logs to separate files May 9, 2025
@ackintosh ackintosh marked this pull request as ready for review May 12, 2025 22:38
@ackintosh ackintosh added the ready-for-review The code is ready for review label May 12, 2025
Copy link
Member

@macladson macladson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, looks pretty clean to me!

@jimmygchen
Copy link
Member

Nice, thanks for fixing this 🙏

@jimmygchen jimmygchen added ready-for-merge This PR is ready to merge. and removed ready-for-review The code is ready for review labels May 15, 2025
mergify bot added a commit that referenced this pull request May 15, 2025
@mergify mergify bot merged commit c4182e3 into sigp:unstable May 15, 2025
31 checks passed
mergify bot pushed a commit that referenced this pull request May 30, 2025
The simulator works but always emits the following message:

```
$ cargo run --release --bin simulator basic-sim
...
...
Failed to initialize dependency logging: attempted to set a logger after the logging system was already initialized
...
...
```


  This PR removes the initialization with `env_logger`.

(Update)
With #7433 merged, the libp2p/discv5 logs are saved in separate files and respect the `RUST_LOG` env var for log level configuration.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-merge This PR is ready to merge. test improvement Improve tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants