Skip to content

Commit

Permalink
devenv: cleanup logging changes
Browse files Browse the repository at this point in the history
  • Loading branch information
sandydoo committed Nov 27, 2024
1 parent 457b8b7 commit b659346
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
7 changes: 3 additions & 4 deletions devenv-run-tests/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use clap::Parser;
use devenv::log::Level;
use devenv::{Devenv, DevenvOptions};
use std::path::PathBuf;
use std::{env, fs};
Expand Down Expand Up @@ -34,9 +33,7 @@ struct TestResult {
async fn run_tests_in_directory(
args: &Args,
) -> Result<Vec<TestResult>, Box<dyn std::error::Error>> {
// let logger = Logger::new(Level::Info);

// logger.info("Running Tests");
println!("Running Tests");

let cwd = std::env::current_dir()?;

Expand Down Expand Up @@ -141,6 +138,8 @@ async fn run_tests_in_directory(

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
log::init_tracing(log::Level::Info);

let args = Args::parse();

let executable_path = std::env::current_exe()?;
Expand Down
3 changes: 1 addition & 2 deletions devenv/src/cnix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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}"),
}
};
}
}
});
Expand Down

0 comments on commit b659346

Please sign in to comment.