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:
parent
a784af8010
commit
0b9a56aa2a
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user