Skip to content

Commit 03e24bc

Browse files
committed
Auto merge of #10296 - ehuss:downgrade-log, r=alexcrichton
Downgrade some log messages. This lowers the log level of several "info" messages. I find that these can be quite noisy when using log messages, and I don't think need to be such a high log level.
2 parents e778b3d + f0aae40 commit 03e24bc

File tree

4 files changed

+15
-15
lines changed

4 files changed

+15
-15
lines changed

src/cargo/core/compiler/context/compilation_files.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use std::path::{Path, PathBuf};
66
use std::sync::Arc;
77

88
use lazycell::LazyCell;
9-
use log::info;
9+
use log::debug;
1010

1111
use super::{BuildContext, CompileKind, Context, FileFlavor, Layout};
1212
use crate::core::compiler::{CompileMode, CompileTarget, CrateType, FileType, Unit};
@@ -435,7 +435,7 @@ impl<'a, 'cfg: 'a> CompilationFiles<'a, 'cfg> {
435435
| CompileMode::Bench
436436
| CompileMode::Check { .. } => self.calc_outputs_rustc(unit, bcx)?,
437437
};
438-
info!("Target filenames: {:?}", ret);
438+
debug!("Target filenames: {:?}", ret);
439439

440440
Ok(Arc::new(ret))
441441
}

src/cargo/core/compiler/job_queue.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ use anyhow::{format_err, Context as _};
6161
use cargo_util::ProcessBuilder;
6262
use crossbeam_utils::thread::Scope;
6363
use jobserver::{Acquired, Client, HelperThread};
64-
use log::{debug, info, trace};
64+
use log::{debug, trace};
6565
use semver::Version;
6666

6767
use super::context::OutputFile;
@@ -649,7 +649,7 @@ impl<'cfg> DrainState<'cfg> {
649649
// If `id` has completely finished we remove it
650650
// from the `active` map ...
651651
Artifact::All => {
652-
info!("end: {:?}", id);
652+
trace!("end: {:?}", id);
653653
self.finished += 1;
654654
if let Some(rustc_tokens) = self.rustc_tokens.remove(&id) {
655655
// This puts back the tokens that this rustc
@@ -670,11 +670,11 @@ impl<'cfg> DrainState<'cfg> {
670670
// ... otherwise if it hasn't finished we leave it
671671
// in there as we'll get another `Finish` later on.
672672
Artifact::Metadata => {
673-
info!("end (meta): {:?}", id);
673+
trace!("end (meta): {:?}", id);
674674
self.active[&id].clone()
675675
}
676676
};
677-
info!("end ({:?}): {:?}", unit, result);
677+
debug!("end ({:?}): {:?}", unit, result);
678678
match result {
679679
Ok(()) => self.finish(id, &unit, artifact, cx)?,
680680
Err(e) => {
@@ -695,7 +695,7 @@ impl<'cfg> DrainState<'cfg> {
695695
self.tokens.push(token);
696696
}
697697
Message::NeedsToken(id) => {
698-
log::info!("queue token request");
698+
trace!("queue token request");
699699
jobserver_helper.request_token();
700700
let client = cx.rustc_clients[&self.active[&id]].clone();
701701
self.to_send_clients
@@ -733,7 +733,7 @@ impl<'cfg> DrainState<'cfg> {
733733
// listen for a message with a timeout, and on timeout we run the
734734
// previous parts of the loop again.
735735
let mut events = self.messages.try_pop_all();
736-
info!(
736+
trace!(
737737
"tokens in use: {}, rustc_tokens: {:?}, waiting_rustcs: {:?} (events this tick: {})",
738738
self.tokens.len(),
739739
self.rustc_tokens
@@ -966,7 +966,7 @@ impl<'cfg> DrainState<'cfg> {
966966
let id = JobId(self.next_id);
967967
self.next_id = self.next_id.checked_add(1).unwrap();
968968

969-
info!("start {}: {:?}", id, unit);
969+
debug!("start {}: {:?}", id, unit);
970970

971971
assert!(self.active.insert(id, unit.clone()).is_none());
972972

src/cargo/core/compiler/mod.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ use std::sync::Arc;
3131

3232
use anyhow::{Context as _, Error};
3333
use lazycell::LazyCell;
34-
use log::debug;
34+
use log::{debug, trace};
3535

3636
pub use self::build_config::{BuildConfig, CompileMode, MessageFormat};
3737
pub use self::build_context::{
@@ -720,7 +720,7 @@ fn rustdoc(cx: &mut Context<'_, '_>, unit: &Unit) -> CargoResult<Work> {
720720
if crate_dir.exists() {
721721
// Remove output from a previous build. This ensures that stale
722722
// files for removed items are removed.
723-
log::debug!("removing pre-existing doc directory {:?}", crate_dir);
723+
debug!("removing pre-existing doc directory {:?}", crate_dir);
724724
paths::remove_dir_all(crate_dir)?;
725725
}
726726
state.running(&rustdoc);
@@ -1430,9 +1430,9 @@ fn on_stderr_line_inner(
14301430
}
14311431

14321432
if let Ok(artifact) = serde_json::from_str::<ArtifactNotification>(compiler_message.get()) {
1433-
log::trace!("found directive from rustc: `{}`", artifact.artifact);
1433+
trace!("found directive from rustc: `{}`", artifact.artifact);
14341434
if artifact.artifact.ends_with(".rmeta") {
1435-
log::debug!("looks like metadata finished early!");
1435+
debug!("looks like metadata finished early!");
14361436
state.rmeta_produced();
14371437
}
14381438
return Ok(false);
@@ -1452,7 +1452,7 @@ fn on_stderr_line_inner(
14521452
if let Ok(JobserverNotification { jobserver_event }) =
14531453
serde_json::from_str::<JobserverNotification>(compiler_message.get())
14541454
{
1455-
log::info!(
1455+
trace!(
14561456
"found jobserver directive from rustc: `{:?}`",
14571457
jobserver_event
14581458
);

src/cargo/sources/git/utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ impl<'a> GitCheckout<'a> {
347347
return update_submodules(&self.repo, cargo_config);
348348

349349
fn update_submodules(repo: &git2::Repository, cargo_config: &Config) -> CargoResult<()> {
350-
info!("update submodules for: {:?}", repo.workdir().unwrap());
350+
debug!("update submodules for: {:?}", repo.workdir().unwrap());
351351

352352
for mut child in repo.submodules()? {
353353
update_submodule(repo, &mut child, cargo_config).with_context(|| {

0 commit comments

Comments
 (0)