Skip to content

Commit

Permalink
Downgrade some log messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
ehuss committed Jan 15, 2022
1 parent 6d19e80 commit f0aae40
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions src/cargo/core/compiler/context/compilation_files.rs
Expand Up @@ -6,7 +6,7 @@ use std::path::{Path, PathBuf};
use std::sync::Arc;

use lazycell::LazyCell;
use log::info;
use log::debug;

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

Ok(Arc::new(ret))
}
Expand Down
14 changes: 7 additions & 7 deletions src/cargo/core/compiler/job_queue.rs
Expand Up @@ -61,7 +61,7 @@ use anyhow::{format_err, Context as _};
use cargo_util::ProcessBuilder;
use crossbeam_utils::thread::Scope;
use jobserver::{Acquired, Client, HelperThread};
use log::{debug, info, trace};
use log::{debug, trace};
use semver::Version;

use super::context::OutputFile;
Expand Down Expand Up @@ -649,7 +649,7 @@ impl<'cfg> DrainState<'cfg> {
// If `id` has completely finished we remove it
// from the `active` map ...
Artifact::All => {
info!("end: {:?}", id);
trace!("end: {:?}", id);
self.finished += 1;
if let Some(rustc_tokens) = self.rustc_tokens.remove(&id) {
// This puts back the tokens that this rustc
Expand All @@ -670,11 +670,11 @@ impl<'cfg> DrainState<'cfg> {
// ... otherwise if it hasn't finished we leave it
// in there as we'll get another `Finish` later on.
Artifact::Metadata => {
info!("end (meta): {:?}", id);
trace!("end (meta): {:?}", id);
self.active[&id].clone()
}
};
info!("end ({:?}): {:?}", unit, result);
debug!("end ({:?}): {:?}", unit, result);
match result {
Ok(()) => self.finish(id, &unit, artifact, cx)?,
Err(e) => {
Expand All @@ -695,7 +695,7 @@ impl<'cfg> DrainState<'cfg> {
self.tokens.push(token);
}
Message::NeedsToken(id) => {
log::info!("queue token request");
trace!("queue token request");
jobserver_helper.request_token();
let client = cx.rustc_clients[&self.active[&id]].clone();
self.to_send_clients
Expand Down Expand Up @@ -733,7 +733,7 @@ impl<'cfg> DrainState<'cfg> {
// listen for a message with a timeout, and on timeout we run the
// previous parts of the loop again.
let mut events = self.messages.try_pop_all();
info!(
trace!(
"tokens in use: {}, rustc_tokens: {:?}, waiting_rustcs: {:?} (events this tick: {})",
self.tokens.len(),
self.rustc_tokens
Expand Down Expand Up @@ -966,7 +966,7 @@ impl<'cfg> DrainState<'cfg> {
let id = JobId(self.next_id);
self.next_id = self.next_id.checked_add(1).unwrap();

info!("start {}: {:?}", id, unit);
debug!("start {}: {:?}", id, unit);

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

Expand Down
10 changes: 5 additions & 5 deletions src/cargo/core/compiler/mod.rs
Expand Up @@ -31,7 +31,7 @@ use std::sync::Arc;

use anyhow::{Context as _, Error};
use lazycell::LazyCell;
use log::debug;
use log::{debug, trace};

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

if let Ok(artifact) = serde_json::from_str::<ArtifactNotification>(compiler_message.get()) {
log::trace!("found directive from rustc: `{}`", artifact.artifact);
trace!("found directive from rustc: `{}`", artifact.artifact);
if artifact.artifact.ends_with(".rmeta") {
log::debug!("looks like metadata finished early!");
debug!("looks like metadata finished early!");
state.rmeta_produced();
}
return Ok(false);
Expand All @@ -1452,7 +1452,7 @@ fn on_stderr_line_inner(
if let Ok(JobserverNotification { jobserver_event }) =
serde_json::from_str::<JobserverNotification>(compiler_message.get())
{
log::info!(
trace!(
"found jobserver directive from rustc: `{:?}`",
jobserver_event
);
Expand Down
2 changes: 1 addition & 1 deletion src/cargo/sources/git/utils.rs
Expand Up @@ -347,7 +347,7 @@ impl<'a> GitCheckout<'a> {
return update_submodules(&self.repo, cargo_config);

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

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

0 comments on commit f0aae40

Please sign in to comment.