aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs
index 070612c..56402c9 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -20,9 +20,13 @@ use {actix_web::web, response::default, std::env::var};
#[actix_web::main]
async fn main() -> std::io::Result<()> {
- std::env::set_var("RUST_LOG", "actix_web=info");
dotenv::dotenv().ok();
- pretty_env_logger::init();
+ pretty_env_logger::formatted_builder()
+ .parse_filters(
+ &std::env::var("RUST_LOG")
+ .unwrap_or_else(|_| "actix_web=info".to_string()),
+ )
+ .init();
actix_web::HttpServer::new(move || {
actix_web::App::new()