mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-17 07:03:31 +00:00
chore: add trace layer and startup log
This commit is contained in:
parent
ad51f30dc3
commit
967b015059
2 changed files with 2 additions and 1 deletions
|
|
@ -25,7 +25,7 @@ dirs = "5.0"
|
||||||
time = { version = "0.3", features = ["parsing", "formatting"] }
|
time = { version = "0.3", features = ["parsing", "formatting"] }
|
||||||
tokio = { version = "1.36", features = ["macros", "rt-multi-thread", "signal", "time"] }
|
tokio = { version = "1.36", features = ["macros", "rt-multi-thread", "signal", "time"] }
|
||||||
tokio-stream = { version = "0.1", features = ["sync"] }
|
tokio-stream = { version = "0.1", features = ["sync"] }
|
||||||
tower-http = { version = "0.5", features = ["cors"] }
|
tower-http = { version = "0.5", features = ["cors", "trace"] }
|
||||||
utoipa = { version = "4.2", features = ["axum_extras"] }
|
utoipa = { version = "4.2", features = ["axum_extras"] }
|
||||||
schemars = "0.8"
|
schemars = "0.8"
|
||||||
tracing = "0.1"
|
tracing = "0.1"
|
||||||
|
|
|
||||||
|
|
@ -324,6 +324,7 @@ fn run_server(cli: &Cli) -> Result<(), CliError> {
|
||||||
|
|
||||||
runtime.block_on(async move {
|
runtime.block_on(async move {
|
||||||
let listener = tokio::net::TcpListener::bind(&addr).await?;
|
let listener = tokio::net::TcpListener::bind(&addr).await?;
|
||||||
|
tracing::info!(addr = %addr, "server listening");
|
||||||
axum::serve(listener, router)
|
axum::serve(listener, router)
|
||||||
.await
|
.await
|
||||||
.map_err(|err| CliError::Server(err.to_string()))
|
.map_err(|err| CliError::Server(err.to_string()))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue