Skip to content

Commit d8a93ad

Browse files
authored
Slightly improve logging (#2734)
* Add crate name to cache hit and cache error logging message * Log ProcessError output Not the best formatting, but more useful than nothing at all.
1 parent 5d52f91 commit d8a93ad

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

src/compiler/compiler.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,10 @@ where
557557
let (key, compilation, weak_toolchain_key) = match result {
558558
Err(e) => {
559559
return match e.downcast::<ProcessError>() {
560-
Ok(ProcessError(output)) => Ok((CompileResult::Error, output)),
560+
Ok(ProcessError(output)) => {
561+
debug!("[{}]: process error: {:?}", out_pretty, output);
562+
Ok((CompileResult::Error, output))
563+
}
561564
Err(e) => Err(e),
562565
};
563566
}

src/server.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1383,12 +1383,12 @@ where
13831383

13841384
match compiled {
13851385
CompileResult::Error => {
1386-
debug!("compile result: cache error");
1386+
debug!("[{}]: compile result: cache error", out_pretty);
13871387

13881388
stats.cache_errors.increment(&kind, &lang);
13891389
}
13901390
CompileResult::CacheHit(duration) => {
1391-
debug!("compile result: cache hit");
1391+
debug!("[{}]: compile result: cache hit", out_pretty);
13921392

13931393
stats.cache_hits.increment(&kind, &lang);
13941394
stats.cache_read_hit_duration += duration;

0 commit comments

Comments
 (0)