1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-06-26 15:07:42 +02:00

examples use info log level by default

This commit is contained in:
Rob Ede
2021-05-06 20:24:18 +01:00
parent 7d1d5c8acd
commit 947caa3599
5 changed files with 9 additions and 12 deletions

View File

@ -1,4 +1,4 @@
use std::{env, io};
use std::io;
use actix_http::{body::Body, http::HeaderValue, http::StatusCode};
use actix_http::{Error, HttpService, Request, Response};
@ -21,8 +21,7 @@ async fn handle_request(mut req: Request) -> Result<Response<Body>, Error> {
#[actix_rt::main]
async fn main() -> io::Result<()> {
env::set_var("RUST_LOG", "echo=info");
env_logger::init();
env_logger::init_from_env(env_logger::Env::new().default_filter_or("info"));
Server::build()
.bind("echo", "127.0.0.1:8080", || {