lighthouse/book
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
.gitignore Add newly created mdbook 2019-09-01 11:31:18 +10:00
book.toml Update HTTP API docs (#1010) 2020-04-16 20:31:43 +10:00
README.md Update HTTP API docs (#1010) 2020-04-16 20:31:43 +10:00

Lighthouse Book

Contains an mdBook that serves as the primary source of Lighthouse user documentation.

The book is hosted at lighthouse-book.sigmaprime.io

Usage

The mdBook docs are the best source of information for building the book.

Example

  1. Install mdBook: $ cargo install mdbook
  2. Build the book, open it in a browser and build after file changes: $ mdbook serve --open