An example axum server that serves a live stream of its own tracing log to an HTML page
Go to file
2023-06-04 00:40:00 -04:00
src Example axum server with log stream page 2023-06-04 00:40:00 -04:00
.env Example axum server with log stream page 2023-06-04 00:40:00 -04:00
.gitignore Example axum server with log stream page 2023-06-04 00:40:00 -04:00
Cargo.lock Example axum server with log stream page 2023-06-04 00:40:00 -04:00
Cargo.toml Example axum server with log stream page 2023-06-04 00:40:00 -04:00
README.md Example axum server with log stream page 2023-06-04 00:40:00 -04:00

axum-log-stream

An example axum server that serves a page with a live stream of the server's tracing log.

Setup

A .env file should be at the root of the directory. Leave the default or change them to your desired values:

RUST_LOG=axum_log_stream=debug,tower_http=debug
HOST=127.0.0.1
PORT=3000
TITLE=axum-log-stream
MAX_MEM_LOG_SIZE=1000000

Running

cargo run