mirror of
https://github.com/actix/actix-website
synced 2024-11-25 01:02:58 +01:00
15 lines
286 B
Rust
15 lines
286 B
Rust
|
// <logger>
|
||
|
use actix_web::middleware::Logger;
|
||
|
use actix_web::App;
|
||
|
use env_logger;
|
||
|
|
||
|
fn main() {
|
||
|
std::env::set_var("RUST_LOG", "actix_web=info");
|
||
|
env_logger::init();
|
||
|
|
||
|
App::new()
|
||
|
.wrap(Logger::default())
|
||
|
.wrap(Logger::new("%a %{User-Agent}i"));
|
||
|
}
|
||
|
// </logger>
|