diff options
author | Aria Shrimpton <me@aria.rip> | 2024-02-06 09:51:46 +0000 |
---|---|---|
committer | Aria Shrimpton <me@aria.rip> | 2024-02-06 09:51:46 +0000 |
commit | 23d344348f2ff19941037884da332956a82bca1c (patch) | |
tree | c0466af16bdc66c12e52972e8a83dc45001bf203 /src | |
parent | 6db5173f2eba598e1627fdaedb5083c854bd9dfa (diff) |
allow logging stderr of confirmation benchmarks
Diffstat (limited to 'src')
-rw-r--r-- | src/crates/candelabra/src/confirmation.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/crates/candelabra/src/confirmation.rs b/src/crates/candelabra/src/confirmation.rs index 95267c6..ad91280 100644 --- a/src/crates/candelabra/src/confirmation.rs +++ b/src/crates/candelabra/src/confirmation.rs @@ -1,7 +1,7 @@ use crate::types::ConTypeTo; use anyhow::{Context, Result}; use camino::Utf8Path; -use log::{debug, trace}; +use log::{debug, log_enabled, trace, Level}; use primrose::{ConTypeName, ContainerSelection, ContainerSelector}; use std::{ collections::HashMap, @@ -42,7 +42,11 @@ impl State { .args(["bench"]) .current_dir(proj.source_dir.as_std_path()) .stdout(Stdio::piped()) - .stderr(Stdio::null()) + .stderr(if log_enabled!(Level::Debug) { + Stdio::inherit() + } else { + Stdio::null() + }) .spawn() .context("Error running benchmark command")?; |