Merge pull request #486 from LnL7/log-cleanup

reduce info logging
This commit is contained in:
Daiderd Jordan 2020-05-19 22:08:33 +02:00 committed by GitHub
commit bb3c29c72c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 12 additions and 15 deletions

View file

@ -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")
@ -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")

View file

@ -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) => {
@ -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")
@ -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")
@ -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")

View file

@ -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!");
}
}

View file

@ -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,
@ -103,8 +104,6 @@ impl Stdenvs {
true,
);
info!("{:?}", result);
match result {
Ok(mut out) => Some(file_to_str(&mut out)),
Err(mut out) => {

View file

@ -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,
@ -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
@ -451,7 +449,7 @@ 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))
}
}
@ -459,8 +457,8 @@ impl<'a, E: stats::SysEvents + 'static> OneEval<'a, E> {
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),
}
}
}