diff options
| author | Teddy Wing | 2017-11-16 01:24:03 +0100 | 
|---|---|---|
| committer | Teddy Wing | 2017-11-16 01:24:03 +0100 | 
| commit | e2bee679dc288acce66c930b77a007ce62e3e9f1 (patch) | |
| tree | cebaa759d58e68a0d35bf764418dd899f43c0ebb | |
| parent | 5146511cca4aed7768e05269ef8840a10df336c7 (diff) | |
| parent | df9b4dbd7aa8401b0e488c99c49205bc39dc5a80 (diff) | |
| download | kipper-e2bee679dc288acce66c930b77a007ce62e3e9f1.tar.bz2 | |
Merge branch 'better-logging'
| -rw-r--r-- | src/github.rs | 7 | ||||
| -rw-r--r-- | src/jenkins.rs | 4 | ||||
| -rw-r--r-- | src/lib.rs | 3 | ||||
| -rw-r--r-- | src/main.rs | 1 | 
4 files changed, 14 insertions, 1 deletions
| diff --git a/src/github.rs b/src/github.rs index 4267468..44a4419 100644 --- a/src/github.rs +++ b/src/github.rs @@ -69,7 +69,7 @@ pub fn update_commit_status(          params.insert("description", d);      } -    client.post( +    let mut response = client.post(              &format!(                  "{}/repos/{}/{}/statuses/{}",                  API_URL, @@ -93,6 +93,11 @@ pub fn update_commit_status(          .json(¶ms)          .send()?; +    debug!("{}", response.url()); +    debug!("{}", response.status()); +    debug!("{}", response.headers()); +    debug!("{}", response.text()?); +      Ok(())  } diff --git a/src/jenkins.rs b/src/jenkins.rs index 5cd3bbe..61d3bf1 100644 --- a/src/jenkins.rs +++ b/src/jenkins.rs @@ -231,6 +231,8 @@ pub fn get_jobs(      let body = response.text()?; +    // debug!("{}", body); +      let jobs = json::parse(body.as_ref())?;      Ok( @@ -255,6 +257,8 @@ pub fn request_job(      let body = response.text()?; +    // debug!("{}", body); +      let job = Job::new(body)?;      Ok(job) @@ -15,6 +15,9 @@  // You should have received a copy of the GNU General Public License  // along with Kipper. If not, see <http://www.gnu.org/licenses/>. +#[macro_use] +extern crate log; +  pub mod jenkins;  pub mod pull_request; diff --git a/src/main.rs b/src/main.rs index dc9bcc9..05ca775 100644 --- a/src/main.rs +++ b/src/main.rs @@ -111,6 +111,7 @@ fn main() {      stderrlog::new()          .module(module_path!())          .timestamp(stderrlog::Timestamp::Second) +        .verbosity(4) // LogLevel::Trace          .init()          .expect("Logger failed to initialise"); | 
