Ciritical dependency logging
Description
We currently do not have default (or good) way of viewing some important logs from our dependencies.
Specifically discovery (discv5) and libp2p. Recently, libp2p has upgraded to use the tracing crate. Discv5 already uses tracing.
We currently can intertwine the dependency logs with our current slog output using the -l parameter switch and setting the rust environment variable RUST_LOG. This has worked in the past for debugging but its sub-optimal as the displayed logs are out of order and it needs to be set manually (meaning we don't have logs for past issues or from users).
The ideal situation would be that lighthouse logs both libp2p and discv5 logs to a file by default. We could then retro-actively view past logs to diagnose issues.
Bonus points if we can limit the size of each file and have the log file automatically remove old logs.
i'd like to take a stab at this
@eserilev - The help would be appreciated :pray:
Just a heads up @eserilev - There is this PR, which seems to be a good start. That helps in adding metrics around the logging. We just got to send it to a file now: https://github.com/sigp/lighthouse/pull/4979
Can this issue be closed since https://github.com/sigp/lighthouse/pull/4988 has been merged?
Yep