mirror of
https://github.com/actix/actix-website
synced 2025-01-23 00:25:55 +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>
|
// <logger>
|
||||||
use actix_web::middleware::Logger;
|
use actix_web::middleware::Logger;
|
||||||
use env_logger;
|
use env_logger::Env;
|
||||||
|
|
||||||
#[actix_rt::main]
|
#[actix_rt::main]
|
||||||
async fn main() -> std::io::Result<()> {
|
async fn main() -> std::io::Result<()> {
|
||||||
use actix_web::{App, HttpServer};
|
use actix_web::{App, HttpServer};
|
||||||
|
|
||||||
std::env::set_var("RUST_LOG", "actix_web=info");
|
env_logger::from_env(Env::default().default_filter_or("info")).init();
|
||||||
env_logger::init();
|
|
||||||
|
|
||||||
HttpServer::new(|| {
|
HttpServer::new(|| {
|
||||||
App::new()
|
App::new()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user