From 1679da7784afa624e2bf597704974d9c64f3525b Mon Sep 17 00:00:00 2001 From: timokoesters Date: Fri, 27 Mar 2020 21:00:40 +0100 Subject: [PATCH] RUST_LOG=info by default --- src/main.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index bb636464..1bf0b56f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -15,13 +15,14 @@ use { ruma_identifiers::UserId, ruma_wrapper::{MatrixResult, Ruma}, sled::Db, - std::convert::TryInto, + std::{collections::HashMap, convert::TryInto}, }; #[get("/_matrix/client/versions")] fn get_supported_versions_route() -> MatrixResult { MatrixResult(Ok(get_supported_versions::Response { versions: vec!["r0.6.0".to_owned()], + unstable_features: HashMap::new(), })) } @@ -151,7 +152,12 @@ fn create_message_event_route( } fn main() { + // Log info by default + if let Err(_) = std::env::var("RUST_LOG") { + std::env::set_var("RUST_LOG", "info"); + } pretty_env_logger::init(); + let db = sled::open( ProjectDirs::from("xyz", "koesters", "matrixserver") .unwrap()