Skip to content

Commit

Permalink
reduce info logging
Browse files Browse the repository at this point in the history
  • Loading branch information
LnL7 committed May 12, 2020
1 parent a918d73 commit d7062d1
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 15 deletions.
4 changes: 2 additions & 2 deletions ofborg/src/checkout.rs
Expand Up @@ -118,7 +118,7 @@ impl CachedProjectCo {
pub fn commit_exists(&self, commit: &OsStr) -> bool {
let mut lock = self.lock().expect("Failed to lock");

info!("Checking if commit '{:?}' exists", commit);
info!("Checking if commit {:?} exists", commit);
let result = Command::new("git")
.arg("--no-pager")
.arg("show")
Expand All @@ -136,7 +136,7 @@ impl CachedProjectCo {
pub fn merge_commit(&self, commit: &OsStr) -> Result<(), Error> {
let mut lock = self.lock()?;

info!("Merging commit '{:?}'", commit);
info!("Merging commit {:?}", commit);
let result = Command::new("git")
.arg("merge")
.arg("--no-gpg-sign")
Expand Down
8 changes: 4 additions & 4 deletions ofborg/src/clone.rs
Expand Up @@ -26,7 +26,7 @@ pub trait GitClonable {
fn lock_path(&self) -> PathBuf;

fn lock(&self) -> Result<Lock, Error> {
info!("Locking {:?}", self.lock_path());
debug!("Locking {:?}", self.lock_path());

match fs::File::create(self.lock_path()) {
Err(e) => {
Expand Down Expand Up @@ -111,7 +111,7 @@ pub trait GitClonable {
fn clean(&self) -> Result<(), Error> {
let mut lock = self.lock()?;

info!("git am --abort");
debug!("git am --abort");
Command::new("git")
.arg("am")
.arg("--abort")
Expand All @@ -120,7 +120,7 @@ pub trait GitClonable {
.stderr(Stdio::null())
.status()?;

info!("git merge --abort");
debug!("git merge --abort");
Command::new("git")
.arg("merge")
.arg("--abort")
Expand All @@ -129,7 +129,7 @@ pub trait GitClonable {
.stderr(Stdio::null())
.status()?;

info!("git reset --hard");
debug!("git reset --hard");
Command::new("git")
.arg("reset")
.arg("--hard")
Expand Down
2 changes: 1 addition & 1 deletion ofborg/src/tasks/build.rs
Expand Up @@ -376,7 +376,7 @@ impl notifyworker::SimpleNotifyWorker for BuildWorker {
info!("----->8-----");

actions.build_finished(status, can_build, cannot_build_attrs);
info!("Done!");
info!("Build done!");
}
}

Expand Down
3 changes: 1 addition & 2 deletions ofborg/src/tasks/eval/stdenvs.rs
Expand Up @@ -91,6 +91,7 @@ impl Stdenvs {
/// This is used to find out what the output path of the stdenv for the
/// given system.
fn evalstdenv(&self, system: &str) -> Option<String> {
info!(?system, "query stdenv output");
let result = self.nix.with_system(system.to_owned()).safely(
&nix::Operation::QueryPackagesOutputs,
&self.co,
Expand All @@ -103,8 +104,6 @@ impl Stdenvs {
true,
);

info!("{:?}", result);

match result {
Ok(mut out) => Some(file_to_str(&mut out)),
Err(mut out) => {
Expand Down
10 changes: 4 additions & 6 deletions ofborg/src/tasks/evaluate.rs
Expand Up @@ -19,7 +19,7 @@ use std::time::Instant;
use hubcaps::checks::CheckRunOptions;
use hubcaps::gists::Gists;
use hubcaps::issues::Issue;
use tracing::{debug_span, error, info, warn};
use tracing::{debug, debug_span, error, info, warn};

pub struct EvaluationWorker<E> {
cloner: checkout::CachedCloner,
Expand Down Expand Up @@ -441,8 +441,6 @@ impl<'a, E: stats::SysEvents + 'static> OneEval<'a, E> {
send_check_statuses(complete.checks, &repo);
response.extend(schedule_builds(complete.builds, auto_schedule_build_archs));

info!("Just about done...");

overall_status.set_with_description("^.^!", hubcaps::statuses::State::Success)?;
} else {
overall_status
Expand All @@ -451,16 +449,16 @@ impl<'a, E: stats::SysEvents + 'static> OneEval<'a, E> {

self.events.notify(Event::TaskEvaluationCheckComplete);

info!("done!");
info!("Evaluations done!");
Ok(self.actions().done(&job, response))
}
}

fn send_check_statuses(checks: Vec<CheckRunOptions>, repo: &hubcaps::repositories::Repository) {
for check in checks {
match repo.checkruns().create(&check) {
Ok(_) => info!("Sent check update"),
Err(e) => info!("Failed to send check update: {:?}", e),
Ok(_) => debug!("Sent check update"),
Err(e) => warn!("Failed to send check update: {:?}", e),
}
}
}
Expand Down

0 comments on commit d7062d1

Please sign in to comment.