Registry / web-framework / tracing-actix-web

tracing-actix-web

JSON →
library0.7.21rscratesunverified

Structured logging middleware for actix-web.

# Cargo.toml [dependencies] tracing-actix-web = "0.7.21"
INSTALL
IMPORT
SIG · TRACING-ACTIX-WEB
T
tracing-actix-web
web-frameworkrustv0.7.21
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

TracingLogger
use tracing_actix_web::TracingLogger;

Add structured logging to an actix-web application.

use actix_web::{web, App, HttpServer}; use tracing_actix_web::TracingLogger; #[actix_web::main] async fn main() -> std::io::Result<()> { HttpServer::new(|| { App::new() .wrap(TracingLogger::default()) .route("/", web::get().to(|| async { "Hello" })) }) .bind("127.0.0.1:8080")? .run() .await }
Debug
Known issues
gotchaRequires actix-web and tracing crate to be set up.
fix
Add actix-web and tracing as dependencies, and initialize a tracing subscriber.
affects: >=0.7.0
Upgrade
Version history
0.7.21latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
26 hits · last 30 days
node
22
OpenAI (training)
1
Resources
tracing-actix-web — cargo add tracing-actix-web · libregistry