From b659346522717cd7b3757a567bf24b678d821e74 Mon Sep 17 00:00:00 2001 From: Sander Date: Wed, 27 Nov 2024 19:17:48 +0400 Subject: [PATCH] devenv: cleanup logging changes --- devenv-run-tests/src/main.rs | 7 +++---- devenv/src/cnix.rs | 3 +-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/devenv-run-tests/src/main.rs b/devenv-run-tests/src/main.rs index 595f57a30..1b87bda51 100644 --- a/devenv-run-tests/src/main.rs +++ b/devenv-run-tests/src/main.rs @@ -1,5 +1,4 @@ use clap::Parser; -use devenv::log::Level; use devenv::{Devenv, DevenvOptions}; use std::path::PathBuf; use std::{env, fs}; @@ -34,9 +33,7 @@ struct TestResult { async fn run_tests_in_directory( args: &Args, ) -> Result, Box> { - // let logger = Logger::new(Level::Info); - - // logger.info("Running Tests"); + println!("Running Tests"); let cwd = std::env::current_dir()?; @@ -141,6 +138,8 @@ async fn run_tests_in_directory( #[tokio::main] async fn main() -> Result<(), Box> { + log::init_tracing(log::Level::Info); + let args = Args::parse(); let executable_path = std::env::current_exe()?; diff --git a/devenv/src/cnix.rs b/devenv/src/cnix.rs index 76313f731..6dab403ba 100644 --- a/devenv/src/cnix.rs +++ b/devenv/src/cnix.rs @@ -382,13 +382,12 @@ impl<'a> Nix<'a> { if let Some(log) = log.filter_by_level(target_log_level) { if let Some(msg) = log.get_msg() { use devenv_eval_cache::internal_log::InternalLog; - // TODO: don't use macro match log { InternalLog::Msg { level, .. } if *level == Verbosity::Error => { error!("{msg}"); } _ => info!("{msg}"), - } + }; } } });