Rust build crates.io badge docs.rs badge

Structured (access-) logging for actix-web

Provides a middleware (StructuredLogger), similar to actix_web::middleware:Logger, except that it uses slog and thus enables JSON-formatted logging (via slog-json).

Of course slog's compact terminal output is a nice add-on, even if your just out for JSON-logging.

Usage

See serverjson and servercompact for working examples.

```rust let logger: slog::Logger = unimplemented!();

HttpServer::new(move || { App::new() .wrap( StructuredLogger::new(logger.new(o!("log_type" => "access"))), ) }) .bind("[::1]:8080") ```