From f90e3b63cdceb0f486f3ca9cc464b7e1211d3e19 Mon Sep 17 00:00:00 2001 From: appflowy Date: Mon, 24 Jan 2022 20:20:13 +0800 Subject: [PATCH] config backend log level from env --- backend/src/application.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/src/application.rs b/backend/src/application.rs index 7b101a1c01..455a893268 100644 --- a/backend/src/application.rs +++ b/backend/src/application.rs @@ -135,8 +135,9 @@ fn user_scope() -> Scope { } pub async fn init_app_context(configuration: &Settings) -> AppContext { + let level = std::env::var("RUST_LOG").unwrap_or("info".to_owned()); let _ = crate::services::log::Builder::new("flowy-server") - .env_filter("Trace") + .env_filter(&level) .build(); let pg_pool = get_connection_pool(&configuration.database) .await