lighthouse-pulse/lighthouse/environment
Age Manning aa1ed787e9 Logging via the HTTP API (#4074)
This PR adds the ability to read the Lighthouse logs from the HTTP API for both the BN and the VC. 

This is done in such a way to as minimize any kind of performance hit by adding this feature.

The current design creates a tokio broadcast channel and mixes is into a form of slog drain that combines with our main global logger drain, only if the http api is enabled. 

The drain gets the logs, checks the log level and drops them if they are below INFO. If they are INFO or higher, it sends them via a broadcast channel only if there are users subscribed to the HTTP API channel. If not, it drops the logs. 

If there are more than one subscriber, the channel clones the log records and converts them to json in their independent HTTP API tasks. 

Co-authored-by: Michael Sproul <micsproul@gmail.com>
2023-05-22 05:57:08 +00:00
..
src Logging via the HTTP API (#4074) 2023-05-22 05:57:08 +00:00
tests Decrease proposer boost to 40% (#3201) 2022-05-23 03:52:31 +00:00
Cargo.toml CLI tests for logging flags (#3609) 2022-10-04 08:33:40 +00:00