Permalink
Browse files

Inlcude envlogger

  • Loading branch information...
schrieveslaach committed Jan 22, 2019
1 parent 1480b0a commit 99d17fc9227d058580ed90191befd1c6e6e2ff0f
Showing with 86 additions and 1 deletion.
  1. +2 −0 .gitignore
  2. +73 −0 api/Cargo.lock
  3. +1 −0 api/Cargo.toml
  4. +1 −0 api/Dockerfile
  5. +7 −1 api/src/commands/list_tickets_command.rs
  6. +2 −0 api/src/main.rs
@@ -1,2 +1,4 @@
dist/
target/
node_modules/

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -9,6 +9,7 @@ edition = "2018"
crossbeam = "0.4"
crossbeam-utils = "0.5"
dkregistry = "0.2"
env_logger = "0.6"
failure = "0.1"
futures = "0.1"
handlebars = "1.1"
@@ -20,4 +20,5 @@ COPY --from=builder /usr/local/cargo/bin/api .
COPY res/Rocket.toml res/config.toml /app/
EXPOSE 80
ENV ROCKET_ENV=staging
ENV RUST_LOG=info
CMD ["./api"]
@@ -69,6 +69,8 @@ impl ListTicketsCommand {
.collect::<Vec<String>>()
.join(", ");

debug!("Search for issues: {}", issue_keys);

let options = SearchOptions::builder().validate(false).build();

match jira
@@ -84,7 +86,11 @@ impl ListTicketsCommand {
GojiError::Fault { code, errors } => {
debug!("No issue for {}: {:?} {:?}", issue_keys, code, errors)
}
err => return Err(ListTicketsError::from(err)),
err => {
let e = ListTicketsError::from(err);
error!("Cannot retrieve ticket information: {}", e);
return Err(e);
},
},
}
}
@@ -115,6 +115,8 @@ fn swagger(request_info: RequestInfo) -> String {
}

fn main() {
env_logger::init();

rocket::ignite()
.mount("/", routes![index])
.mount("/", routes![swagger])

0 comments on commit 99d17fc

Please sign in to comment.