Use log crate for logging instead of println
All checks were successful
Core Repos/ImageApi/pipeline/head This commit looks good
Core Repos/ImageApi/pipeline/pr-master This commit looks good

This commit is contained in:
Cameron Cordes
2021-02-24 21:26:11 -05:00
parent 8b5ba9d48c
commit f9983240df
7 changed files with 86 additions and 17 deletions

View File

@@ -1,5 +1,7 @@
use std::str::FromStr;
use log::error;
use actix_web::error::ErrorUnauthorized;
use actix_web::{dev, http::header, Error, FromRequest, HttpRequest};
use futures::future::{err, ok, Ready};
@@ -21,7 +23,6 @@ pub fn secret_key() -> String {
if cfg!(test) {
String::from("test_key")
} else {
println!("USING REAL KEY");
dotenv::var("SECRET_KEY").expect("SECRET_KEY env not set!")
}
}
@@ -39,7 +40,7 @@ impl FromStr for Claims {
) {
Ok(data) => Ok(data.claims),
Err(other) => {
println!("DecodeError: {}", other);
error!("DecodeError: {}", other);
Err(other)
}
}