Skip to content

Commit ed6a71a

Browse files
committed
Logging improvements
Print linter arguments and improve fetch logging.
1 parent 2f6a980 commit ed6a71a

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

src/engine.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use anyhow::{Context as _, Result, anyhow, bail};
22
use futures::{StreamExt as _, stream};
3-
use log::info;
3+
use log::{debug, info};
44
use std::{
55
collections::BTreeSet,
66
env,
@@ -177,6 +177,8 @@ async fn run_linter_command(
177177
engine: &Engine,
178178
component: &Component,
179179
) -> Result<bool> {
180+
debug!("Running linter with args: {:?}", args);
181+
180182
let mut linker = Linker::new(&engine);
181183

182184
wasmtime_wasi::add_to_linker_async(&mut linker)?;

src/fetch.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@ fn to_async_read(
8888
}
8989

9090
pub async fn fetch_linters(linters: &[ConfigLinter], cache_dir: &Path) -> Result<()> {
91+
92+
info!("Fetching linters...");
93+
9194
// 1. Collect all the URL/binary hash pairs.
9295
// 2. Deduplicate URLs. Throw an error if different binary hashes
9396
// were given for the same URL.
@@ -192,7 +195,9 @@ pub async fn fetch_linters(linters: &[ConfigLinter], cache_dir: &Path) -> Result
192195
.await?;
193196

194197
// Change the message on the overall progress indicator.
195-
main_pb.finish_with_message("done");
198+
main_pb.finish_and_clear();
199+
200+
info!("Linters fetched");
196201

197202
Ok(())
198203
}

0 commit comments

Comments
 (0)