Merge 3d676c3032 into sapling-pr-archive-bolinfest

This commit is contained in:
Michael Bolin
2025-05-08 15:09:40 -07:00
committed by GitHub
23 changed files with 101 additions and 11 deletions
+3 -1
View File
@@ -74,10 +74,12 @@ pub async fn run_main(cli: Cli) -> anyhow::Result<()> {
// TODO(mbolin): Take a more thoughtful approach to logging.
let default_level = "error";
let _ = tracing_subscriber::fmt()
// Fallback to the `default_level` log filter if the environment
// variable is not set _or_ contains an invalid value
.with_env_filter(
EnvFilter::try_from_default_env()
.or_else(|_| EnvFilter::try_new(default_level))
.unwrap(),
.unwrap_or_else(|_| EnvFilter::new(default_level)),
)
.with_ansi(stderr_with_ansi)
.with_writer(std::io::stderr)