1
0
mirror of https://github.com/actix/actix-website synced 2025-01-22 16:15:56 +01:00

Use RUST_LOG env var if set (#163)

* Use RUST_LOG env var if set

* Remove redundant use statement
This commit is contained in:
Stig Johan Berggren 2020-03-02 22:53:39 +01:00 committed by GitHub
parent a784af8010
commit 0b9a56aa2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,13 +1,12 @@
// <logger>
use actix_web::middleware::Logger;
use env_logger;
use env_logger::Env;
#[actix_rt::main]
async fn main() -> std::io::Result<()> {
use actix_web::{App, HttpServer};
std::env::set_var("RUST_LOG", "actix_web=info");
env_logger::init();
env_logger::from_env(Env::default().default_filter_or("info")).init();
HttpServer::new(|| {
App::new()